Icon Culling

classic Classic list List threaded Threaded
3 messages Options
TonBrouwer TonBrouwer
Reply | Threaded
Open this post in threaded view
|

Icon Culling

Hi,

Is there a way to cull icons ? Icon-occlusion-cull only applies to terrain,
I would like them not to show when they are behind buildings and such.

Regards,

Ton Brouwer

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

Re: Icon Culling

No, the built-in occlusion culling only works against the terrain. But the code is in CullingUtils.cpp::OcclusionCullingCallback if you want to look into it.
Glenn Waldron / Pelican Mapping
TonBrouwer TonBrouwer
Reply | Threaded
Open this post in threaded view
|

Re: Icon Culling

Hi,

First of all : been working and experimenting with osgearth for past 2 months,
really impressive ! Awesome stuff, great job !

gwaldron wrote
No, the built-in occlusion culling only works against the terrain. But the code is in CullingUtils.cpp::OcclusionCullingCallback if you want to look into it.
Thanks. Will look into it as it can solve some interesting things :

What I'm working on is a realistic simulation of windturbines and the visual effect on the surroundings : I can already interactively place, move and scale models, including animated rotation casting shadows.

The part that is tricky is the simulation of the beacon-lights. These are perceived by many as particularly annoying, especially the flickering when a wing passes in front of the beacon-light.

I simulate the beacons with iconsymbols, and I found a way to simulate the flickering by adding a switch above the iconsymbol. In the animation loop I switch-off the iconsymbol when the angle of the rotor is approx. a multiple of 120 degrees. That already gives a very realistic effect, but they still appear to shine through buildings etc, hence my question.

Regards,

Ton Brouwer