Hello Daniel,
Daniel Wickeroth wrote:
> I'm having a little problem concerning materials. My scenegraph looks
> exactly like the one Antonio posted a few months ago
>
> MaterialGroup 1
> |
> Geometry 1
> |
> MaterialGroup 2
> |
> Geometry 2
>
> Is there any way to make Geometry 2 use Material 2? Maybe using a
> ChunkMaterial instead of MaterialGroups with a SimpleMaterial?
in OpenSG 1 basically the first material encountered (while depth first
traversing the scene) wins and determines the way everything below it is
being drawn.
The only thing I can think of is moving all Materials from the
MaterialGroups into the Geometries and replacing MaterialGroups with
just Groups.
> I want to do this, because I want to highlight an object by drawing a
> bright green bounding box around it. For the bounding box to move, and
> scale with the object I want it to be a child of the object. But
> still, I would like the bounding box to be of another material than
> the object..
If you could restructure your graph to have the Transforms above the
MaterialGroups you could add your highlighting geometry to that
Transform. Of course that assumes you have a lot of control over how the
graph actually looks, I don't know if that applies to your case.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users