-
-
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
"Unstable" vertices when rotating a glTF model #14692
Comments
This model has some issues that will need to be fixed for viewing in a realtime engine —
I'm getting about 15fps when viewing the model, and a lot of flickering from z-fighting. You may be able to fix the z-fighting by reducing distance between camera near/far parameters, or there may be geometry in the mesh that just overlaps, in which case you'd need to clean it up with a modelling tool. This is more of a help question than a bug, so I'll close this issue, but feel free to post in the forum (http://discourse.threejs.org/) for more help. |
The topic of the issue is not about z-fighting, which I understand as two surfaces lying on the exact same plane. But I am talking about the vertices jumping as shown in the GIF. In the embeded GIF I am using a transparent material, you can clearly see that there are no overlapping faces, so z-fighting is irrelevant. In the linked GIF, in which the materials are rendered as wireframe, you can also see the vertices jumping. Again z-fighting is irrelevant. In fact, the the flickering is caused by the vertices jumping such that sometimes a vertex is in front of the other and sometimes it is behind. It is simply not z-fighting. The number of meshes and nodes are also irrelevant, I expect a slowdown but not vertices jumping around. I still see this as a BUG. |
Hm perhaps z-fighting is not the right word, what I mean to say is that there are precision issues with the scale and geometry in your model, and this results in the vertices appearing in the wrong places, e.g. in front of vertices they shouldn't be in front of, and "jumping" from frame to frame. This is not specific to any particular model format, but may occur with particular modeling programs and workflows more than others... If I import your model to Blender, join the meshes, move the object to the origin, and re-export to glTF, these issues disappear: |
I will check the workflow then, thanks. |
Description of the problem
When rotating a glTF model, the model vertices "jump" around (instead of "staying in place")
See the vertices "jumping" with reference to the green grid in the GIF below:
Reproduce steps
Go to this glTF viewer powered by three.js
https://gltf-viewer.donmccurdy.com/
Extract the two files in the following zip and drag them into the viewer
model.zip
Try rotating the model and notice the walls "flashing", that's due to the unstable vertices.
To further verify, try using the wireframe option and zoom in further to see the vertices "moving" when rotating the model.
Result GIF: https://gph.is/2AWQRnH
Three.js version
Browser & OS
Tested on the following combinations and all exhibits the problem:
The text was updated successfully, but these errors were encountered: