filament icon indicating copy to clipboard operation
filament copied to clipboard

filamat.js would be appreciated

Open ansorre opened this issue 5 years ago • 5 comments

Thanks

ansorre avatar Oct 29 '19 12:10 ansorre

Just curious, what's the use case for this?

bejado avatar Nov 01 '19 21:11 bejado

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.

ansorre avatar Nov 02 '19 06:11 ansorre

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.

prideout avatar Nov 02 '19 17:11 prideout

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 avatar Nov 03 '19 06:11 ansorre

@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.

rawnsley avatar Jun 09 '20 14:06 rawnsley