3D Graphics with C++

I'm working on a project using OpenGL and QT with some fellow students. We are designing a game. I'm responsible for the graphics part. As far as illustration and graphic design, I'm pretty advanced. I've never really used any 3D rendering programs, though. I've also never imported graphics from said 3D programs into any program before.

I'm using Cinema4D. I'm wondering how I should export the files (i.e. what format) in order to import them into the game we're developing.

Anyone had any experience doing so? I don't want to have to import a flat character. I want all the dimensions that I see when I render in C4D.

Hopefully someone can provide some stellar advice!!
That depends. Your game engine will have a specific type of model and texture file it will be able to read.

For example, Valve source engine games use .vtf for textures (Valve Texture Format?) and GTA games tend to use .mdl model files.

I don't know much more than that about games or game engines, so I can't really help more than that. Return 0 and Disch seem to, so you could wait for them...

All I know about 3D graphics is that you'll use lots of trigonometry.
I recommend you stick to something simple: the Wavefront OBJ file format. It is very easy to read and write.

Almost every 3D designer (including Blender and Cinema 4D) supports output to OBJ files, so you can design your models externally and import them into your game.

There are some limitations, such as rigging them -- for which you will have to develop a method in your own game. (That is, 3D packages have very sophisticated ways of rigging models, which you cannot import into your program without some heavy programming, so stick to the "stick figure" type of armature.) That way you can implement it easily by exporting a simple skeleton as a separate OBJ file and then combining it with the model when imported into your game.

Hope this helps.
Last edited on
Thanks guys. Looks like I'm sticking to the obj file. Just not sure how to import it with Qt (I'm the graphics guy, not the programming one).

Is there some sort of documentation that anyone can refer me to that specifically goes over importing directly with an object file?

The Qt forums haven't been so helpful with responses.
If Qt allows you to draw triangles individually, you would get the data for the triangles and hold it in an array and draw each triangle in a loop. Unfortunately, it probably won't be that easy, but that would be the basic idea. But then you get into things like quads, triangle fans, triangle strips, etc. that may require that you use an object tree.

Qt might also have a native function for loading .OBJ files. Depends on how high/low-level it is.
Topic archived. No new replies allowed.