-
Notifications
You must be signed in to change notification settings - Fork 30
[vnext] Models don't seem to render correctly. #49
Comments
I don't think I can fix the model collapsing in 3D Viewer when it's not animated. I also don't think I can do much about the model not loading at all in certain viewers or being really slow, I'm guessing that's because of the file size/complexity. The model appearing too big in 3D Viewer and with scaling issues in Three.js has been fixed in 05cdb29, but this scaling of the root and skeleton root node is also what causes the inverted normals in Babylon. The only fix for this is to not scale the model at all when it has a skeleton, which is what I've done. In 2507571 I've made it so the default behaviour is to not scale skinned meshes (meshes with a skeleton) unless I'm closing this issue but if this doesn't work for you or there are still other issues with other viewers, feel free to reopen. |
The current solution has the following problems that I probably won't fix:
|
Thanks for the quick fix! Models exported with the latest build seem to be behaving as expected :D Another thing I noticed (although this probably warrants its own issue) is that models with “hidden” meshes still have everything visible. For instance, if you look at Star Guardian Ezreal, the model exported with SimpleGLTF has his wings visible, while the model from SharpGLTF has them hidden. Similarly, Crime City Nightmare Akali has a very glitchy model under vnext because it looks like she has two meshes at the same position (one bright and one for stealth). (Also I’m sorry to keep throwing these issues at you! 😔) |
No problem! As for hiding meshes, I'm still trying to figure out what the best way to implement that is and I already have an issue for it here #47. I just pushed 0da92e7 which adds the option |
Hi again! I finally got a chance to play around with your rewrite. It seems to work as advertised for models without bones and animations, but it starts behaving quite strangely once they're added. I'm testing using Microsoft's 3D Viewer, donmccurdy's glTF Viewer (based on Three.js), and the Babylon.js Sandbox. The screenshots below are in the same order.
No SKL, No Anim
Works perfectly in all three viewers.
3D Viewer

glTF Viewer

Babylon

SKL, No Anim
Interestingly has a different issue in each viewer. 3D Viewer just collapses the model, Three.js ignores the scaling, so the model is massive (like you mentioned here: #44 (comment)), and Babylon.js has inverted normals.
3D Viewer

glTF Viewer

Babylon

SKL with Anim
Seems to work in 3D Viewer but the model is really massive. Never loads in Three.js, just indefinitely hangs. Loads correctly in Babylon.js, but has inverted normals again. Animations work in both 3D Viewer and Babylon.js.
3D Viewer (you can't tell in this photo but it looks right.)

glTF Viewer never loaded.
Babylon

The text was updated successfully, but these errors were encountered: