Possible to draw overlay on ModelLayer?

classic Classic list List threaded Threaded
5 messages Options
tqjxlm tqjxlm
Reply | Threaded
Open this post in threaded view
|

Possible to draw overlay on ModelLayer?

I'm trying to project a polygon onto a model building (loaded as a ModelLayer). I tried FeatureNode and ImageOverlay, but they just overlay to the terrain.

I used to do this using osgSim::OverlayNode and that worked well. But I want to manage all data using osgEarth layers instead of raw osg::Node. Is it possible with osgEarth? Can you give me some hints or point me to the related sample?

Thanks

------------------

Atlas
An extensible 3D GIS application for visualization, analysis and research.
https://github.com/tqjxlm/Atlas

Atlas
An extensible 3D GIS application for visualization, analysis and research.
https://github.com/tqjxlm/Atlas
tqjxlm tqjxlm
Reply | Threaded
Open this post in threaded view
|

Re: Possible to draw overlay on ModelLayer?

Or to say, is it possible to make the external model part of the terrain?

Atlas
An extensible 3D GIS application for visualization, analysis and research.
https://github.com/tqjxlm/Atlas
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Possible to draw overlay on ModelLayer?

tqjxlm,

It's not possible at the moment.

The internal class OverlayDecorator is responsible for projecting a draping texture on the terrain, and today it is pretty hard-wired to only project on to the terrain surface.
Glenn Waldron / Pelican Mapping
tqjxlm tqjxlm
Reply | Threaded
Open this post in threaded view
|

Re: Possible to draw overlay on ModelLayer?

Glenn,

Thank you for your reply. Then I'll stick with the osg way for these models.

By the way, why doesn't osgSim::OverlayNode work if I put models under MapNode? Is it because osgEarth change the rendering method when they are children of MapNode?

Atlas
An extensible 3D GIS application for visualization, analysis and research.
https://github.com/tqjxlm/Atlas
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Possible to draw overlay on ModelLayer?

The implementation of osgSim::OverlayNode is not compatible with the shader composition framework (VirtualProgram) used in osgEarth.
Glenn Waldron / Pelican Mapping