[vtkusers] Light saturation in volume rendering when creating vtkcamera!

Amit Ramesh amit.ramesh at cshs.org
Thu Mar 8 15:40:54 EST 2007


Hi,

     I am using vtk within our OpenGL/Qt legacy code for volume  
rendering using 2D texture mapping. vtkRenderWindow is made to use  
the existing GL window using SetWindowId(), and vtkInteractor is not  
used at all. Instead, I pass the current transform from the legacy  
code using SetUserTransform() to the volume. Now everything works  
fine except for the lighting. I do not create my own lights but just  
let vtk take care of it. However, it appears to be extremely  
sensitive to the diffuse level set in vtkVolumeProperty (diffuse:  
0.005, specular: 0.7, ambient: 0.4, specular power: 50). I have  
played around with different values, and only this combination of  
mine gives somewhat reasonable lighting.

     I currently use my own vtkCamera because we want it to have the  
same projection matrix as from the legacy code. However, if I let vtk  
create its own camera then the lighting problem goes away and I can  
take the diffuse value to 0.2 or higher and actually improve the  
appearance of the volume. Though of course, the view transformations  
are incorrect in that case. I am not sure what exactly is causing  
this behavior on introducing my own camera. First I suspected that  
vtk did not impose GL_NORMALIZE, but that does not seem to be the  
problem. Can somebody help me out with this?

Thanks!
Amit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070308/a8ae4ff6/attachment.htm>


More information about the vtkusers mailing list