[osg-users] different materials for a geometry and highlight

Gianni Ambrosio g.ambrosio+osg at gmail.com
Tue Sep 27 00:00:32 PDT 2016


Trajce Nikolov NICK wrote:
> Maybe better idea then these email iterations is to write us what is your goal with this code since I see no smart logic in there (sorry :-) )
> 

OK, I try to explain in detail.

The object I visualize on 3D is a road. A road can have different "materials": asphalt, curbs, oil, puddles, obsacles ... The road surface including materials is defined in a core road structure. I drow the 3D road base on the data stored in the core road structure. There each road element (=triangle) is associated to a "material" object. For that reason I thought to use different colors, one for each material. So, asphalt = dark grey, curbs = red/white, oil = dark green, puddle = brown ...
The user, after loading a road, can change the "material" definition. So picking on the road surface he can add a puddle in the middle of the road. So the picked triangles must be shown in brown then.
In addition I have to update the core road structure accordingly.

This is the scenario. Hope this is clearer now.

Thanks Nick and Sebastian for the time spent, really!
Gianni

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68780#68780








More information about the osg-users mailing list