SpiderPig Posted June 25, 2023 Share Posted June 25, 2023 Some of my shader families have the extension .fam and when loading the material it will fail to load the shader family because it's appending .json to the end. Can it be made so that if the extension is specified it doesn't append .json to the end? Error: Failed to read file "C:/UltraEngine/Projects/TheSeventhWorld/Shaders/Materials/MyFamily.fam.json" Material: { "material": { "version": 100, "color": [ 1.0, 1.0, 1.0, 1.0 ], "emission": [ 0.0, 0.0, 0.0 ], "metallic": 0.0, "roughness": 0.0, "transparent": false, "occlusionInfo": true, "occlusionScale": 1.0, "normalScale": 1.0, "shaderFamily": "MyFamily.fam" } } Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted July 3, 2023 Author Share Posted July 3, 2023 Hey @Josh just wondering if this is actually a bug or I should change my files to all use .json? Thanks. Quote Link to comment Share on other sites More sharing options...
Josh Posted July 4, 2023 Share Posted July 4, 2023 The material files currently just store the name of the shader family. They do not store the "Shaders" folder to the path, even though the files are located there. I can't say exactly why but it feels intuitively right to me. So explicitly declaring the file extension also feels like a strange thing to do. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted July 4, 2023 Author Share Posted July 4, 2023 I name my json files .mat and .fam so I can see the difference without having to open them, but it's no big deal. I'll make it work. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted July 4, 2023 Author Share Posted July 4, 2023 Okay so I see now it's trying to load it from the shaders folder too... I see what your doing for the standard materials and the shader family's for Ultra but I don't think its a good idea. Ultra needs to be flexible. I want my shaders and textures in one folder. I don't want to split the materials and textures into one and then my custom shaders into another. I think we should be able to define a path because it is, after all, a file. Quote Link to comment Share on other sites More sharing options...
Josh Posted July 4, 2023 Share Posted July 4, 2023 I already started doing this for materials. Undecided on shader families. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted July 4, 2023 Author Share Posted July 4, 2023 It makes sense to make everything relative to the executable so we can just define a shader family as "Shaders\MyFamily.json" or "Materials\MyMaterial\MyFamily.json". Quote Link to comment Share on other sites More sharing options...
Josh Posted July 4, 2023 Share Posted July 4, 2023 Well, the way things are right now there is no need for a file requester. You can just select the item you want from the combobox, which is much simpler. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted July 4, 2023 Author Share Posted July 4, 2023 Do you mean this? I don't see how this takes into account making our own shaders though. Quote Link to comment Share on other sites More sharing options...
Josh Posted July 5, 2023 Share Posted July 5, 2023 You make a good point. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Solution Josh Posted July 18, 2023 Solution Share Posted July 18, 2023 The design of this feature has been changed. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.