# Adding secondary rays and complex illumination methods to volumetric rendering

**URL:** https://discourse.vtk.org/t/adding-secondary-rays-and-complex-illumination-methods-to-volumetric-rendering/8214
**Category:** Development
**Tags:** proposal
**Created:** [April 5, 2022, 7:21am UTC](https://discourse.vtk.org/t/adding-secondary-rays-and-complex-illumination-methods-to-volumetric-rendering/8214 "2022-04-05T07:21:36Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [April 6, 2022, 5:40pm UTC](https://discourse.vtk.org/t/adding-secondary-rays-and-complex-illumination-methods-to-volumetric-rendering/8214/13 "2022-04-06T17:40:04Z")

</div>

> [@gthev](#):
>
> We are trying to integrate multiple-scattering effects as well as physically correct shading and shadows.

This sounds awesome. Really looking forward to more realistic-looking lighting for volume rendering.

> [@gthev](#):
>
> We have selected four methods and would like to share our results.
> 
> Here are the results we obtained with VTK’s current shader:

I cannot interpret the images posted at the top. The volume rendering settings do not seem to be set to for visualizing either bones or any soft tissues.

# Example rendering results that we would like to get

CT rendering - from [https://discourse.vtk.org/t/bvtknodes-photorealistic-rendering-of-vtk-data-in-blender/3268/14](https://discourse.vtk.org/t/bvtknodes-photorealistic-rendering-of-vtk-data-in-blender/3268/14):

 ![](https://discourse.vtk.org/uploads/default/original/2X/c/cd7bdac0eb6c123683799ff756cd9daa696112b0.jpeg)

CT rendering - from [https://discourse.vtk.org/t/bvtknodes-photorealistic-rendering-of-vtk-data-in-blender/3268/16](https://discourse.vtk.org/t/bvtknodes-photorealistic-rendering-of-vtk-data-in-blender/3268/16):

 ![](https://discourse.vtk.org/uploads/default/original/2X/5/54da83f1f7faa06838a5edf5733d9658ee6f9b01.jpeg)

3D obstetric ultrasound rendering - from [https://www.philips.co.uk/healthcare/resources/feature-detail/ultrasound-truevue-imaging](https://www.philips.co.uk/healthcare/resources/feature-detail/ultrasound-truevue-imaging):

 ![image](https://discourse.vtk.org/uploads/default/original/2X/b/bec5d9ef808e11f0bcbd6e76d0f204fa2649db17.jpeg)

3D cardiac ultrasound rendering - from [https://www.philips.com/a-w/about/news/archive/blogs/innovation-matters/20191113-five-innovations-that-are-shaping-the-future-of-image-guided-therapy.html](https://www.philips.com/a-w/about/news/archive/blogs/innovation-matters/20191113-five-innovations-that-are-shaping-the-future-of-image-guided-therapy.html):

 ![image](https://discourse.vtk.org/uploads/default/original/2X/b/b5a6e808ada164b86639880434e4880efa57edcc.jpeg)

The 3D cardiac CT image that is rendered above is available [here](https://github.com/lassoan/PublicTestingData/releases/download/data/CTACardio.nrrd). I can also provide 4D cardiac ultrasound volumes that should be possible to render similarly as the 3D cardiac ultrasound rendering example above.

# Potential ideas for improvements

The ideas behind the new illumination methods were not described in this post, and the renderings posted so far are not very informative yet, so I cannot comment on the proposed new methods. instead, I have two suggestions for hugely improving volume rendering appearance, without increasing rendering time, and requiring only small development effort.

Since surfaces and their normal can be estimated directly from 3D volumes, it may be feasible to port these two VTK rendering features that are currently available only for surface rendering:

1. Screen-space ambient occlusion (SSAO): it would serve as a very simple, inexpensive approximation of complicated global illumination methods ([https://discourse.slicer.org/t/new-feature-surface-rendering-with-ambient-shadows-for-improved-depth-perception/16903](https://discourse.slicer.org/t/new-feature-surface-rendering-with-ambient-shadows-for-improved-depth-perception/16903))

 ![](https://discourse.vtk.org/uploads/default/original/2X/d/d08119283dab055d945e5326b4e04e87fa03b77e.jpeg)

1. Image-based lighting: for example a simple MatCaps shader can be applied directly to volume rendering (see [https://discourse.slicer.org/t/how-to-perform-3d-cinematic-rendering/7313/7](https://discourse.slicer.org/t/how-to-perform-3d-cinematic-rendering/7313/7), @Chris_Rorden even shared the source code of the shader):

 ![](https://discourse.vtk.org/uploads/default/original/2X/c/c8a1b595edee698592e19606231d4aa4cc7fe7ae.jpeg)

---

_[View the full topic](https://discourse.vtk.org/t/adding-secondary-rays-and-complex-illumination-methods-to-volumetric-rendering/8214)._
