MantisBT - VTK
View Issue Details
0013259VTK(No Category)public2012-06-22 08:502016-08-12 09:55
Joó Péter 
Dave DeMarle 
normalminorhave not tried
closedmoved 
5.8.0 
 
TBD
incorrect functionality
0013259: Toggling ScalarVisibility ruins actor's backface color
The original version of this report is recorded here:
http://vtk.1045678.n5.nabble.com/Toggling-ScalarVisibility-ruins-actor-s-backface-color-td5714065.html [^]

Here is a hard-copy of it:
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

Check the attachments!

Jochen K. found the followings:
===============================
The only thing I found out so far is the function which is rendering the backface
(look at function vtkActor::RenderOpaqueGeometry(vtkViewport *vp) for this call: this->BackfaceProperty->BackfaceRender(this, ren))

is called (having backProp color set to Blue) no matter how ScalarVisibility is set, which indeed is surprising me.

After this->BackfaceProperty->BackfaceRender(this, ren) has been called
another two calls are made:

  this->Render(ren,this->Mapper); // which calls the superclass Render function
  this->Property->PostRender(this, ren);

The "failure" seems to be located within one of these two functions but I cannot find it.
I have the feeling that this issue should be escalated to the developer crew. I'm running out of any idea.
No tags attached.
zip attachment.zip (72,707) 2012-06-22 08:50
https://www.vtk.org/Bug/file/9216/attachment.zip
Issue History
2012-06-22 08:50Joó PéterNew Issue
2012-06-22 08:50Joó PéterFile Added: attachment.zip
2013-07-22 14:44Dave DeMarleNote Added: 0031161
2013-07-22 14:44Dave DeMarleStatusbacklog => expired
2013-07-22 14:44Dave DeMarleResolutionopen => fixed
2013-07-22 14:44Dave DeMarleAssigned To => Dave DeMarle
2015-07-27 08:37Jacques PapperNote Added: 0034822
2016-08-12 09:55Kitware RobotNote Added: 0037284
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionfixed => moved

Notes
(0031161)
Dave DeMarle   
2013-07-22 14:44   
If this is still present in 6.0, please reopen this bug report.
(0034822)
Jacques Papper   
2015-07-27 08:37   
This issue is still present in 6.1 - could you please reopen ?
(0037284)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.