Re: visualization of composite shape

From: Andrei Gheata <Andrei.Gheata_at_cern.ch>
Date: Mon, 9 Jun 2008 09:39:58 +0200


Hi Sue,

Indeed, when clipping composite shapes (this one also) using a plane or a box you can get visualization artifacts. I CC-ed Timur who adapted the CSG visualization algorithm for GL and who may give an answer, but my suspicion is that problems come from the fact that the direction of the normal vector to inner surfaces gets (or is interpreted) wrong by the viewer.

Best,
Andrei

Susan Kasahara wrote:
> Thanks Andrei, and I didn't know about the TGeoManager::SetNsegment option
> to improve the visualization - this is quite useful.
> The problem that I'm having with the visualization of the TGeoCompositeShape
> can only be viewed when using a clipping plane to open up and visualize the
> inside of the volume built from the composite shape. In the example I sent,
> I used a clipping plane in Z to see the unwanted plane at the edge where the
> box boundary meets that of the elliptical tube major axis. Do you also see
> this problem?
> Thanks again,
> -Sue
>

>> Hi Sue,
>>
>> Well, I cannot reproduce... After adding gGeoManager->CloseGeometry() to
>> your macro and enhancing the eliptical tube, I got the attached picture
>> that is perfectly normal...
>>
>> Best,
>> Andrei
>>
>> Susan Kasahara wrote:
>>> Hi root talk,
>>> I've built a shape using TGeoCompositeShape and I have noticed a problem
>>> in visualizing a volume built from the shape using OpenGL which is that
>>> the visualization contains an unwanted plane at the boundary of the two
>>> union-ized shapes consisting of a TGeoEltu and a TGeoBBox.
>>> I've appended a script that builds the composite shape, and a picture
>>> rendered using openGL of the volume with a clipping plane to open up
>>> the inside of the shape to see the unwanted plane at the top of the TGeoBBox.
>>>   Is this a bug? Otherwise, is there a better way to build this shape
>>> to avoid the visualization problem?  This shape is used in a monte
>>> carlo simulation using VMC, so performance is also important.
>>>   I'm using root v5.18/00c.
>>> Thanks!
>>> -Sue
>>>
>>>
>>> ------------------------------------------------------------------------
>>>

>
Received on Mon Jun 09 2008 - 09:40:02 CEST

This archive was generated by hypermail 2.2.0 : Mon Jun 09 2008 - 11:50:02 CEST