object render order

Ron Inbar rinbar at netvision.net.il
Fri Sep 17 18:04:12 EDT 1999


Hello Bryan!

I think your problem has more to do with the depth buffer than with
transparency.  You say that simply zooming out gives bad results, and this
seems to indicate that the problem stems from a change in the values of the
back and front clipping planes, or some other change in the depth buffer
configuration.  Let me ask you two questions:

1. Is the scene restored correctly when you zoom back in?
2. Is it possible that the two actors are very close together at the point
where the artifacts appear?

If you answered "yes" to both questions, then the problem is probably with
the z-buffer.  I know how to solve this problem directly from OpenGL, but
unfortunately I don't know yet how to implement this solution under VTK.
I'll try to look it up.  In the mean time, please let me know if what I said
makes sense to you.

As for the render order, it is absolutely essential that you draw the
translucent actor after the other ones.

Ron

P.S., OpenGL handles translucency using alpha blending.  Alpha blending is
not an optically correct method; it's just a trick.  As far as I know,
there's no object-order rendering method that handles translucency in a way
that's physically correct.  To do this you'd probably have to use some sort
of ray tracing.

----- Original Message -----
From: Yves Starreveld <ystarrev at macserver.irus.rri.on.ca>
To: Tim Hutton <T.Hutton at eastman.ucl.ac.uk>
Cc: <vtkusers at gsao.med.ge.com>
Sent: Wednesday, September 15, 1999 16:02
Subject: Re: object render order


> Hi Tim, Bryan,
> I ran into this also. There is no per-polygon sorting which takes
> opacity into account (unless you use ATI board on a Mac - there is an
> agl_ extension to solve it there)
> The depth buffer draws the frontmost, transparent polygon, but then
> not the deeper one you should be able to see behind it.
> I hacked around this by manually sorting vtkActors in a vtkRenderer
> such that the most transparent are drawn last.
> This will not work on complex actors where one of two slightly
> translucent actors is not always either in front or behind the other.
> Yves
>
> Yves Starreveld
> Robarts Research Institute,
> London, Ontario, Canada
>
> >
> > As I understand it, transparency is not properly implemented in
> OpenGL, I
> > too have seen odd behaviours. I don't know how to get round this, or
> > whether it is generally regarded as a bug.
> >
> > At 13:31 14/09/99 -0500, Bryan VanDeVen wrote:
> > >
> > >I seem to be having some troubles with object order.  I have an
> > >application that displays an isosurface of sonar signal excess along
> > >with the underlying bathymetry (a warped grid).   At certain view
> > >angles, the surface can be seen (correctly) above the basin actor.
> > >However, when a user starts interacting, things run afoul.  Some
> of the
> > >polygons that make up the warped grid basin begin to "pop up front" in
> > >front of the isosurface as the scene is rotated.  In fact
> starting from
> > >a view straight down with all of the basin correctly behind the
> > >isosurface, just zooming straight out will produce this behaviour
> where
> > >the basin starts to appear "above" the isosurface.
> > >
> > >I'm willing to believe that perhaps the basin and the surface
> aren't as
> > >precisely lined up as could be, but it seems to me scenes should still
> > >render consistently (right or wrong) through rotations and zooming,
> > >maintaining initial relative positions even if they are off.
> > >
> > >This happens whether the basin is opaque or semi-transparent,
> stripping
> > >or decimating the grid does not seem to give any change, and the order
> > >in which I add the actors does not seem to matter either.
> > >
> > >Someone please tell me I am overlooking something simple and stupid :)
> > >Any and all advice is very welcome.
> > >
> > >TIA,
> > >
> > >--
> > >Bryan Van de Ven
> > >Applied Research Labs
> > >University of Texas, Austin
> > >
>
>
> --------------------------------------------------------------------------
---
> This is the private VTK discussion list.  Please keep messages on-topic.
> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at gsao.med.ge.com>.  For help, send message body containing
> "info vtkusers" to the same address.     Live long and prosper.
> --------------------------------------------------------------------------
---
>
>



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list