PDA

View Full Version : Suggestions on creating complex 3D models



ilSignorCarlo
06-21-2010, 07:58 AM
Hi,
I'm pretty new to the whole OpenGL world.

I'd like to create a little game similar to Space Invaders in 3D,
using OpenGL and SDL on a Linux system. I mean, with aliens displaced
along the three dimensions and other things. Anyway, at the moment I'm
just interested in creating the models for the aliens. I'd like to
keep the style of the game with big pixels so I thought to use big
cubes to create an alien.

Now, which is the best way to proceed? I've read some tutorials
online, but still I'm not really sure how to manage complex objects. I
think I can create a class Cube and then a class Alien composed by a
certain number of cubes and their position. But maybe the is some
clever (and possibly more correct) way to proceed.

Any suggestion?

Thanks,
Carlo

kowal
06-21-2010, 03:03 PM
Maybe use some modelling software (wings3D is perfect for small models),
then export models to some simple format - IMHO obj is one of the simplest, but does not contain animation info.
MD2 is a little harder, but it supports animated models
(Quake || and many other games use MD2)
Load models into your app (either code loader from scratch, or use some library)
You definitely don't want hardcoded models (I've fallen into this trap before).

Some 3D modellers have option of exporting models as OpenGL code - If You do not want to write loader.

Edit:
You may want to create your own 'model' format, it will be simple (just positions of cubes, and their dimensions),
and then load these 'models' into your Alien class.

ilSignorCarlo
06-21-2010, 03:35 PM
Maybe use some modelling software
...
You definitely don't want hardcoded models (I've fallen into this trap before).

Yes, I thought about that, but it is a project for an exam, so I'd like to code the model myself for learning purpose.

I just wanted to know which one could be the best approach. I mean, maybe there is some OpenGl function to help me create a lot of cubes or something.

ZbuffeR
06-21-2010, 03:42 PM
This is a correct way, even if not the most efficient one.
I like to say : first make it work, then make it work faster.