# 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:** 2
**Page:** 2

<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 8, 2022, 6:18pm UTC](https://discourse.vtk.org/t/adding-secondary-rays-and-complex-illumination-methods-to-volumetric-rendering/8214/21 "2022-04-08T18:18:26Z")

</div>

> [@will.schroeder](#):
>
> sounds like the basis for a research proposal 🙂 unless it’s already been done

We only have limited information on how cinematic rendering is implemented in various commercial software (only what we can deduce from demos, presentations, etc.) but probably they follow a similar approach (it is fairly trivial).

Note that if segmentation result is a set of non-overlapping segments then it is not always necessary to use multivolume rendering, but RGB color channels can be generated from the segmentation result, which can be combined with alpha channel can be computed using a scalar opacity transfer function:

[https://dl.dropboxusercontent.com/s/l04gdww0l3ftqs1/RGBA-mouse-segment-render.mp4?dl=0](https://dl.dropboxusercontent.com/s/l04gdww0l3ftqs1/RGBA-mouse-segment-render.mp4?dl=0)

(see [Color Volume Rendering: vtkDataArray Indexing - #5 by pieper](https://discourse.vtk.org/t/color-volume-rendering-vtkdataarray-indexing/5695/5))

---

<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: [October 25, 2023, 5:53pm UTC](https://discourse.vtk.org/t/adding-secondary-rays-and-complex-illumination-methods-to-volumetric-rendering/8214/22 "2023-10-25T17:53:40Z")

</div>

Important update: volume colorization and SSAO prototype is now available in VTK + 3D Slicer and the results are very impressive. Quality is comparable to (and in some aspects better than) other “cinematic” medical image renderings and its computational cost is very low. See details in this topic:

> [@How to perform cinematic rendering(photorealistic volume rendering) of medical images using open source?](https://discourse.vtk.org/t/how-to-perform-cinematic-rendering-photorealistic-volume-rendering-of-medical-images-using-open-source/9716/11):
>
> I’ve tried to use these multiple scattering approximations in ParaView, but the resulting images looked messy and artificial. The computation was also really slow and on some computers it did not work at all. Most of the medical examples that were showcased in Kitware blogs looked quite odd, too, they looked different but not really better than plain volume rendering. With the help of @pieper and @LucasGandel we implemented two improvements in VTK and 3D Slicer that dramatically improve clarity…

[Previous page](https://discourse.vtk.org/t/adding-secondary-rays-and-complex-illumination-methods-to-volumetric-rendering/8214.md?page=1)
