Sign in to follow this  
Sh8key

3D character question

Recommended Posts

Just for starters, I am a C/C++ programmer new to the game programmeing sector, and I was wondering how would I get a character/model into a program written in C++. I created I basic model and now I want to import the model onto the screen to do basic animations (walk, run, kneel, shoot) In the past months I have read an abundance of books on 2D game programming and find it's easy to render game objects on the screen from the code. Now I want to do the same with some 3D objects I have created, granted I am not an artist, I just want to know what is needed for getting the models on the screen and animating them. I have Kenneth Finney's Book 3D Game Programming All In One, and it goes over using the Torque Game Engine, which I also have. For instance creating an interior scene similiar to the police department in Resident Evil (the one for Nintendao 64) in Maya, with the same character created in maya and having the character do all the animations described above. So how would I get the the scene and the character onto the screen using C++. Any help would be appreciated. Thanks Sh8key

Share this post


Link to post
Share on other sites
The usual way is as follows:
- a modeller models the models in a modelling program
- the model is exported to a file
- the engine imports the file and constructs the geometry
- the engine renders the geometry

Now there are many issues here. For example, which format should the intermediate file have? Most professional engines or games use custom formats while for smaller projects and/or demos you can rely on exisiting formats. Sometimes a conversion step needs to be added because the modelling program has a different geometry representation from the engine's. The same art-to-engine-path holds for animations.

Greetz,

Illco

Share this post


Link to post
Share on other sites
You would need to load the model from the file. You should choose a file format and then find out how to load it.
I suggest that you try the MD2 file format first, as it is quite an easy format to understand. There is a tutorial for this at gametutorials and the book OpenGL Game Programming, which is a good book to learn opengl from.


Edit: I just found this tutorial on the md2 file format.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this