[vtk-developers] [VTK 0013259]: Toggling ScalarVisibility ruins actor's backface color
Mantis Bug Tracker
mantis at public.kitware.com
Fri Jun 22 08:50:18 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://www.vtk.org/Bug/view.php?id=13259
======================================================================
Reported By: Joó Péter
Assigned To:
======================================================================
Project: VTK
Issue ID: 13259
Category: (No Category)
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: backlog
Project: TBD
Type: incorrect functionality
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 2012-06-22 08:50 EDT
Last Modified: 2012-06-22 08:50 EDT
======================================================================
Summary: Toggling ScalarVisibility ruins actor's backface
color
Description:
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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-06-22 08:50 Joó Péter New Issue
2012-06-22 08:50 Joó Péter File Added: attachment.zip
======================================================================
More information about the vtk-developers
mailing list