Cross posted to plib-devel.

Here is another test case that illustrates something producing considerable
difficulty for FlightGear modelers.  This one results in arbitrary normals
pointing straight up.  One situation that causes this are three inline
vertices on the same side of a triangle (which I can almost understand),  but
this is often not the case, as illustrated in the test case.

The code producing the bad normal data is here in the
OptVertexList::makeNormals() function (ssgOptimiser.cxx):

  for ( i = 0 ; i < vnum ; i++ )
    if ( sgScalarProductVec2 ( vlist[i]->normal, vlist[i]->normal ) < 0.001 )
      sgSetVec3 ( vlist[i]->normal, 0.0f, 0.0f, 1.0f ) ;
    else
      sgNormaliseVec3 ( vlist [ i ] -> normal ) ;


Here are screenshots illustrating the problem:

http://www.spiderbark.com/fgfs/ac3dnormal1.png
http://www.spiderbark.com/fgfs/ppenormal.png
http://www.spiderbark.com/fgfs/ac3dnormal2.png
http://www.spiderbark.com/fgfs/ac3dnormal3.png
http://www.spiderbark.com/fgfs/normal.ac

First is test case in ac3d.

Second is test case in ppe.

Third is a profile showing the curve of the object.

Fourth is a wireframe shot showing vertices.

It would appear that this is happening more frequently when vertices are near
or on an axis.  Can anyone shed some light on this?

Best,

Jim

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to