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

Gianni Ambrosio g.ambrosio+osg at gmail.com
Wed Sep 28 06:22:20 PDT 2016

Hi Sebastian,
in attachment you can find a movie of what I implemented with primitive sets. That's exactly what I need.
The "road" is initially gray. Then the user choose a color (pushing in my example 1,2,3 or 4 key) and picking the road surface triangles are coloured with the current color.

Since you said what I implemented with primitive sets is not the right way to do, then I'm trying to change my mind using the approach you suggested (i.e. textures) to reach exactly the same behaviour. In this case I could use a "monochromatic" image (to mimic the behaviour of my example) or a nice texture loaded from file. A nice texture anyway is not a must.

In attachment you can find also the example code I run to record the movie.

Hope this helps,

Read this topic online here:

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osgviewer.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160928/4a32ab96/attachment-0001.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: movie.7z
Type: application/octet-stream
Size: 349980 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160928/4a32ab96/attachment-0003.obj>

More information about the osg-users mailing list