Applying a piece of raster as texture to building roofs

classic Classic list List threaded Threaded
1 message Options
Xtof Xtof
Reply | Threaded
Open this post in threaded view
|

Applying a piece of raster as texture to building roofs

This post was updated on .
Hi all,

I'd like to apply pieces of a ground overlay to the roof of corresponding buildings for a specific height.
- Ground overlay:

- Buildings:

- Pieces of the ground overlay applied to the roof (done with Paint):


I've tried to modify the SkinSymbol, but without success:
osgEarth::Style roofStyle;
roofStyle.setName("Building Roof");
osg::ref_ptr<osgEarth::SkinSymbol> roofSkin = roofStyle.getOrCreate<osgEarth::SkinSymbol>();
roofSkin->library() = ""; => No idea what to put here!
roofSkin->name() = osgEarth::StringExpression(".\\overlay.png"); => Georeferenced PNG file
roofSkin->objectHeight() = 3.f; => For buildings with 3 meters height only
roofSkin->addTag("rooftop");

Any idea how to proceed?

Thanks,
Christophe