Unexpected behaviour with screen coverage LODs and orthographic camera

Use P, T, L & F keys to switch to perspective and various orthographic camera modes.

Note that the grid and solid meshes work fine in any camera mode, but the point cloud with “screen coverage” LODs disappear in orthographic mode. They work fine in perspective mode and both camera modes if the LOD scheme is “distance”.

So, two questions:

  1. Why do the “screen coverage” LODs disappear in orthographic mode?
  2. Even in perspective, “screen coverage” doesn’t seem to operate as I’d expect i.e. if you use CTRL to pan the camera so that say half the point cloud is off-screen, it still shows the current LOD level unchanged, like it’s going by “distance” still?

It seems screen coverage should also work in orthographic mode, at least the case is accounted for in Camera.screenArea.

Let’s see if @CraigFeldspar has some inputs about that, as he is the creator of the feature.

Thanks @Evgeni_Popov . I forgot to mention that it’s not just the child LODs but if LODs are added to a parent point cloud mesh then the parent mesh also disappears in orthographic mode. When you comment out the LOD creation, the parent mesh works fine in orthographic.

There is indeed a bug in orthographic LOD selections, units are not good.

I’ll fix that shortly

Here is the fix : fixing screen coverage LOD for ortho camera by CraigFeldspar · Pull Request #13170 · BabylonJS/Babylon.js · GitHub

3 Likes

Thanks for the awesome turnaround @CraigFeldspar! I’ll test it when it’s released.

Do you also have some idea about the following? Maybe I’m misunderstanding how screen coverage is supposed to work.