[vtkusers] Light bug ... (Better explained)

Sebastien Auclair sxa at fluent.com
Wed Apr 23 10:44:04 EDT 2003


Looks like my explanation of the problem wasn't really clear.

Images worth a 1000 words ! (See attached images)

In "before.jpg", we have 2 spheres, 1 camera and 1 light at the camera
position and set to follow it. (i.e. Follow the camera !)
In the "after.jpg" image, we can see that the red sphere was rotated 90° on
its Y axis.
This rotation wasn't done on the actor but on the dataset representing the
sphere. (At the beginning of the red sphere's VTK pipeline)
    (i.e. I do this by creating a rotation matrix (vtkMatrix4x4) and
applying it to the original points associated with the red sphere !)
    We do not use any interactor and,...of course, no interactorStyle.

As you can see in the "after.jpg" image, the red sphere doesn't seem to
update the way its receiving light !

Thanks for any clues or pointers on how i may work to solve this problem !

________________________________________
Seb






----- Original Message -----
From: "Sebastien Auclair" <sxa at fluent.com>
To: <vtkusers at public.kitware.com>
Sent: Tuesday, April 22, 2003 1:49 PM
Subject: Light bug !


> Greetings !
>
> I'm looking for clues (not necessarily a bug-fix) related to a bug we have
!
> Our application has 1 camera with only one light set to follow it.
>  Renderer->LightFollowCameraOn();  )
>
> Moving the camera moves the light fine but changing the coordinates of the
> points of an object so that it rotates seems to also affect the light !!
> NOTE: We don't use any WindowInteractor. We've implemented our own based
on
> the code for vtkInteractorStyleTrackballActor\Camera.
>
> BUG EXAMPLE:
>
> If I have two cubes A and B with their facet 1 facing the camera.
> Only one light placed at the camera position.
> For both cubes, the facet 1 receives all the light.
> I rotate cube A on 90°\Y by modifying the point coordinates directly in
the
> dataset at the beginning of the pipeline.
> The result is that the cube A is rotated alright but so as the light in
> relation to cube A.
> And cube B is still receiving light on his facet 1. !!!! (Like if we now
> have two lights !)
> The facet 1 of the rotated cube A still receive light directly.
>
> Any clues on this behavior ?
>
> Thanks !
> __________________________________________________________________
> Seb
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: before.jpg
Type: image/jpeg
Size: 12790 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030423/7ac06d4c/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: after.jpg
Type: image/jpeg
Size: 11805 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030423/7ac06d4c/attachment-0001.jpg>


More information about the vtkusers mailing list