-
-
Notifications
You must be signed in to change notification settings - Fork 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
glTF renders incorrectly, but correct in McCurdy viewer #4418
Comments
what is if you set the colorManagement to true? |
Just changed it. No apparent difference. I admit that I don't know what that option does. (I had been having trouble getting colors to match from my work in Blender and found that suggestion in another thread here. Now the colors seem to match but lots of the model is missing.) |
@donmccurdy anything top of mind? |
This model requires model.traverse((o) => {
if (o.isMesh) o.material.depthWrite = !o.material.transparent;
}); I've implemented that in my viewer, and proposed a fix for threejs (mrdoob/three.js#18235) but the threejs version has not been merged yet. This could be done in a custom component, in the meantime. |
Thank you. That sounds like it's possibly within my ken. Can I ask, though, what it is about the model that requires this? Did I do something crazy in Blender that I should not have done? I can always go back and fix it. Maybe. |
@donmccurdy I have other models with transparent materials that display without trouble. Do you know what I did wrong when preparing this one? |
The model is difficult to render correctly in realtime engines, and somewhat up to "luck" as a result, because it contains transparent objects nested inside of other transparent objects. A single layer (i.e. an opaque object inside a transparent one) is usually OK, but layered transparency is more difficult. Even Blender shows some artifacts (black triangles) when you switch into Eevee rendering mode, for me. The fix suggested above — setting |
Ok, I get it. Many thanks. |
@donmccurdy Thanks for clarifying. Much appreciated as always. |
Can anyone help me debug a glTF file? It looks ok in Don McCurdy's glTF viewer at https://gltf-viewer.donmccurdy.com/ (though it's pretty different from how it looks in Blender) but most of its pieces are missing when I use aframe to look at it: https://sgouros.com/scorpii/index1.html.
Two of the meshes are visible, but something has happened to the other dozen meshes. I'm not sure if this is a support question or a complaint about the glTF display feature of aframe, so I've posted it here as well as at SO: https://stackoverflow.com/questions/59852899/gltf-file-renders-incorrectly-in-aframe
The model is at https://sgouros.com/scorpii/data/scorpii3.glb, but it looks like this in the McCurdy viewer:
Displayed like this:
The text was updated successfully, but these errors were encountered: