Skip to content
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

Logarithmic depth with skinned model rendered incorrectly #4240

Closed
bagnell opened this issue Apr 30, 2018 · 4 comments
Closed

Logarithmic depth with skinned model rendered incorrectly #4240

bagnell opened this issue Apr 30, 2018 · 4 comments

Comments

@bagnell
Copy link

bagnell commented Apr 30, 2018

Playground link

Current result:
babylon_log_depth_issue
Expected result:
babylon_log_depth_no_issue

@bagnell
Copy link
Author

bagnell commented Apr 30, 2018

I noticed a similar issue with the Monster.glb model from the glTF-Sample-Models repo. The front right leg will show through the back right when looking from the left side. All the other sample models look right.

@deltakosh
Copy link
Contributor

Hello this seems to come from a vertex weight normalization issue. The total weights applied on a vertex is not equal to 1 hence producing wrong world matrices in shaders

@deltakosh
Copy link
Contributor

Here is the current discussion at Khronos:
KhronosGroup/glTF#1213

@deltakosh
Copy link
Contributor

To fix it in your code you can call mesh.cleanMatrixWeights() on all your meshes
https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.mesh.ts#L1461

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants