3D Model importing

Started by
8 comments, last by Decibit 13 years, 11 months ago
Hi there I'm new in the 3d programming and in this fantastic community. I started programming using dx9 with the language i know C++. Now my question is, if i would open a simple window and draw a 3d model drawn for example with 3d studio (even a simple object), how can I do for such thing ? thx you very much
Advertisement
I'd start by looking at X Files.
thx for your addressing mate and i will read that soon, by the way if someone can help a little bit more, maybe with other indications, tutorials or maybe some source code it would help me to learn faster

kind regards,
You can also import some specific format for e.g if you want import .3ds meshes you can look:
http://code.google.com/p/lib3ds/
Quote:Original post by Cosmy
http://code.google.com/p/lib3ds/


Thx a lot Cosmy very nice lib.
I asked how to import a 3ds model, but what is commonly done for this operation?
What who develop games usually do ?
Quote:Original post by Aju
Quote:Original post by Cosmy
http://code.google.com/p/lib3ds/


Thx a lot Cosmy very nice lib.
I asked how to import a 3ds model, but what is commonly done for this operation?
What who develop games usually do ?


Well, to be honest the studios I've worked at write their own file format and use that. While that does give you some advantages (and a lot of disadvantages as well), it's a crapton of work and way overkill for a beginner. I would just use .x, it's human readable and model exporters for various modeling programs are easy to come by. I'm pretty sure that XNA and DirectX can then load those directly for you, which would save you a ton of time.

And where can i find some good tutorial to learn how to work with X files in C++ ?
most of the tutorials "how to work with .x" is in dxsdk folder
mostly in d3d9/tutorials d3d9/samples folders
also take a look at skinned mesh sample[it will show u how to load and animate skinned meshes]
Crazy dude smoking D3D11, AngelScript, PhysX, 3D Sound, Network, DB, FBX, and some other weird things, doing that on Visual Studio 2010 + Visual Assist X on Overclocked CPU
You can look into the X-file importer of the Assimp-library ( look at Assimp project page ) to get a clue how to parse the data in the right way.

Kimmi
A complicate solution may indicate a not understood problem.


[twitter]KimKulling[/twitter]
Check the FBX SDK out. The downloadable package contains tutorials and samples. A lot of 3D modelling packages (3DS Max, Maya, Blender, etc.) can export to FBX. The format was chosen as a primary model import format by the XNA developers.

The SDK will let you open an FBX file and provide the functions to query the model vertices, triangles, materials, textures etc.

This topic is closed to new replies.

Advertisement