ImageOverlay strange occlusion culling

classic Classic list List threaded Threaded
6 messages Options
AndreaB AndreaB
Reply | Threaded
Open this post in threaded view
|

ImageOverlay strange occlusion culling

Hello everyone,

my application uses an ImageOverlay over a map in order to show a real-time image coming from a video source. For the most of the time things work well and I see the current image properly rendered over the map.

However, randomly, I get a strange behavior where the ImageOverlay node is draped "under" the map: I can see the image if I manipulate the camera to be under the mountains. In this cases I can see the ImageOverlay only if I place the camera at very high altitudes while, at lower altitudes
the near-most part of the ImageOverlay node is partially occluded by something (I don't known what it is), while the far-most one is still visible. Then, descreasing the camera distance will occlude the whole ImageOverlay node that is placed "under" the map.

I've not managed to create a simple code to replicate this problem since it happens randomly, also in consecutive runs of my application. Maybe there is something uninitialized...but I don't know what.

I've tried adding the ImageOverlay before and after the image layers of the MapNode...but the random behavior still happens.

Do you have any idea of what's wrong in the configuration of the ImageOverlay node that may cause that random behavior?

I'm using osgEarth 2.10.1 with MSVC2015 x64.

Thank you in advance for your time. Best regards.

Andrea
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: ImageOverlay strange occlusion culling

Hi Andrea. The ImageOverlay uses a projected texture to render on top of the terrain, so in theory it should not be possible for it to appear underneath. Anyway, some screenshots or a video or a code snippet might help explain what you are seeing.
Glenn Waldron / Pelican Mapping
AndreaB AndreaB
Reply | Threaded
Open this post in threaded view
|

Re: ImageOverlay strange occlusion culling

Hi Glenn,

many thanks for your reply.

Unfortunately I don't have a simple code snippet to replicate the problem. I post here three pictures extracted from my application (I show only the relevant part) where the problem happens.
Far
Closer
Closest

If I zoomin further, the ImageOverlay disappears from the map and manipulating the map it seems to be rendered under the map. At this moment I don't have a clear image of it.

Thanks again for your support.

Best regards.

Andrea
AndreaB AndreaB
Reply | Threaded
Open this post in threaded view
|

Re: ImageOverlay strange occlusion culling

Hello everyone,

I write here some update on my problem.

After further investigations I've found that the ImageOverlay seems to be culled (or partially culled) at low altitudes.

Since this behavior is random I think this is due to an uninitialized variable. Is there an option/configuration I'm missing?

What can I check in my code?

Many thanks for your time.

Andrea
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: ImageOverlay strange occlusion culling

Can you please post an earth file with an image overlay that demonstrates the issue?
Take a look at the annotation.earth example, wherein you will find an <imageoverlay> block showing how to make one. Thanks!
Glenn Waldron / Pelican Mapping
AndreaB AndreaB
Reply | Threaded
Open this post in threaded view
|

Re: ImageOverlay strange occlusion culling

Hello Glenn,

I didn't manage to create an *.earth file that demostrates the issue. However I've found what was the problem.

In my application I have enabled all the clipping planes with default values so that the clipping is disabled: for some (unknown) reasons, the map was fully visible while the ImageOverlay was not.

Disabling the clipping planes did the trick and the ImageOverlay is now visible from every point of view.

Thanks again for your support.

Best regards.

Andrea