-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blender export fails for multiple materials #6731
Comments
I ran into this problem too, you have to split your meshes - one material per mesh. |
In |
...and aoMaps. |
Thanks, I wasn't aware of that convention. It seems that only one mesh can be exported at a time, so I'll have to load the different parts of my model into THREE.js separately and somehow group them back together there. Or is there a better way? |
For geometry exports this is true. Have you tried the |
With ObjectLoader you can have many meshes in one file, but only one material per mesh. This is true for three.js v71 and v72. Since they started improving it with BufferedGeometry they broke multi-material per mesh. I believe v69 this was working with old blender exporter using JsonLoader. |
Also; if you are only utilizing one material per mesh/object, and doing scene exports, to possibly use these material settings
SCENE: The reason is that if both are checked then you will get a material entry for the object and a material entry for the geometry. There may be cases, especially with AO or light maps, in which have face materials makes sense. But, at least in my experience, if there is a single material affecting all faces then just having object based material assignments have worked just fine. Now there may be some work flow or corner case where object material assignments don't work, as I can only speak for the use cases that I have been exposed to. But that is probably a discussion to be had on Stack Overflow |
Does this work now for Blender objects with multiple materials, or was this closed more in the vein of "won't fix"? |
Multiple materials on a single mesh doesn't seem to be supported for any case that I can create in Blender. Is there a plan for addressing this, or must we work around this by doing single material per mesh? https://www.reddit.com/r/threejs/comments/5kejle/importing_a_model_from_blender_materials_not/ |
this is also why you shouldn't mark development work "done" until it's merged and tested in a release, best to leave it open, tag it so we know where the "fix" is at instead. |
FILES:
This folder contains two blender projects, their respective THREE.js JSON exports, a texture file and this document:
DESCRIPTION:
==> As expected, the exported .json file contains six quad faces in the format
[43, v0,v1,v2,v3, m, u0,u1,u2,u3, n0,n1,n2,n3]
, hence 14 entries per face.==> Now, there are 18 entries per face in the exported .json file, and according to the metadata property it contains 17 faces. If imported with the THREE.JSONLoader, 2-materials_nok.json doesn't cause an error but it is displayed with the first material only.
USED VERSIONS:
The text was updated successfully, but these errors were encountered: