In my c++ custom application I want to the surface representation of my contour filter to a solid color.
I have tried to change the property but the color doesn’t change.
Can you help me to understand what is wrong in this code?
Ambient coloring involves two controls: Ambient Color and Ambient. Try setting the Ambient factor to 1.0. Also, there’s a Diffuse factor too. Of you set Ambient to 1, you may want to set Diffuse to 0 to avoid over saturation.
Setting Ambient to 1 and Diffuse to 0 makes my color brighter but the contour filter stays colored with my scalar and not a solid color. I think I need to somehow set the color mapping to “solid color” like I can do with the paraview GUI
Oh indeed if you have some data coloring already enable then you’ll need to disable it.
To do that I usually use the vtkSMPVRepresentationProxy class, it goes something like :