Skip to content

controlling the draw order of osgEarth LabelNodes. #2422

Answered by gwaldron
Apadona asked this question in Support Q&A
Discussion options

You must be logged in to vote

LabelNodes are not like normal scene objects. They draw in a screen-space overlay after the rest of the scene renders. The only way to get them to "interact" with the scene objects is by using the occlusion culling option. This option intersects a ray from the camera to the label's position, and if it hits anything, it skips drawing the label.

The occlusion culling also has a global max altitude at which is takes effect -- perhaps you need to increase this by calling AnnotationSettings::setOcclusionCullingMaxAltitude(...) -- the default value is 200000m.

If you want complete 3D sorting and rendering for text, you will need to instead use osgEarth::Text objects directly in your code.

Hope …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Apadona
Comment options

Answer selected by gwaldron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants