[vtkusers] problems with camera and lighting
Chris Alvino
alvinoc at uphs.upenn.edu
Fri Jun 30 17:51:43 EDT 2006
Hi,
I have a render window and I need to manually set the position of the camera
to a specific absolute position along a (non-standard) axis of rotation.
(Setting it to a relative position as with the command camera->Azimuth() for
instance will not suffice.)
I am able to calculate the camera transformation matrix for this position, but
when I set I calculate it (properly) and set the view transformation matrix
accordingly, I have some problems upon rendering:
1) The light does not move with the camera. The light stays where it was
before I changed the camera and I get undesirable lighting affects. I want
the light to stay with the camera, however, when trying to change the light
transformation matrix or when I use the Headlight or CameraLight mode.. I get
the same problem. Furthermore,
renderer->UpdateLightsGeometryToFollowCamera() does not accomplish this goal
either.
2) When I try to do a screen capture of the render window with the camera at
this new position, the screen capture resorts to the last view shown by the
render window interactor.
3) There is an error when I chance the matrix.
Warning: In /usr/local/src/VTK/Common/vtkTransform.cxx, line 202
vtkTransform (0x8180ba8): InternalUpdate: doing hack to support legacy code.
This is deprecated in VTK 4.2. May be removed in a future version.
Based on this, I believe that changing the matrix is the wrong thing to do in
order to accomplish what I want to accomplish.
Can anyone shed light (no pun intended) on this issue?
Thanks,
Chris
The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message.
More information about the vtkusers
mailing list