Jim Wilson wrote:
> This is not an ac3d file format problem as it does not show up on
> converted models.  Been thinking of a couple utilities that could be
> used to improve ac3d output (I know David is going to suggest blender
> :-)).

Just to be clear, I didn't use the ac3d program, just the file format.
I do my 3D modelling in perl, remember?  :) I suspect that this
problem does happen in converted models; the reason you don't see it
is that they rarely have a texture seam across a smooth boundary.
That won't work here, as all the boundaries are smooth and there is,
mathematically, no acceptable mapping of a single texture to a whole
sphere.  I use a cube face mapping, which works really well except for
the texture seam issue.

I should explain the problem a little better.  What's happening is
that there is no place to put a normal vector in the .ac file.  The
plib loader thus has to generate its own normals by averaging the
normals of each polygon attached to a vertex.  For vertices that are
"inside" an object/texture, this works fine.  But ones on the edge
can't average in the normal of the polgon(s) that are on the other
texture, as those are part of a different object in the .ac file.  So
what happens is that a vertex on one texture has a normal vector that
is *different* from the normal of the same point on a different
texture.  This makes that polygon edge look sharp when lit.

What's especially frustrating is that (1) I'm generating this file
automatically, so I could export the normals explicitly if I wanted
to, but the file format won't let me; and (2) it's a sphere!
Generating normals is a ridiculously trivial operation -- they're just
the coordinate of the vertex.

I'll look around at the other formats plib supports.  All that I
require is that it be easy to generate (preferrably ASCII) and support
named objects for the animation.

The perl scripts that generated the ball are attached.  The ball.pl
script spits out the .ac file, while balltex.pl generates the texture
Postscript in a very similar manner to the gauge stuff I posted
earlier.  Pass it an argument of north/south/east/west/top/bottom to
tell it which texture to generate.

Andy

-- 
Andrew J. Ross                NextBus Information Systems
Senior Software Engineer      Emeryville, CA
[EMAIL PROTECTED]              http://www.nextbus.com
"Men go crazy in conflagrations.  They only get better one by one."
 - Sting (misquoted)


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

Reply via email to