PDA

View Full Version : 3ds loading



blabla
04-01-2001, 04:39 AM
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

atubular
04-01-2001, 04:06 PM
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.

blabla
04-02-2001, 02:27 AM
yes ,i am calculating my normals right.
they are all calculated the same.

can anyone just tell me what the face flag means?

Michael Steinberg
04-02-2001, 07:12 AM
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?

clucches
04-02-2001, 07:33 AM
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

Michael Steinberg
04-02-2001, 07:43 AM
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.

clucches
04-02-2001, 07:53 AM
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 (http://www.dsi.unive.it/~clucches/3ds.zip) !!

Michael Steinberg
04-02-2001, 08:36 AM
Hmmm, had problems with the language... ;-)
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...

GKW
04-02-2001, 12:19 PM
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.

Teofuzz
04-02-2001, 12:24 PM
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

clucches
04-03-2001, 12:21 AM
Originally posted by Michael Steinberg:
Hmmm, had problems with the language... ;-)
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)

clucches
04-03-2001, 12:29 AM
Originally posted by Teofuzz:
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

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!!