Advertisement

3d format questions

Started by May 30, 2010 08:25 PM
6 comments, last by Wilhelm van Huyssteen 14 years, 7 months ago
Not sure if this is the right section to be asking this.

I've just started working with openGL for a game I want to make. I am wondering what 3d format would be good. I've tried google and although I've come across some information on the subject I still have plenty of doubts. I've heard it boils down to necessity but since I've never worked with 3d models I am not sure what I'll need and what formats offer it.

I am also wondering if I should use a library to load my format or if I should write my own loader. Been looking for tutorials on the latter but have found little. What about one writing his own format?

Any info is much appreciated. Thanks.

[Edited by - Antonym on May 31, 2010 3:42:29 AM]
Quote: I've heard it boils down to necessity

Correct. Start out with learning how to load and render an MD2 using VBOs. MD2 format is relatively easy to understand. And once you wrap your noggin around that you'll be ready to dive into more complex formats, or even write your own format that converts from an existing inter application transfer format, such as Collada.
Advertisement
Thanks for the reply.

I came across this tutorial.
http://gpwiki.org/index.php/OpenGL:Tutorials:Tutorial_Framework:MD2Animation
and am still digesting it, pretty straightforward so far.

What do people look for more often in 3d models for games? What formats support these?
Start of with creating a loader that can load vertices and polygons (triangles/squares).
Extend your loader to load ambient colour.
Extend your loader to load normals. (to make it easier use ambient colour for difuse and specular colour as wel. You can load it seperatley at a later stage).
Extend your loader to load textures and texture coords.
Extend your loader to load animation keyframes.
Extend your loader to load complete animation sequences.

I created my own model format and that was the sequence in wich i created it (doing the same using MD2 should work as wel). You dont have to follow that exactly but you wont go wrong with it. Also dont use Imediate mode for rendering (glBegin/glEnd). Write it properly using VBO's
What's the difference between animation keyframes and complete animation squences?

Thanks, I'll look into VBO's then.
Quote: Original post by Antonym
What's the difference between animation keyframes and complete animation squences?


I simply broke it down into steps. I meant you should first get your loader to properly load in key frames (since thats the hard part) before you try to load in the sequence and its timing.

Advertisement
I've been looking at some VBO material and am a little bit puzzled. Should I be creating a dynamic VBO per model(Since each model has animations and I guess I will be wanting to update their vertices quite often)?
No you will not update your VBO's vertices to animate them (That might be possible but it would be terrible). Animations have got nothing to do with VBO's. That is why i recomend that you first get everything else loaded before you worry about animations.

A model might consist of lots of different parts (for example head, torso, left leg etc. etc.) animations dictate how these parts move in relation to each other over time. You dont need anything special in your VBO's to cater for this instead you should create an 'animation system' to handle this when you have everything else in place.

Just getting a static model loaded with materials/normals and textures/texture coords is already quite chalanging and might take you a while to get right.

Good luck :D

This topic is closed to new replies.

Advertisement