[vtkusers] Cannot see imagedata behind transparent polydata

Mathieu P mtp.vtk at gmail.com
Wed Mar 10 12:30:38 EST 2010


Yes sorry, i am using vtkImageActor for my images,
I have all the Opengl requirements checked, and i have followed your wiki
about depthpeeling, so my options are just like in the wiki...

Cannot see my STL tough 2 images...

Thanks for the tip about using SetUseDepthPeeling(1), that's work.

Petit bonjour de France en passant,

Cordialement,

-- Mathieu PICCIN




On Wed, Mar 10, 2010 at 4:03 PM, Francois Bertel <
francois.bertel at kitware.com> wrote:

> There is no image3DActor in VTK. The only class with a similar name is
> vtkImageActor. Are you talking about this one?
>
> Does your OpenGL implementation has the required extensions?
>
> ref: http://www.vtk.org/Wiki/VTK/Depth_Peeling#Required_OpenGL_extensions
>
>
> Also, step 1 and 2 have to be called before the first render, they
> cannot be changed after that:
> 1. renderWindow->SetAlphaBitPlanes(1);
> 2. renderWindow->SetMultiSamples(0);
>
> ref: http://www.vtk.org/Wiki/VTK/Depth_Peeling#VTK_calls
>
> The other steps can be called at any time and will be effective at the
> next call the renderWindow->Render(), like:
> renderer->SetUseDepthPeeling(1);
> or
> renderer->SetUseDepthPeeling(0);
>
>
> On Wed, Mar 10, 2010 at 7:48 AM, Mathieu P <mtp.vtk at gmail.com> wrote:
> > Bonjour François,
> > I use image data into image3DActor.
> > By rendering, i just add an image3DActor into the renderer.
> > I have 2 images, and one polydata :
> >
> >       A           the camera
> > --------------      first image (opacity = 20%)
> > --------------      second image (opacity = 20%)
> > OOOOOO      polydatas
> > I can see the polydatas tough both transparent image, only if the
> polydatas
> > opacity is set to 100% (not transparent).
> > If i move my polydatas opacity to 99%, the polydata disappear behind both
> > images.
> > Second question :
> > can i activate the depth peeling after the renderer constructor. I have
> > tried to use renderer->Refresh(), and RendererWindow->Start(), but i
> cannot
> > activate depth peeling after first renderer->Render();
> >
> > Thanks a lot,
> >
> > Cordialement,
> >
> > -- Mathieu PICCIN
> >
> >
> >
> >
> > On Mon, Mar 8, 2010 at 2:36 PM, Francois Bertel
> > <francois.bertel at kitware.com> wrote:
> >>
> >> Is your imagedate 2D? 3D? How do you display your imagedata (ie what's
> >> your pipeline)?
> >> If your imagedata is 3D and by "displaying imagedata" you mean volume
> >> rendering, then no you cannot mixed translucent polygonal geometry and
> >> volume rendering.
> >>
> >> On Mon, Mar 8, 2010 at 8:05 AM, Mathieu P <mtp.vtk at gmail.com> wrote:
> >> > Hi,
> >> >
> >> > I have done some tests, and i can see image data behind transparent
> >> > polydata, but i cannot see polydata behind transparent image data with
> >> > depth
> >> > peeling method !
> >> >
> >> > It's very strange because without depthpeeling, it's workling well
> both
> >> > sides.
> >> >
> >> >
> >> > Cordialement,
> >> >
> >> > -- Mathieu PICCIN
> >> >
> >> >
> >> >
> >> >
> >> > On Thu, Mar 4, 2010 at 10:22 AM, Mathieu P <mtp.vtk at gmail.com> wrote:
> >> >>
> >> >> Martin,
> >> >>
> >> >> The solution of using depth peeling doesnt come from me, but from
> >> >> Francois
> >> >> Bertel, from KitWare.
> >> >> I dont know how do make depth peeling working with transparent
> >> >> polygons...
> >> >>
> >> >>
> >> >>
> >> >> Cordialement,
> >> >>
> >> >> -- Mathieu PICCIN
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Thu, Mar 4, 2010 at 9:31 AM, Martin Allerstorfer
> >> >> <allerstorfer_martin at gmx.at> wrote:
> >> >>>
> >> >>> But the biggest problem I have at the moment is that I cannot see
> the
> >> >>> imagedata behind transparent polygons? Sorry for writting so many
> >> >>> questions
> >> >>> but it is quite urgent for me.
> >> >>>
> >> >>> Thank you so much,
> >> >>> Martin
> >> >>>
> >> >>> > I just found out that it works also with imagedata but only for
> >> >>> > certain
> >> >>> > distances.
> >> >>> > If I zoom into the imagedata suddenly polydata is shown behind
> >> >>> > imagedata,
> >> >>> > but it should be the other way round.
> >> >>> > Is there an additional parameter to define the distance where
> depth
> >> >>> > peeling starts?
> >> >>> >
> >> >>> > Thanks,
> >> >>> > Martin
> >> >>> >
> >> >>> > > Datum: Thu, 04 Mar 2010 08:45:38 +0100
> >> >>> > > Von: "Martin Allerstorfer" <allerstorfer_martin at gmx.at>
> >> >>> > > An: vtkusers at vtk.org
> >> >>> > > Betreff: [vtkusers] Cannot see imagedata behind transparent
> >> >>> > > polydata
> >> >>> >
> >> >>> > > Thanks for all the answers! Mathieu, your suggestion using depth
> >> >>> > > pealing
> >> >>> > > works for polydata, but if I want to use imagedata in the same
> >> >>> > > renderer
> >> >>> > > depth calculation does not work between polydata and imagedata?
> A
> >> >>> > solution for
> >> >>> > > this problem would be great!
> >> >>> > >
> >> >>> > > Thanks,
> >> >>> > > Martin
> >> >>> > >
> >> >>> > > >Dealing with non opaque geometry requires sorting the polygon
> to
> >> >>> > > > be
> >> >>> > > >rendered. It would be extremely slow if it was
> >> >>> > > >activated by default.
> >> >>> > > >
> >> >>> > > >Try to use depth peeling. Follow these steps:
> >> >>> > > >
> >> >>> > > >http://www.vtk.org/Wiki/VTK/Depth_Peeling#VTK_calls
> >> >>> > > >
> >> >>> > > >You need OpenGL>=2.0 for it to work.
> >> >>> > > >
> >> >>> > > >On Wed, Mar 3, 2010 at 12:35 PM, Mathieu P <mtp.vtk at
> gmail.com>
> >> >>> > wrote:
> >> >>> > > >> I have attached a small image illustrating my problem.
> >> >>> > > >>
> >> >>> > > >> I cannot believe VTK cannot manage object opacity !
> >> >>> > > >>
> >> >>> > > >> Thanks for help.
> >> >>> > > >>
> >> >>> > > >>
> >> >>> > > >> Cordialement,
> >> >>> > > >>
> >> >>> > > >> -- Mathieu PICCIN
> >> >>> > > >>
> >> >>> > > >>
> >> >>> > > >>
> >> >>> > > >>
> >> >>> > > >> On Wed, Mar 3, 2010 at 4:50 PM, Mathieu P <mtp.vtk at
> >> >>> > > >> gmail.com>
> >> >>> > wrote:
> >> >>> > > >>>
> >> >>> > > >>> Actually i am using vtkImageActor and i change their opacity
> >> >>> > > >>> with
> >> >>> > > >>> setOpacity...
> >> >>> > > >>>
> >> >>> > > >>>
> >> >>> > > >>> Cordialement,
> >> >>> > > >>>
> >> >>> > > >>> -- Mathieu PICCIN
> >> >>> > > >>>
> >> >>> > > >>>
> >> >>> > > >>>
> >> >>> > > >>>
> >> >>> > > >>> On Wed, Mar 3, 2010 at 3:57 PM, Mathieu P <mtp.vtk at
> >> >>> > > >>> gmail.com>
> >> >>> > > wrote:
> >> >>> > > >>>>
> >> >>> > > >>>> Same kind of problem here :
> >> >>> > > >>>>
> >> >>> > > >>>> I have two imageData :
> >> >>> > > >>>>
> >> >>> > > >>>> Image data A loaded first
> >> >>> > > >>>> Image data B loaded after
> >> >>> > > >>>>
> >> >>> > > >>>> i modify the opacity to 50% for both image data.
> >> >>> > > >>>> i can see tough the image data B, so the last loaded, but i
> >> >>> > > >>>> cannot
> >> >>> > > see
> >> >>> > > >>>> toughthe image data A, the first loaded.
> >> >>> > > >>>> Modifying the opacity of the forst loaded change only its
> >> >>> > luminosity
> >> >>> > > (or
> >> >>> > > >>>> alpha).
> >> >>> > > >>>>
> >> >>> > > >>>>
> >> >>> > > >>>> Cordialement,
> >> >>> > > >>>>
> >> >>> > > >>>> -- Mathieu PICCIN
> >> >>> > > >>>>
> >> >>> > > >>>>
> >> >>> > > >>>>
> >> >>> > > >>>>
> >> >>> > > >>>> On Wed, Mar 3, 2010 at 3:03 PM, Martin Allerstorfer
> >> >>> > > >>>> <allerstorfer_martin at gmx.at> wrote:
> >> >>> > > >>>>>
> >> >>> > > >>>>> Hi,
> >> >>> > > >>>>>
> >> >>> > > >>>>> In my rendering view I would like to show imagedata and
> >> >>> > additionally
> >> >>> > > >>>>> some information using transparent glyphs. But not all
> >> >>> > > >>>>> glyphs
> >> >>> > > >>>>> have
> >> >>> > > the same
> >> >>> > > >>>>> transparency. So I change the color and alpha settings for
> >> >>> > > >>>>> each
> >> >>> > cell
> >> >>> > > of the
> >> >>> > > >>>>> glyphs seperately. Unfortunately now I cannot see the
> volume
> >> >>> > behind
> >> >>> > > the
> >> >>> > > >>>>> transparent polydata. Does anybody know how to solve this
> >> >>> > > >>>>> problem?
> >> >>> > > >>>>>
> >> >>> > > >>>>> Thanks,
> >> >>> > > >>>>> Martin
> >> >>> > > >>>>> --
> >> >>> > > >>>>> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> >> >>> > > >>>>> Jetzt freischalten unter
> >> >>> > > >>>>> http://portal.gmx.net/de/go/maxdome01
> >> >>> > > >>>>> _______________________________________________
> >> >>> > > >>>>> 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
> >> >>> > > >>>>
> >> >>> > > >>>
> >> >>> > > >>
> >> >>> > > >>
> >> >>> > > >> _______________________________________________
> >> >>> > > >> 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
> >> >>> > > >>
> >> >>> > > >>
> >> >>> > >
> >> >>> > >
> >> >>> > > --
> >> >>> > > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> >> >>> > > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> >> >>> > > _______________________________________________
> >> >>> > > 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
> >> >>> >
> >> >>> > --
> >> >>> > Sicherer, schneller und einfacher. Die aktuellen Internet-Browser
> -
> >> >>> > jetzt kostenlos herunterladen!
> http://portal.gmx.net/de/go/chbrowser
> >> >>> > _______________________________________________
> >> >>> > 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
> >> >>>
> >> >>> --
> >> >>> Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
> >> >>> jetzt kostenlos herunterladen!
> http://portal.gmx.net/de/go/atbrowser
> >> >>> _______________________________________________
> >> >>> 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
> >> >>
> >> >
> >> >
> >> > _______________________________________________
> >> > 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
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> François Bertel, PhD  | Kitware Inc. Suite 204
> >> 1 (518) 371 3971 x113 | 28 Corporate Drive
> >>                      | Clifton Park NY 12065, USA
> >> _______________________________________________
> >> 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
> >
> >
>
>
>
> --
> François Bertel, PhD  | Kitware Inc. Suite 204
> 1 (518) 371 3971 x113 | 28 Corporate Drive
>                      | Clifton Park NY 12065, USA
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100310/2334b573/attachment.htm>


More information about the vtkusers mailing list