Hi all
Is there a way to export meshes with mix material textures using gltf exporter? I see that my exported meshes lose the materials
If it is not supported, isn’t there any workaround like convert mixmaterial to standard or multimaterial?
Unfortunately no. The mixmaterial is not a material supported by glTF (so far the format only supports PBR but there are discussions to integrate something more flexible in the future)
The only workaround I could think of would be to manually mix the textures into a merged texture and use that texture in a std mat
Could you help me to transform mix material to std material during export and turn it back to mixmaterial after export
Here is the pg: https://playground.babylonjs.com/#2C2E5W#6
What is the way to save the texture and use it as diffuse texture of the standard material?
I guess that I came close to a solution, but I still need to find out what I am missing: https://playground.babylonjs.com/#2C2E5W#13
Or maybe there might be a simpler way. Isn’t in there a function in Babylonjs that grabs all the textures and combine it into one considering the transparency generated by the rgb colors of the mixtexture?
You can use NME to generate a procedural texture based of the merge of your textures:
Node Material Procedural Textures | Babylon.js Documentation (babylonjs.com)
Thank you so much for your help. Now I have a better way to achieve this. I am getting acquainted with the babylonjs node material through your videos. I am trying to find a block that filters and combine textures based on the rgb of the texture5. Would you mind if you help with the creation of this node?
I could make it with this node: https://nme.babylonjs.com/#12YPTW#79
But I’m not able to convert it to procedural texture in this pg: https://playground.babylonjs.com/#8S19ZC#62
Do you know the cause?
shouldnt that be Procedural?
Thank you
I think that is the problem but when I changed to procedural, I realize some parameters are changed. How to achieve the same results in the material mode?
tbh. I dont know, I never used that, but I saw that in the video
You have to switch to procedural first and THEN you can build exactly the same fragment shader.
Should be exactly the same (but yes you need to start from a procedural setup)
Thank you all for the support: Here are the PGs that can be helpful to others.
Material node: https://nme.babylonjs.com/#12YPTW#82
Procedural node: https://nme.babylonjs.com/#A7A3UB#17
Thanks for sharing
Here is an addon if you want to bake the ProceduralTexture (-1 draw call): https://playground.babylonjs.com/#8S19ZC#64