[vtkusers] Visible-surface determination

Andres Barrera andresba at hotmail.com
Tue Jun 18 21:25:49 EDT 2002


   This question is not exactly related with the problem presented by Simon, 
but it looks you can help me...
  - Given a surface made out of triangles, there is any way I can get the 
intensity of light from each visible triangle by using VTK, or should I 
implement some ray-casting myself?

  Thank you very much for your help

     Andres



>From: David Gobbi <dgobbi at irus.rri.ca>
>To: Simon Faust <simon.faust at post.rwth-aachen.de>
>CC: VTK Mailing List <vtkusers at public.kitware.com>
>Subject: Re: [vtkusers] Visible-surface determination
>Date: Tue, 18 Jun 2002 17:17:35 -0400 (EDT)
>MIME-Version: 1.0
>Received: from [24.97.130.19] by hotmail.com (3.2) with ESMTP id 
>MHotMailBED8EF6800B84004325818618213E9000; Tue, 18 Jun 2002 14:22:12 -0700
>Received: from public.kitware.com (localhost [127.0.0.1])by 
>public.kitware.com (Postfix) with ESMTPid 4A6C21ABF3; Tue, 18 Jun 2002 
>17:18:04 -0400 (EDT)
>Received: from theremin.irus.rri.on.ca (theremin.irus.robarts.ca 
>[198.20.40.10])by public.kitware.com (Postfix) with ESMTP id 233361AA40for 
><vtkusers at public.kitware.com>; Tue, 18 Jun 2002 17:17:52 -0400 (EDT)
>Received: from banquo.irus.robarts.ca (banquo.irus.robarts.ca 
>[198.20.41.50])by theremin.irus.rri.on.ca (8.11.6/8.11.6) with ESMTP id 
>g5ILHbk24850;Tue, 18 Jun 2002 17:17:37 -0400 (EDT)
>From vtkusers-admin at public.kitware.com Tue, 18 Jun 2002 14:22:41 -0700
>Delivered-To: vtkusers at public.kitware.com
>X-X-Sender:  <dgobbi at banquo.irus.robarts.ca>
>In-Reply-To: <3D0F9EAA.7030906 at post.rwth-aachen.de>
>Message-ID: 
><Pine.LNX.4.33.0206181709260.4381-100000 at banquo.irus.robarts.ca>
>Sender: vtkusers-admin at public.kitware.com
>Errors-To: vtkusers-admin at public.kitware.com
>X-BeenThere: vtkusers at public.kitware.com
>X-Mailman-Version: 2.0.9
>Precedence: bulk
>List-Help: <mailto:vtkusers-request at public.kitware.com?subject=help>
>List-Post: <mailto:vtkusers at public.kitware.com>
>List-Subscribe: 
><http://public.kitware.com/mailman/listinfo/vtkusers>,<mailto:vtkusers-request at public.kitware.com?subject=subscribe>
>List-Id: <vtkusers.public.kitware.com>
>List-Unsubscribe: 
><http://public.kitware.com/mailman/listinfo/vtkusers>,<mailto:vtkusers-request at public.kitware.com?subject=unsubscribe>
>List-Archive: <http://public.kitware.com/pipermail/vtkusers/>
>
>Hi Simon,
>
>The opacity is what is causing the problem.  The depth buffer method
>that OpenGL (and most graphics toolkits) use to figure out which object
>are in front of other objects does not work properly unless everything
>in the scene is opaque.
>
>The solution is to make sure that polygons are rendered back to front,
>so that the rendering does not have to rely on the depth buffer.  The
>vtkDepthSortPolyData filter can sort the polygons in an actor
>back-to-front, but this only works if you have only one transparent
>actor in the scene.
>
>If you have more than one transparent actor, then each time you render
>you have to remove all the actors from the renderer, and then add them
>back to the renderer in back-to-front order.
>
>  - David
>
>--
>   David Gobbi, MSc                       dgobbi at irus.rri.ca
>   Advanced Imaging Research Group
>   Robarts Research Institute, University of Western Ontario
>
>On Tue, 18 Jun 2002, Simon Faust wrote:
>
> > Hi David,
> > thanks for your help. When I try to call ResetCameraClippingRange,
> > nothing seems to happen. Only when I try to set the clipping range
> > manually the effect disappears. The objects of the foreground (roof) are
> > rendered, but as they were located in the background, i.e. the faces of
> > the roof that are not covered by the floor (that actually should be
> > covered by the roof) are displayed. Another aspect might be that the
> > effect does not occur when opacity is set to1 (still testing that).
> > ciao Simon
> >
> > David Gobbi wrote:
> >
> > >Hi Simon,
> > >
> > >The problem is probably not that the floor 'jumps in front of' the
> > >roof, it is more likely that the roof is positioned in front of the
> > >near clipping plane and is not being rendered.
> > >If you do a ResetCameraClippingPlanes before each render the problem
> > >should go away (as long as roof does not end up behind the camera).
> > >
> > >Cheers,
> > > - David
> > >
> > >--
> > >  David Gobbi, MSc                       dgobbi at irus.rri.ca
> > >  Advanced Imaging Research Group
> > >  Robarts Research Institute, University of Western Ontario
> > >
> > >On Tue, 18 Jun 2002, Simon Faust wrote:
> > >
> > >>Hi,
> > >>I use vtkTkRenderWidget in order to display several objects that
> > >>alltogether form a building with some installations in it. Problem ist
> > >>that objects that should not be visible (i.e. the floor of a room when
> > >>your viewpoint is over the roof) "jump" into the foreground and 
>overlay
> > >>objects that should be visible. The error occurs when rotating or
> > >>zooming around/in the scene. Any hints welcome.
> > >>Simon
> > >>
> > >>
> > >>_______________________________________________
> > >>This is the private VTK discussion list.
> > >>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
> > >>Follow this link to subscribe/unsubscribe:
> > >>http://public.kitware.com/mailman/listinfo/vtkusers
> > >>
> > >
> > >
> > >
> >
> >
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.




More information about the vtkusers mailing list