ozRocker Posted January 15, 2018 Share Posted January 15, 2018 I'm using Blender exporter 5.5 I have a mesh that has a bunch of materials. I exported to Babylon.js format but all the textures got merged into one texture. I researched further and discovered that I had 5 materials but only 2 "UV Map" entries. I added a new "UV Map" entry for each material and assigned their textures to use that UV map, but it didn't make a difference. Is there something I'm forgetting to do? Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted January 15, 2018 Share Posted January 15, 2018 Are you on Blender Render or Cycles ? On Cycles, the exporter make automatic baking, on Blender render this can happen when a texture is assigned on multiple influences. About UV channels, you're limited to 2 channels, and you certainly doesn't have to make one channel per material. One use case could be UV1 for texture tiling, UV2 for lightmapsn and they both can be used by all object materials. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted January 15, 2018 Author Share Posted January 15, 2018 4 minutes ago, V!nc3r said: Are you on Blender Render or Cycles ? I'm using Blender Render. I don't know what to do to preserve the multiple textures. They all get merged into one. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted January 15, 2018 Share Posted January 15, 2018 Could you share your blend file, or at least one object from this file ? Quote Link to comment Share on other sites More sharing options...
ozRocker Posted January 15, 2018 Author Share Posted January 15, 2018 44 minutes ago, V!nc3r said: Could you share your blend file, or at least one object from this file ? Sure thing mate. http://preview.punkoffice.com/maddie.zip There is one armature and one blend shape in there called "pout" Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted January 15, 2018 Share Posted January 15, 2018 Try to include alpha directly in your diffuse texture, multiple influence assignation generate baking at export: (also, off-topic point, take care about transforms data, they're need to be cleaned: ) Quote Link to comment Share on other sites More sharing options...
ozRocker Posted January 15, 2018 Author Share Posted January 15, 2018 crap! I forgot to apply transformations Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 15, 2018 Share Posted January 15, 2018 I think 2 two UV limit is a .babylon format limit, ( and obviously a blender issue by extension ). The number of UV's in BJS is 6, as I recall. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted January 15, 2018 Share Posted January 15, 2018 OK, I doesn't known that ! Quote Link to comment Share on other sites More sharing options...
ozRocker Posted January 15, 2018 Author Share Posted January 15, 2018 So do I have too many materials? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 16, 2018 Share Posted January 16, 2018 In a given material slot, you may not have more than one type of a texture of the same type of influence. If you were building the code your self: var mat = new BABYLON.StandardMaterial(blah, blah, blah); var tex1 = new BABLYON.Texture(blah, blah, blah); var tex2 = new BABLYON.Texture(blah, blah, blah); mat.diffuseTexture = tex1; mat.diffuseTexture = tex2; This will never work. You also have a useless PunkOffice material. Your teeth, eyes, tongue have duplicate textures with different names. Every inefficient. The Teeth is the error though. You may use the texture for more than one type of influence. Intensity & color both translate to diffuse. FYI, things in the "Image Sampling" have no meaning in BJS. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted January 17, 2018 Author Share Posted January 17, 2018 Got it! My materials were messy and the double textures was unnecessary. I've cleaned it up and the textures are fine now. Quote 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.