[Paraview] Two Sided Lighting

Mike Jackson mike.jackson at imts.us
Tue Feb 13 12:33:19 EST 2007



On Feb 13, 2007, at 12:21 PM, Moreland, Kenneth wrote:

> To access the TwoSidedLighting parameter in the renderer, I think you
> are going to have to hack up ParaView.  The easiest way to do this  
> is to
> simply change the default for the TwoSidedLighting ivar in vtkRenderer
> to 0.  Then all rendering will be one sided.  The next easiest  
> thing is
> to expose the TwoSidedLighting parameter in the Renderer proxy and  
> add a
> checkbox to the GUI to turn it on and off.  Things get much more
> complicated from there.


I chose to hack up ParaView. I did the following:

vtkSMRenderModuleProxy.cxx
     In Function void vtkSMRenderModuleProxy::CreateVTKObjects(int  
numObjects)
       Just before the closing brace of the function add the following:
       this->GetRenderer()->TwoSidedLightingOff();

This basically does what I want. I would actually rather add a toggle  
button into the UI, like in the 3D view properties pane. I am using  
PV 2.6 and on OS X 10.4.8 Intel (MacBook Pro). Could you give me a  
hint on where to look to add a button? Do I modify an XML file in the  
GUI or Server sectiosn?

I left my ParaView Book at work but if I can get started when I get  
to work after all the snow falls I can probably finish up.

Thanks for the help
-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services




More information about the ParaView mailing list