xeolabs / xeogl

A WebGL-based 3D engine for technical visualization. Not actively maintained.
http://xeogl.org
Other
1.14k stars 264 forks source link

Annotations showing when the mesh is behind the camera #313

Open Swaggaaa opened 5 years ago

Swaggaaa commented 5 years ago

Describe the bug I'm not referring to the "occludable" property but to the mesh being behind the camera. When converting the world positions to the canvas positions in order to draw the annotation, it ignores whether the mesh attached to the annotation is positioned in front or behind the camera, resulting in "weird" behaviours and the annotation showing when looking at the opposite direction.

To Reproduce Steps to reproduce the behavior:

  1. Attach an annotation to any model.
  2. Look at the annotation's mesh and then turn away 90 degrees
  3. The horizontal scrollbar should appear.
  4. Keep turning away another 90 degrees.
  5. The horizontal scrollbar disappeared but now we can see the annotation in the middle of the screen. However, the mesh attached to it is behind us.

Expected behavior Annotations should not be rendered when the mesh attached to it is out of sight (not occluded but actually outside the camera FOV).

Screenshots https://imgur.com/a/OEOa6P5

Desktop (please complete the following information):

Additional context I'll try to fix this later and update this ticket if I do so