3D file format, which one is the best ???

Started by
6 comments, last by Eric Boissard 23 years, 9 months ago
I''m trying to develop a simple 3D engine. I''d like to know which 3D file format includes data for normals (vertex normals if possible). I''m using DirectX. Thanks Eric
Advertisement
since you''re using DirectX probably it''s own ''x'' file format would be best.

JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
You dont say if you are using Retained mode or Immediate mode. But I can tell you this - The .x file format only works in the crappy Retained mode, so if you are using immediate mode, you will have to import your models from another format. I would personally reccomend .3ds because there is a lot of information about this format on the web.

Anyway
Good luck
Who says I have to believe in what I stand up for?
Thank you guys, but now i''ve got another question. About data structure and memory allocation. Is it a good idea to use linked list to store vertices and triangles? Is it better to declare pointers and allocate memory using Zeromemory() for example ?
I''m using immediate mode and Draw(Indexed)Primitive to render.
Could you tell me please a good way to organise my vertices and triangles.
If i use .x files, is it easy to access to normals (vertex and faces) ?
Help me please

Eric
The way you organize the vertices depend only in the type of use that you what to give.
X format is very easy to use (Imode and retained). You only put the data into a memory. Or you can use the X-ascii format.

Trianglelist is the common, but you can try the another method (eg. "fan"..)



-eng3d.softhome.net-
-----------------------------------------------"Cuando se es peon, la unica salida es la revolución"


Hello Eng3d,

Do you know where I can find an example of code for loading X model with d3dx ?

Thanks

Dan


My directx7 book mentions and uses a very simple class called :
CD3DFile which is declared in d3dfile.h to load x files. It says it is part of the directx7 sdk but not very well documented. You might want to check it out at the msdn or something...but its so simple it is like this i believe:

CD3DFile* car = NULL;
car = new CD3DFile();
car->Load("car.x");
car->Scale(2.0);
car->Render(gLPDevice);


where gLPDevice is your LPDIRECT3DDEVICE7 object.

Hope this helps you!

-blide
blide@mail.com
-blideblide@mail.com
Thanks,

I will have a look here

Dan

This topic is closed to new replies.

Advertisement