Slicer Preview Release uses an upgraded version of the VTK rendering library, which has many new rendering features that can make renderings in Slicer more realistic.
We exposed one of these new features: ambient shadows. These shadows make regions darker that are farther than nearby regions in the rendered image. The implementation is very fast, normally there should be no difference in rendering speed (the algorithm is called “screens space ambient occlusion”, as it performs computations in screen space).
- Model with large space inside
- Model with small crevices
- Model with several flat, parallel surfaces
How to try:
- Download latest Slicer Preview Release
- Install Sandbox extension (in Examples category)
- Go to “Lights” module
- Select a 3D view and click “Setup lights”
- Scroll down to “Ambient shadows” section and check “Enable”
- Adjust the “Size scale” slider (it selects the size scale of relevant features)
- The shadows are applied to all nodes that are rendered as polygonal meshes (models, segmentations, fiber bundles, markups, etc.) but not to volume rendering.
- Rendering results are typically better when surface normals are available. You can use Surface Toolbox module / Normals option to compute surface normals.
- In the near future we will explore with enabling more of the recently added VTK rendering features, such as physically based rendering. If someone wants to explore these features then this example in the script repository is a good starting point.
Acknowledgment: This work was funded in part by NIH R01 HL153166, PI: M. A. Jolley (Children’s Hospital of Philadelphia - CHOP)