RE: Re: 3D perspective & transparency playing tricks ?

From: Fine, Valeri <fine_at_bnl.gov>
Date: Mon, 19 Dec 2005 20:10:40 -0500


Hello Michal,
I've run your last macro.

See the picture (Huge file be careful :) http://root.bnl.gov/picture/test.gif

> Hi once again,
> With the opaque materials everything is fine,
> setting the transparency to anything >0 makes the volumes in different
> colours "leap out" and appear as volume A is visible through volume B when
> it's indeed the reverse case (B is partially covered by A).

First, I would like to mention that your macro is not enough to watch what your observation was. The different OpenGL hardware may have created the different effects.

Anyway, I think what your macro demonstrates is the OpenGL limitaion. OpenGL can draw (without extra effort :) the translucent objects properly if the objects are rendered in the "proper" order and (event better) are nested. In your case with the overlapped bricks and rotations no pre-defined order of the ROOT TGeoShape objects is good for all possible angles of view.

To see what I mean just exchange the two statements in your macro

Replace:

	con->AddNode(t1,1,gGeoIdentity);
	con->AddNode(t2,2,gGeoIdentity);
with
	con->AddNode(t2,2,gGeoIdentity);
	con->AddNode(t1,1,gGeoIdentity);

and re-run your macro again.

> So, the conclusion is that the authors may need to fine tune the parameters
> used when calculating the transparency...

  I think you are too quick at the point. The fine tuning may help a little bit of course. However, it can not resolve the issue. It can not change the order of the rendering of the surfaces of the shapes involved. No fine turning can convert ROOT into another AutoCAD system. To do that one has to split each ROOT shape by smaller parts and the render it in the proper order afterwards and/or apply some advanced OpenGL rendering technique.   Such "optimization" may significantly penalize the overall performance of the system (especially tracking / navigation portion)

Its implementation may take time as well.

Hope this helps, Valeri

>
> Regards
> Michal Dwuznik
>
> PS:Sorry again for double posting (triple in fact)...
>
> 2005/12/18, Michał Dwużnik <michal.dwuznik_at_gmail.com>:
> > Sorry, wrong macro attached, I will send the corrected version soon..
> >
Received on Tue Dec 20 2005 - 02:10:52 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:14 MET