Lighting effects when using rgba component volumes with vr

I am volume rendering a volume of rgba components, with actor.getProperty().setIndependentComponents(false).

The result are close to what i expect except the image is slightly darker.

I also tried adding vtkLight as setLightTypeToCameraLight() so the light source is by the camera all the time.
And then i tried various light settings such as setIntensity(1.0) in an effort to increase the intensity of the volume render to match the rendering from vtkImageSlice.
But so far, the setting have had no effect.

When using rgba and setting IndependentComponents to false, what
lighting effects are available that might help increase the brightness of the volume rendered image?

Try increasing the Ambient and Diffuse values on the vtkVolumeProperty.

Thanks Sankhesh,
i set the ambient to 1 and diffuse to 1 and the shades match now!

My mistake, i was looking at the triplaner view. The composite rendering still shows the same slightly darker appearance.

Any other settings on the vtkLight or vtkVolumeProperty i should try?

In a day or 2 I’ll extract a simple reproduction and post it from github.

I’m looking at this case to see if it helps me.

Hi John, It would be helpful if you could share a code snippet or what parameters you set on the property and mapper. If you can share a reproducible example, even better.

There is a test for 4 independent components with composite blending in the VTK source tree. I enabled lighting (shading) but don’t see the issue you’re running into.

I returned to explore the Ambient and Diffuse settings and found that if i increase Ambient to 3, I got very similar brightness between image rendering and vr rendering now!
So I think the original suggestion solves the issue. I just needed to increase the Ambient from 1 to 3.