Unclear clipping issue

Excuse the title, I couldn’t manage to come up with something better.

I’m working on a project that displays a pointcloud as well as a ‘bubble’-view (basically an image that is wrapped around an ellipsoid with the camera in the middle to produce a pseudo 3d effect). The user can either toggle the pointcloud or the bubble view. In the bubble view, I’d like to be able to display the scan positions that were used to create the pointcloud. These scan positions are visualized as flat boring circles and lie outside of the bubble ellipsoid.

The issue is as follows: when I toggle the bubble view and disable the tileset (by setting .show to false), my scan markers are being clipped away in most camera angles. I don’t know what’s causing this, maybe a dynamic frustum? Once I change tileset.show to true, the markers are not getting clipped. So my workaround for now is always showing the tileset but setting its alpha to a very small value. I was hoping for something cleaner though.

Here are some images


you can see the 3 markers in the back are half clipped


here is the exact same view, just with the pointcloud toggled and bubble view untoggled


and here is how it should look like. This is the workaround with pointcloud visible but very low opacity. Without the pointcloud visible, the 3 markers would only be visible at very specific angles.

Anybody know how I can fix this?

Best Regards,
Dan

Hi Dan,

Huh, that’s strange behavior. Would you mind putting together a minimal sandcastle example for debugging purposes showing how the markers are rendered?

Hi Gabby,

thanks for getting back to me and sorry for the late reply. I set up a sandcastle here.

To see the issue, just left click to move the camera left or right and you should see the model getting clipped the closer it gets to edge of the screen. If you toggle on either tileset or globe in the knockout options, the clipping will not occur.

The culprit seems to be the Pass.OVERLAY mode I use for the model. Clipping won’t happen in either OPAQUE or TRANSLUCENT mode. However, since in my use case the camera is immovable inside an opaque sphere, I needed a way to render outside models on top of it.

I didn’t render the bubble by default, because it’s almost impossible to use the default controller to navigate within the sphere. I could not port the custom controller i use to this sandcastle. However, I put in the create function and also a knockout option, in case you are wondering how I generated those.