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

Object with bone parenting disappears at certain camera angles. #1412

Closed
castelblends opened this issue Jun 10, 2021 · 2 comments
Closed

Object with bone parenting disappears at certain camera angles. #1412

castelblends opened this issue Jun 10, 2021 · 2 comments
Labels
question Further information is requested

Comments

@castelblends
Copy link

Describe the bug
An object parented to an armature suddenly disappears when the armature is displaced from (0,0,0) on any direction. Box helpers, one for the object and one for the armature indicates the reference point used by the camera frustum to cull the object is somewhere in between the two box helpers.
This is the example for the .blend file attached:
An object with armature and a red arrow used as origin reference.
Screenshot from 2021-06-10 16-05-29

Here is the armature displaced 5m to the right. As you can see the green box helper belonging to the cube object is correctly in place while the armature helper (yellow) moved farther away than 5m.
Screenshot from 2021-06-10 16-06-49

When the camera is placed there the cube disappears right where the purple line is.
Screenshot from 2021-06-10 16-06-50

This is the scene made for testing.
Screenshot from 2021-06-10 16-09-42
Front view
Screenshot from 2021-06-10 16-09-20

To Reproduce
On a new scene

  1. Add a cube
  2. Add an armature
  3. Parent object to armature using active weights
  4. Displace armature from (0,0,0) on any direction.
  5. Export as GLB with default values.
  6. Open in any viewer and move around until you hit the angle where the object disappears near the edge of the screen.

Expected behavior
Cube will disappear suddenly at certain camera positions.

Screenshots
This is the cube in don's viewer where If you move to the left just a little bit it will disappear completely.
Screenshot from 2021-06-10 17-13-30

.blend file/ .gltf

test.zip

Version

  • OS: Ubuntu 20.04.2 LTS
  • GPUs: 780Ti / rtx3090
  • Nvidia driver metapackage from nvidia-driver-460 (proprietary, tested)
  • Blender Version 2.93
@donmccurdy
Copy link
Contributor

donmccurdy commented Jun 12, 2021

This is related to mrdoob/three.js#14499, and can occur in three.js-based viewers. The file itself is OK, though.

A workaround (if you needed to display this with threejs) would be to disable frustum culling for skinned meshes.

@julienduroure julienduroure added the question Further information is requested label Jun 12, 2021
@castelblends
Copy link
Author

Hi Don, thanks for the answer, much appreciated.

Work had me putting out fires here and there and today I was able to dig into this again.

I realized the test environment I was using was a clone from a folder using r120 and updated to r129 which improved the sudden disappearance when location transforms are applied to the armature, so now if I want to have the armature moving around I parent it to an empty. Please note "improved", after testing the project's environment it still happens but not enough to bother the
user.

Frustum culling btw does work as a workaround but not in all cases. One of my clients has a platform where performance is the most important factor and as far I understand, not being able to cull objects keep the GPU/CPU running full.

Again, thanks for your time.

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

No branches or pull requests

3 participants