filament
filament copied to clipboard
filamat.js would be appreciated
Thanks
Just curious, what's the use case for this?
I'm trying to write a sort of 3D editor for the web using filament but among many other things I'm still missing I also haven't yet figured out how to edit materials at runtime. I thought filamat could be of help.
If your 3D editor needs to support highly configurable materials (e.g. you allow users to provide GLSL snippets) then yes, filamat would help you out.
If your editor merely gives users the ability to tweak roughnes, attach a normal map, etc then we might recommend avoiding filamat and instead compiling one or two "ubershader" style materials (like this) using matc
. This would allow for faster load times.
Thanks @prideout. I'm investigating the ubershader approach, which seems to me also the way the GLTF loader works at the moment. Maybe to start with it's a good solution, but in the long run supporting every aspect of material creation and configuration would be great.
@ansorre Assuming your application is online you could compile the materials in native code on a server with something like Amazon Lambda - basically matc-as-a-service. I've toyed with the idea myself for materials and skyboxes.