Loading 3ds ASC files..

Started by
5 comments, last by Yehia Mohammed 20 years, 8 months ago
Hi, I need help with loading 3ds asc files... when descriping a face we find something like this : Face 2: A:4 B:5 C:7 AB:1 BC:1 CA:0 I know that numbers after A,B and C is the vertex index, but what is AB,BC and CA ? and why do they get either 0 or 1 ? Thanks in advance.
Advertisement
the 1s and 0s are binary for the direction of the triangle winding. for example, "AB: 1" means the line goes from point A to B. if its "AB: 0" means the line goes from point B to A. get it?
Thank you very much Adam17 for ur reply . But I don''t know what matters if line goes from A to B or B to A when drawing a triangle in a model ?
I believe the reason is for backface culling...depending on the order vertices are in (counter-clockwise or clockwise), it will cull the other side, unless you like, tell it not to...

Its been a long time since Ive worked with opengl, so I dont remember if backface culling is on by default and if its ccw or cw by default

Later,
Lord Hen

[edited by - Lord Hen on August 6, 2003 6:05:37 AM]
Thanx Lord Hen, Can it be there to be able to calculate the normal for Lighting ?
adam17: how sure are you about that information? The 3ds documentation I read claimed these flags were for ''visibility'' and was very vague on the subject. If it is for winding order then the original data posted by Yehia Mohammed makes no sense, and further more the format is overspecified. Only one line direction needs to be known to compute the winding because after you know the direction of one line the directions of the other lines can be calculated (they must form a closed loop).

The data given in the original post, using your interpretation for the flags gives the triangle:
     B    / ^   /   \  /     \ v       \C<--------A


now is that clockwise or counter-clockwise? Am I missing/not understanding something?

Enigma
Enigma : what exactly do you mean by visibility ? I think what adam17 posted will make sense if these information are used to calculate the normal to give the right light effects, and this can be done by using the cross product .Even if two points were pointing to the third, this will not affect the result as this depende on the normal direction(vector). I have to say that I''m not sure if this is the real reason but it make sense!!

This topic is closed to new replies.

Advertisement