PDA

View Full Version : Loading .3ds models


andi
1st September 2003, 03:47 AM
Hi
I have a problem loading .3ds files: it seems that when a mesh occurs multiple times in a .3ds file, it is displayed only once.
Instead of trying to describe this, here a screenshot of what ac3d displays:
http://boson.sourceforge.net/screenshots/ac3d-1.png

And this is the same file, displayed by a program that we use to test the rendering code of our program:
http://boson.sourceforge.net/screenshots/borender-1.png

Both were generates using this file:
http://boson.sourceforge.net/screenshots/puma.3ds
(yes, not a screenshot, but the dir is so handy ;-))

As you can see ac3d displays only one (not four) rotor blades, the same is valid for the rocket boxes and a few (not so visible) objects.

We are using lib3ds in our program to load the .3ds file (which was created using 3d studio max afaik).

Any hints?

CU
Andi

Andy
1st September 2003, 08:19 AM
Hi Andi,

AC3D doesn't currently support 3DS mesh instancing so the solution is to duplicate and position the rotor blades in AC3D and export the 3DS file.

Andy

andi
7th September 2003, 05:48 PM
Hi again
Well, this makes ac3d basically unusable to me, as I do not own any other modeler that is able to load .3ds files and my own modelling abilities do not exist ;(

But as I don't like spending money on things I cannot use, I have written a small converter based on lib3ds that does 2 things
1) it duplicates meshes, so that exactly one object uses one mesh
2) while I was on it I made it fix a few coordinate issues. Ac3d does not use the "node" (the name in lib3ds) matrix and seems not to use the complete mesh matrix. Both get combined into the actual points.
You can find the program at
http://boson.sf.net/download/3ds_to_ac3d3ds.c
Maybe you want to have a look at it to fix this in a later version.

Is there a reason why you do not use lib3ds to load .3ds files?

CU
Andi

Andy
7th September 2003, 06:38 PM
Thanks for posting that fix code.

As far as I can remember 3DS was a DOS-only program when AC3D was first written (in the early 1990's) and Lib3DS did not exist until relatively recently.

From your code, you seem to be very experienced with Lib3DS- if you'd like to write a plugin, let us know any questions you have. There are samples of how to load geometry from various file formats in the AC3D SDK.

I'm busy working on the next release now, but as more and more games developers are discovering AC3D, there is more demand for better 3DS support in AC3D - so Lib3DS may be used in the future.

Andy

Cowboybebop
22nd October 2003, 01:10 AM
Hi Andi, I was curious f you were familiar with .ASE format ? I was trying to get a plugin working (andy's) and it's beyond me.

andi
24th October 2003, 07:04 PM
Hi Andi, I was curious f you were familiar with .ASE format ? I was trying to get a plugin working (andy's) and it's beyond me.

No, sorry. My knowledge is fully limited to .3ds :-(

CU
Andi