[vtkusers] How to use backface culling with polylines
Donny
donnyz at charter.net
Thu Nov 18 20:17:56 EST 2010
Thanks guys for the feedback. I have attached two images to visualize what
follows. I hope I can explain this clearly.
I have three renderers that I am adding to the render window.
The first is to contain a textured vtkGlobeSource actor and is called the
background renderer.
The second contains several vtkPolyData actors and are lines (State and
county boundaries, roads, rivers
), this is called the map renderer.
The Third contains an actor visualizing a weather radar volume, this is
called the radar renderer.
The background renderer is always set as layer 0 and so is always rendered
first.
The map renderer and radar renderer will alternate between the 1st and 2nd
layers depending on the view angle of the camera.
If the camera is more than 45 degrees above the horizon then the radar
renderer is layer 1 and the map renderer is layer 2 so that the user can see
the features below the radar volume.
If the camera is less than or equal to 45 degrees above the horizon then the
map renderer is layer 1 and the radar renderer is layer 2 so that the radar
volume is always in front of the map features.
This works fine until I draw all state lines for the entire US. Because the
vtkGlobeSource simulates the curvature of the earth I see the backside of
the state lines where they are over the view horizon.
Is there a way I can put the map features and radar volume on the same
renderer and accomplish the same thing?
Thanks.
-----Original Message-----
From: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
Sent: Thursday, November 18, 2010 8:37 AM
To: David Gobbi
Cc: vtkusers at vtk.org; Donny
Subject: Re: [vtkusers] How to use backface culling with polylines
Donny,
Were you talking about hidden lines removal may be?
Thanks,
On Thu, Nov 18, 2010 at 9:03 AM, David Gobbi <david.gobbi at gmail.com> wrote:
Jerome is correct, OpenGL culls faces according to the polygon
winding. So wireframe polygons can be culled, but polylines cannot,
even if they have normals assigned to them. There are some details in
the OpenGL FAQ:
http://www.opengl.org/resources/faq/technical/clipping.htm
David
On Wed, Nov 17, 2010 at 11:47 PM, Jérôme <jerome.velut at gmail.com> wrote:
> Hi Donny,
>
> My feeling is that backface culling should not work with polylines because
they
> have actually no face.
>
> Jerome
>
> 2010/11/18 Donny <donnyz at charter.net>:
>> I am drawing polylines using vtkPolyData and cannot get backface culling
to
>> work with them.
>>
>>
>>
>> I ran into this subject
>> http://public.kitware.com/pipermail/vtkusers/2003-January/065023.html ,
but
>> did not help.
>>
>>
>>
>> Any solutions?
>>
>>
>>
>> Donny Zimmerman
>>
>> donnyz at charter.net
>>
>> 308-227-1756
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
--
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101118/195a63a2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: radar2.jpg
Type: image/jpeg
Size: 64058 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101118/195a63a2/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: radar1.jpg
Type: image/jpeg
Size: 77189 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101118/195a63a2/attachment-0001.jpg>
More information about the vtkusers
mailing list