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

SkeletonHelper is always in front. #28399

Closed
ycw opened this issue May 16, 2024 · 5 comments
Closed

SkeletonHelper is always in front. #28399

ycw opened this issue May 16, 2024 · 5 comments
Milestone

Comments

@ycw
Copy link
Contributor

ycw commented May 16, 2024

Description

bone.infront.mp4

The pointlighthelper and directionallighthelper aren't always in-front, while bounding box helper and armature helper are always in-front, I expected that the behavior should be consistent, but actually dont

Reproduction steps

Code

// code goes here

Live example

Screenshots

No response

Version

r164

Device

No response

Browser

No response

OS

No response

@Mugen87 Mugen87 added the Editor label May 17, 2024
@Mugen87
Copy link
Collaborator

Mugen87 commented May 18, 2024

Actually the result is as expected.

  • The selection box should always be visible so it's easier to estimate the bounds of selected object. Depth testing is disabled for the selection helper on purpose in Viewport.js.
  • The SkeletonHelper disables depth testing by default because the visualized skeleton is normally inside character models. If you would enable depth testing, you would simply never see the helper.

As you can see, it does not make sense to handle visibility in context of helpers uniformly. For some helpers like PointLightHelper or DirectionalLightHelper which visualize objects with no volume in 3D space, using depth testing is correct. For others it is not.

@ycw
Copy link
Contributor Author

ycw commented May 18, 2024

you would simply never see the helper.

To clarify, I expect that the armature should be shown infront of the humanoid, but should not be always infront of anything, because there is no options toggle helper per object, so this is problematic when there're multiple armatures on scene:

issues.when.multiple.armatures.mp4

@Mugen87
Copy link
Collaborator

Mugen87 commented May 18, 2024

This is not an editor specific issue. It happens in normal scenes as well: https://jsfiddle.net/9fowp5L2/

This is a side effect of how skeleton helper is implemented.

@Mugen87 Mugen87 removed the Editor label May 18, 2024
@Mugen87 Mugen87 changed the title Editor shows some helpers always in front SkeletonHelper is always in front. May 18, 2024
@Mugen87
Copy link
Collaborator

Mugen87 commented May 21, 2024

@ycw If you can't suggest a different approach for rendering the helper, I would suggest to close this issue and mark it as Won't fix.

@ycw
Copy link
Contributor Author

ycw commented May 21, 2024

This is a side effect of how skeleton helper is implemented.

Ahh, I forgot to link #28421 to this issue 🙏🏻 ... that PR doesn't change the SkeletonHelper implement ... and it solved the root problem: "this is problematic when there're multiple armatures on scene", so this issue can be closed, sorry for that 🙏🏻

@Mugen87 Mugen87 closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
@Mugen87 Mugen87 added this to the r165 milestone May 21, 2024
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