3ds loading

hi

i have a small problem with the normals in my 3ds loader.
when i calculate them some are pointing to the wrong direction.
i know that for every face there is flag but i dont know what i means

can any one help

thanx

You are not properly computing your normals. If you were, they would all be wrong, or all correct. You may want to examine that code.

yes ,i am calculating my normals right.
they are all calculated the same.

can anyone just tell me what the face flag means?

Maybe the first three bits of the face info will help you.

Bit 0: AC or CA
Bit 1: BC or CB
Bit 2: AB or BA

This is what the docs say. Dunno. Mybe you play around with it a bit. I never had problems like you with any 3ds model I ever loaded. Are you sure your normal code is working correctly?

Maybe you don’t know, 3D Studio is not so good at exporting 3DS files.
It exports:

  1. objects without vertices or faces
  2. vertices not belongin to any face
  3. ((!!!))(i think this is what you need) triangles having two identical vertices, this means these are triangles with at least a zero lenght side: if you do a division by zero, your normal will have an infinite lenght and probably it goes to a far point in the lower right of the screen.

my best wishes

Never saw that on 3ds max exporting… It would be obvious that this would only cause bugs looking like a line… But he said complete polys would be facing away.

Originally posted by Michael Steinberg:
Never saw that on 3ds max exporting… It would be obvious that this would only cause bugs looking like a line… But he said complete polys would be facing away.

I bored at seeing that on 3ds max, and I resolved all my problems that way.
I worked a little with 3DS file, and i think i’m right, look at this !!

Hmmm, had problems with the language… :wink:
I’ll have to try your prog on my own comp with a TNT… this ATI RAGE something here is a bit slow and ugly…

This was a problem with some models a while back. I think it had to do with mirroring part of the model and max didn’t update the winding or something like that.

Never had problems while loading 3ds models…
Only one thing: exporting with 3dStudioVIZ3 (may be a bug) does not correctly ‘closes’ spheres, cylinders,… because some common vertex has not the same index in the vertex array. I remember that 3DStudioMAX1 had not this problem.

Clucches: 3d Studio exports lights and cameras, that might be in the points 1) and 2), while I never had the problem 3), they could be wrong models…

tFz

Originally posted by Michael Steinberg:
Hmmm, had problems with the language… :wink:
I’ll have to try your prog on my own comp with a TNT… this ATI RAGE something here is a bit slow and ugly…

I’ve a GeForce II MX…
I’d like to make my prog work also with an ATI, but the only way to test is to buy an ATI (i’m not sure i wanna do somthing like this)

Originally posted by Teofuzz:
[b]Never had problems while loading 3ds models…
Only one thing: exporting with 3dStudioVIZ3 (may be a bug) does not correctly ‘closes’ spheres, cylinders,… because some common vertex has not the same index in the vertex array. I remember that 3DStudioMAX1 had not this problem.

Clucches: 3d Studio exports lights and cameras, that might be in the points 1) and 2), while I never had the problem 3), they could be wrong models…

tFz[/b]

I know about lights and cameras… (look at my program)
Maybe you never tried with complex models (using 3dStudio max 4).

I’m sure of what i sad, if you want i can mail you a 3ds model wich behaves as i sad!!