Applying a piece of raster as texture to building roofs

classic Classic list List threaded Threaded
2 messages 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
ago ago
Reply | Threaded
Open this post in threaded view
|

Re: Applying a piece of raster as texture to building roofs

Hi Xtof

  Update Texture, You need to delete and reconstructing buildings.

  SXEarth is a free osgEarth editor, add some extensions, below GIF, demonstrates the edit building operation , building texture real-time updates.

SXEarth,a free osgEarth GUI Editor and Flight Simulation.

Email: seegogo@126.com
SXEarth download: http://www.sxsim.com/en/