Skip to main content
GameDev.net gamedev.net
🔒 Locked

3d models

Started by peter1233 Jan 26, 2013 at 4:54 PM 1 replies 1.4k views
Original Post
peter1233
peter1233

My question is that Is it possible to import 3d models made with 3ds max into c++? And can I program the imported models so that I can control how they move by pressing different keys on the keyboard ?

FLeBlanc
FLeBlanc

Yes, you can import 3D models. (Though you don't import them into C++, per se. You import them into a program which might be made with C++, and you might use C++ to do the importing, but you're not importing into C++ itself.)

And no, you can't program the imported model. However, you can write your program such that you can manipulate the imported model according to keypresses.

Digivance
Digivance

Here comes captain obvious!

A model file in itself is simply a definition of rendering data. That is to say that when you export your model to "whatever format" from 3DS or any modelling program for that matter it saves a file that defines where the vertices are in relation to a specific point (eg 0,0,0 of the model itself), the relationship of the vertices (how to wrap them to make triangles) texture information, UV mapping and so on.

Now every file format can be a bit different in what it contains and how it contains said information but the important part to remember is that by some means you are simply loading the information from the file into memory (video or ram) for use by the video card. Once loaded the information is identical to what you would manually put in by code. There are different libraries that expose different means of interacting with this information after it is loaded in to memory and in my opinion this is where you want to base your decision.

"What file format contains the data I need?"

"What library / method loads this information in a way I am comfortable with?"

The programming language is simply the means of doing this, the library is just the previously written code that makes it easier to do this, the file format is just the way that this information is stored on disk. Know that and you are a little better equipped to move forward.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.