I have a question regarding volume mapper shading related with light orientation.
I develop a VTK based application ( https://github.com/morphomuseum/MorphoDig ), in which I use 3D rendering of a 3D volume with the vtkVolumeProperty shade option set to on. I currently use VTK 8.2.0.
I instantiated 1 (and only 1) light which I expect to follow the camera:
vtkSmartPointerlight = vtkSmartPointer::New();
However, when I change the user matrix of the vtkVolume object, it seems that the way the shading is computed is done before the user matrix of the volume is used to move the 3D volume in space (see image attached). If I understand things correctly, the user matrix of the volume should be taken into account before the shading is achieved, but it seems not to be the case.
Image attached (see below):
Top line: on the left, I have set a camera “front” light, and the shading of the object appears as I expect. On the left, I applied a 180° rotation of the object (the camera stays still) and it seems that the light comes from the back side, which is unexpected.
Bottom line: when rendering vtkPolyData objects, however, the direction of a “camera” light works: the user matrix is applied before the light direction and after being rotated 180°, the light seems to come from the front side as well (which is the expected behavior).
The same scene after the camera was rotated : the model on the top right is not well rendered.
Is that a bug?
Or maybe there is something I do not get here?
Many thanks in advance for your answer,