[vtkusers] ... An strange rendering?

Amy Squillacote ahs at cfdrc.com
Mon Oct 27 09:37:42 EDT 2008


We saw something similar last week when rendering an OBJ. Have you 
verified that the normals in your OBJ model are pointing outward? In our 
case, we saw this strange behavior because the normals were pointing 
inward instead. (Using a vtkGlyph3D filter with a vtkArrowSource as the 
glyph source will show this visually.)

- Amy

jsl n wrote:
> 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/
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list