[vtk-developers] Why Translucent objects can't be picked ?

Julian Ibarz julian.ibarz at gmail.com
Thu Jun 12 05:46:21 EDT 2008


I say a wrong thing : the picking is well done (it's just because i make an
highlight that is a copy of my selected object in the same place and the
blending is done so the highlight color is blended and is not red but grey).

I made screenshots to show you the different problems i encounter. Think
that the different picking are maded by vtkVisibleCellSelection in CELL
SELECTION MODE :

        vtkVisibleCellSelector selector = new vtkVisibleCellSelector();
        selector.SetRenderer(canvas.GetRenderer());
        selector.SetArea(firstPoint[0], firstPoint[1], secondPoint[0],
                secondPoint[1]);
        selector.SetRenderPasses(0, 1, 0, 0, 1, 0);

        canvas.lock();
        selector.Select();
        canvas.unlock();


In this screenshot you can see the picking done and the highlight maded by
changing the color of the actor :

http://ibarz.julien.free.fr/images/pick/pick1.png

In this screenshot you can see the highlight of the cell selected and the
highlight is a copy of the previous actor with only the cell selected (the
blend is made so the color is not red but grey) :

http://ibarz.julien.free.fr/images/pick/pick2.png

And in this screenshot you can see that i pick an actor that is normally not
visible (it's highlighted in red but because a translucent actor is behind
him it is blended and rendered in opaque grey). I don't understand why it's
selected because normally in the pick rendering color it is not visible
(because in pick color rendering the alpha is not used) :

http://ibarz.julien.free.fr/images/pick/pick3.png

Do you know why in the third screenshot i select an unvisible actor ?

2008/6/12 Julian Ibarz <julian.ibarz at gmail.com>:

> Hello,
>
> I'm doing a CAD viewer and for seeing internal pieces of an object i make
> the englobant pieces of the object translucent. But i want to pick this
> pieces with pick color. For some reason i don't know the translucent objects
> are not drawn in the pick color rendering. I made a trick to render them
> (changing vtkRenderer::UpdateGeometryForSelection()) and i see a difference
> : the translucent geometry becames opaque when they are picked but the
> picking results doesn't have them so my problem is not solved but it shows
> that we can if we want pick the translucent geometries.
>
> So my question is : why we can't decide to make the translucent geometries
> picked or not (with a flag in the pickers) ?
>
> --
> Julian Ibarz




-- 
Julian Ibarz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080612/f3aa234c/attachment.html>


More information about the vtk-developers mailing list