Layered rendering with multiple renderers

Hello developers,

I am stuck in a problem that seems a bit basic but still could not solve it yet.

I am using multiple rendering layers to render different kinds of Fiber tracts (Red and orange) overlaid each other. As shown in the Figure below. Red fibers are rendered always on the top of the orange fibers as they are rendered on another renderer.

image

This is what I needed and it worse really well. The problem rises when I visualize slices on the ordering window. Since the slices are rendered on the bottom layer, the red fibers are always rendered on the top and slices are not cutting those fibers. This is due to the fact that red fibers are rendered on the top.

image

Now I want some suggestions on how to solve this problem? I want the slices to cut all the fibers regardless of their rendering layers. Please note that I always want red fibers on the top of orange.

Are their any other method to achieve this?
Thanks.

@lassoan Can you help me with this, Thanks in advance, :slight_smile:

By using layers, you would degrade your true 3D rendering to something like 2.5D rendering. If you want to make the red tracts always appear in front of orange then you can simply display red tracts using 1% larger diameter tubes than orange tubes.

Thanks for your response @lassoan , the red tubes are actually center tubes and they lie between yellow tubes. Since the number of yellow tubes is very large. you cannot see the red ones due to occlusion. To remedy this, I rendered red tubes in another rendering layer. This is what I needed.

The problem occurs when I add slices. Since slices are not able to cut red tubes as they are in another rendering layer.

Do you have any solution such that the red tubes rendered on the top of yellow tubes and at the same time slices should be able to cut all the tubes?

I hope I am clear. looking forward to your response.

If you add a layer then it improperly occludes everything - not just slices but everything else that Slicer can display (models, markups, segmentations, etc.). Adding a new rendering layer solves one problem and introduces many other problems that may be much harder to resolve.

Instead of breaking occlusion computation, I would suggest to experiment with the followings:

  • Make sure the red tubes are always visible by making orange tubes semi-transparent.
  • Change coincident topology offset parameters in the mapper (for example, use SetRelativeCoincidentTopologyPolygonOffsetParameters to push back the orange tracts)
  • Ask for more advice on the VTK forum

Thank you so much for your suggestions @lassoan . I will try them.