[vtkusers] Render order - Depth sorting volumes

Karthik Krishnan karthik.krishnan at kitware.com
Wed Oct 12 11:11:51 EDT 2011


Simon:

You don't need to use depth peeling. The bounds of your volumes don't
overlap. Just set the culler's sorting mode to back to front (default is
none) and everything should work out of the box... something like :

renderer->GetCullers()->GetLastItem()->SetSortingStyleToBackToFront();
renderer->AddVolume(vol1);
renderer->AddVolume(vol2);

--
karthik

On Wed, Oct 12, 2011 at 5:49 PM, Simon Adler <vtk at cg-effects.de> wrote:

> Dear Members,
>
> how can i change the order in which volumes are rendered. Or more in
> general - how can i change the order objects are rendered (not cells
> within objects).
>
> Concrete Problem:
> I have to Volumerenderings close to each other but not overlapping. I
> do not want to use Depth peeling, due to performance reasons. I just
> want to change the order how the are rendered depening on the current
> camera position.
>
> I tried...
> ... to sort the vtkVolumeCollection got from the renderer, but this
> has no effect.
>
> My renderer is a vtkOpenGLRenderer. Volumes are represented by
> vtkSmartVolumeMapper.
>
> Thanks for any advice
>
> Simon Adler
> _______________________________________________
> 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/20111012/75ee6220/attachment.htm>


More information about the vtkusers mailing list