# New feature: Basic support for physically based rendering (PBR)

**URL:** <https://discourse.slicer.org/t/new-feature-basic-support-for-physically-based-rendering-pbr/21725>\
**Category:** Support\
**Tags:** feature\
**Created:** [February 1, 2022, 5:29am UTC](https://discourse.slicer.org/t/new-feature-basic-support-for-physically-based-rendering-pbr/21725 "2022-02-01T05:29:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 3, 2022, 5:54am UTC](https://discourse.slicer.org/t/new-feature-basic-support-for-physically-based-rendering-pbr/21725/5 "2022-02-03T05:54:29Z")

</div>

> [@muratmaga](#):
>
> In the models module, after I change the interpolation to PBR, and then I click on one of the presets, the settings change the way it looks under phong/flat/goraud shading (i.e., there are ambient/specular sliders etc). But when I try touch one of them, it reverts the way it looks in PBR (three sliders only).

If you click on it then the interpolation mode will be set to the mode that is specified in the preset. Currently, all 3 presets uses Gouraud interpolation, but unfortunately, there is a display bug: after clicking the preset, the interpolation checkbox still shows “PBR”.

> [@muratmaga](#):
>
> I couldn’t try with the Lights module due to lack of Sandbox extension, but have a feeling that for PBR to work better, we might have to have the Lights module in the core perhaps (i.e., graduate out of Sandbox?)

When I added this feature I missed adding a file, so for one day the Sandbox extension was not built.  
It would be awesome if someone would help with adding these features to the Slicer core. The Lights module cannot be added to the Slicer core as is, because settings are not preserved in the scene. We would need to decide where to store these settings (store lights in the view node, in a “lightkit” node, or add a separate node for each light), and implement standard GUI (make these view parameters available near existing view parameters), linking of properties (when view link is enabled and you change a view parameter in one view, apply it to all other views), etc. I also feel that without the ability to assign texture to each model, PBR rendering is still too limited and experimental.

> [@muratmaga](#):
>
> Would it be possible to enable this in Segment Editor as well (maybe it is possible, I didn’t look to deep really).

PBR is somewhat supported for segmentation nodes: metallic and roughness value can only be specified for the entire segmentation (not for each segment) and we haven’t added GUI for this yet. It would not be hard to resolve these limitations, but for now you need to export to models to edit these properties.

> [@muratmaga](#):
>
> Does it work with volume rendering?

Image-based lighting can be used for volume rendering, too, but I don’t think it is implemented in VTK (at least not in the default OpenGL2 rendering backend). @Chris_Rorden showed some nice examples [here](https://discourse.slicer.org/t/how-to-perform-3d-cinematic-rendering/7313/4), which proves that it is possible (I think MatCaps is the same or very similar to what VTK calls image-based lighting).

---

_[View the full topic](https://discourse.slicer.org/t/new-feature-basic-support-for-physically-based-rendering-pbr/21725)._
