[vtkusers] transparent 3D over 2D
Chris Volpe ARA/SED
cvolpe at ara.com
Fri Jul 8 17:22:20 EDT 2011
David-
Unless I have misunderstood something, the image rendering is clearly being done first, because I have SetDisplayLocationToBackground() on the Actor2D's property. If my geometry were not being rendered in the translucent pass (I didn't even know there *was* a "translucent pass" - thanks for the info!), would I still be able to see one piece of geometry through another?
Anyway, I tried what you said - setting the opacity to .995 on the geometry's actor's property - and that made it worse. Now, all of a sudden, the image is no longer drawn in the background - it's obscuring all the geometry.
Does the order in which the Actors and Actor2Ds get added to the renderer matter?
Thanks,
-Chris
From: David Gobbi [mailto:david.gobbi at gmail.com]
Sent: Friday, July 08, 2011 3:12 PM
To: Chris Volpe ARA/SED
Cc: vtkusers
Subject: Re: [vtkusers] transparent 3D over 2D
Then the problem is the order in which the items are rendered. Perhaps your geometry is not being rendered in the translucent pass. If you set the Opacity in the property to 0.995, that will force the geometry to be rendered in the translucent pass, i.e. after all opaque geometry has already rendered. It is the Opacity of the property, rather than the alpha of the lookup table, that VTK uses to decide whether to use the translucent pass.
What is probably happening in your case is that the geometry is rendered first, causing a write to the depth buffer. Then the image is drawn afterwards, and the depth buffer check causes it not to be written to any pixels that the geometry rendered to.
- David
On Fri, Jul 8, 2011 at 12:29 PM, Chris Volpe ARA/SED <cvolpe at ara.com<mailto:cvolpe at ara.com>> wrote:
If depth peeling is something that's off by default, unless you explicitly enable it, then I'm not doing it. (In fact, I've never heard of it.) I just have 3D geometry with a color lookup table that varies the hue but keeps alpha constant at 0.5.
-Chris
> -----Original Message-----
> From: David Gobbi [mailto:david.gobbi at gmail.com<mailto:david.gobbi at gmail.com>]
> Sent: Friday, July 08, 2011 12:43 PM
> To: Chris Volpe ARA/SED
> Cc: vtkusers
> Subject: Re: [vtkusers] transparent 3D over 2D
>
> Are you using depth peeling? Depth peeling disables alpha, it is an
> alternate strategy to translucent rendering that doesn't use alpha and
> as far as I understand, it actually requires alpha-blending to turned
> off in order to work.
>
> So I don't think that depth peeling can be used when an underlay is
> present (or at least, not in VTK).
>
> - David
>
>
> On Fri, Jul 8, 2011 at 10:32 AM, Chris Volpe ARA/SED <cvolpe at ara.com<mailto:cvolpe at ara.com>>
> wrote:
> > I'm rendering 3D geometry over a 2D image drawn onto the rendering
> window
> > using an Actor2D. The 3D geometry is semi transparent, as can be
> seen when
> > some 3D geometry is drawn on top of other 3D geometry. However, the
> > transparency does not permit seeing the background image through the
> 3D
> > geometry. For purposes of the background image, the 3D geometry is
> > completely opaque. Is this an inherent limitation, or am I doing
> something
> > wrong?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Chris
> >
> > --
> > Christopher R. Volpe,
> > Ph.D.
> Email:
> > cvolpe at ara.com<mailto:cvolpe at ara.com>
> >
> > Senior Scientist, Information Exploitation Systems Main
> Desk:
> > 919-582-3300<tel:919-582-3300>
> >
> > Applied Research Associates,
> > Inc Direct: 919-
> 582-3380
> >
> > 8537 Six Forks Rd., Suite
> > 6000 Fax :
> > 919-582-3301<tel:919-582-3301>
> >
> > Raleigh, NC 27615 Web:
> > http://www.ara.com/offices/NC.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110708/7103e3db/attachment.htm>
More information about the vtkusers
mailing list