[vtkusers] ... An strange rendering?

jsl n jsantam.hm at hotmail.com
Sat Oct 25 13:51:41 EDT 2008


Hi friends,

  I've just the following problem when rendering a .OBJ mesh. The first attached
screenshot is obtained with the following setup for the VTK's camera:

camera->SetFocalPoint(0, 0, 0);
camera->SetPosition(0, 0, 5.1);
camera->ComputeViewPlaneNormal();
camera->SetViewUp(0, 1, 0);
camera->SetViewAngle(22.2);

It looks right...

The point is that changing the SetPosition() method as following:

camera->SetFocalPoint(0, 0, 0);
camera->SetPosition(0, 0, -5.1);  // Here is the only change.
camera->ComputeViewPlaneNormal();
camera->SetViewUp(0, 1, 0);
camera->SetViewAngle(22.2);

rendering becomes messed up (backfaces and bad z-fighting), as depicted in the
second attached screenshot. Why placing the camera position in the Z-negative
gets wrong results?

I'd be so grateful with you for any advice.
_________________________________________________________________
¿Eres un cotilla? Disfruta de todas las novedades en MSN Corazón
http://entretenimiento.es.msn.com/corazon/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot-good.jpg
Type: image/jpeg
Size: 23693 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081025/260ee689/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot-strange.jpg
Type: image/jpeg
Size: 21122 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081025/260ee689/attachment-0001.jpg>


More information about the vtkusers mailing list