[vtkusers] RemoveViewProp then AddViewProp of same actor changes results?

Ken Martin ken.martin at kitware.com
Thu Jan 19 17:19:08 EST 2017


I believe it is unsorted in that it is rendered in the order the props are
added (not sorted by some other metric). Opaque actors get rendered before
translucent, but if you have multiple translucent actors they are rendered
in the order added. I suppose you could

renderer->GetViewProps()->InsertItem(loc, yourActor);

if you know what location you want.



On Thu, Jan 19, 2017 at 5:05 PM, Sean McBride <sean at rogue-research.com>
wrote:

> On Thu, 19 Jan 2017 16:59:09 -0500, Ken Martin said:
>
> >It should be the same unless any of the actors are coincident or
> >translucent. In that case the order of the actors can make a difference.
> >alpha blending for transparency is order dependent and with coincident
> >geometry either first or last wins (I forget which in VTK). Not sure if
> >that applies in your example.
>
> The green thing in my screenshot is indeed translucent.  Making it fully
> opaque indeed "fixes" the problem.
>
> I don't think I have anything coincident, though things overlap.
>
> So how do I control the order?  vtkViewport.h has AddViewProp() but I
> don't see any API to, for example, add it first or last.  And
> vtkPropCollection's docs say that it's 'unsorted'.
>
> Thanks Ken!
>
> Sean
>
>
>


-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170119/c77fea4b/attachment.html>


More information about the vtkusers mailing list