Erik Hofman <[EMAIL PROTECTED]> said:
> Jim Wilson wrote:
>
> > That works sometimes. The problem is that the optimization tries to merge
> > polys together that it thinks it can. The exact criteria I haven't gotten
> > into yet. Probably looking harder at the code would reveil the exact process.
> > The reason I haven't looked hard is that I am fundamentally opposed to having
> > plib DO ANYTHING to change my model when it loads it.
>
> I think we can prevent that from happening by calling this line of code:
>
> ssgAddModelFormat ( ".ac" , ssgLoadAC , ssgSaveAC );
>
Yes, exactly. That's what I meant when saying that we wouldn't have to
rewrite the whole thing. I doing just that once before and the result was
the model came out flat shaded. We need the part that traverses the tree and
calculates the normals which is buried in the optimizer.
This is part of the stripify function and I would guess this is where we get
to the shading:
/*
So, now we have all the important information sucked out of
all those nodes and safely tucked away in the OptVertexList
Let's take this opportunity to compute vertex normals.
*/
list . makeNormals () ;
Setting up for this is the part I don't quite understand yet. "list" is an
object of the OptVertexList class (optimized vertex list).
Idealy, and this does involve some modification to plib, we would also fix the
loader so that it'll respect the shading paramter in the ac3d surface
structure. The most important part is getting rid of the optimization step.
Best,
Jim
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel