[vtkusers] Toggling ScalarVisibility ruins actor's backface color
joopeter
joo.peter at gmail.com
Thu Jun 21 10:06:35 EDT 2012
Hi everyone
assume that you have a scene with one actor having different front and
backface color.
*Frontface *color: *RED *RGB(1,0,0)
*Backface *color: *BLUE *RGB(0,0,1)
During the 1st rendering of course they will look like as specified.
Check the attached first two images.
(step1-frontface-red-OK.png, step2-backface-blue-OK.png)
When I turn *on* vtkPolyDataMapper's ScalarVisibility the rainbow scalars
are also looks fine. Check the attached third image,
step3-scalar-mapping-OK.png
However when i turn *off* the ScalarVisibility again (like it was the
case for the initial step) *the previously defined blue actor backface color
become red*, step4-backface-become-red-NOTOK.png
What is *even more strange* is that from that point *changing the actor's
backface color is not possible*!
Also any change on the *frontface color applies now as backface color as
well* :(
I faced this issue in our C++ project first. For this forum topic I built
a TCL demo of my own to reproducate the problem.
(That TCL is based on the well-known VTK example located at
\Examples\Rendering\Tcl\rainbow.tcl)
How to reproducate:
During rendering you can issue user commands by pressing 'u' key. On that
window you can do
- set the scalar visibility to on or off by entering the following tcl
commands
planeMapper ScalarVisibilityOff
planeMapper ScalarVisibilityOn
- change the front or backface color
eval [planeActor GetProperty] SetColor 1.0 0.0 0.0
backProp SetColor 0.0 0.0 1.0
*Can you spot why it happened?*
The problems comes by using VTK 5.8.0 on WinXP 32bit and on different 64
bit Linux machine too.
regards,
Peter
My attachments:
http://vtk.1045678.n5.nabble.com/file/n5714065/step1-frontface-red-OK.png
step1-frontface-red-OK.png
http://vtk.1045678.n5.nabble.com/file/n5714065/step2-backface-blue-OK.png
step2-backface-blue-OK.png
http://vtk.1045678.n5.nabble.com/file/n5714065/step3-scalar-mapping-OK.png
step3-scalar-mapping-OK.png
http://vtk.1045678.n5.nabble.com/file/n5714065/step4-backface-become-red-NOTOK.png
step4-backface-become-red-NOTOK.png
http://vtk.1045678.n5.nabble.com/file/n5714065/actorBackfaceColorProblem.tcl
actorBackfaceColorProblem.tcl
--
View this message in context: http://vtk.1045678.n5.nabble.com/Toggling-ScalarVisibility-ruins-actor-s-backface-color-tp5714065.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list