Preparing a 3d game as a demo for my CV.

Started by
10 comments, last by Heelp 7 years, 9 months ago

Guys, I'm making a simple 3D game demo in order to use it along with my CV to try and get an internship in a game studio next year. Basically, I've just finished my first year at uni and I decided to spend my whole summer creating the game.

I don't attend a game-oriented uni, and I know my chances of landing a job are really small, but this is kind of a dream of mine, so I decided to try and make something anyway, so to have a decent excuse later if I fail.

The stuff I have done by now is: With help from the internet I can now load .obj models from blender using assimp. I made a simple movement, jumping, collision, cubemaps, implemented the Blinn-Phong shading and used shadow mapping to add some realism to the game. Now the next thing I really, really wanted to do is to add an animated model.

I already created and animated my model using blender, rigged and skinned, everything is cool.

But to load it into OpenGL, it is really above my skill level. I didn't find any code on the internet that loads collada files into opengl. I can't find sufficient info on the internet about skeletal animation and how exactly everything works, there are just a few articles that touch the subject on the surface, but nothing more.( or I'm just stupid)

These collada files seem too complicated to parse and that assimp lib is not very beginner-friendly.

The easier solution I came up with is to create 20 or 30 .obj files for each frame of the animation and alternate between all the frames in the game, but I think this would make a really bad impression, so I don't know how to continue improving the game. Basically, at least for now, interpolating matrices between keyFrames sounds really complicated to me and making 1 million .obj files for every animation seems the only thing that is doable for now, but it sounds really bad. So, what should my next step be? :wacko:

Advertisement
You should use a format that supports animation such as fbx.

Fbx as far as I am aware interpolates between bones positions and you represent such animation as a skeletal mesh with a skin over the top.

Using many static obj files would be completely the wrong way to go about it.

Autodesk actually provide an sdk for fbx that can be used to read the animation data but as for actually animating, that's the hard part and I've normally left that to a pre made engine rather than spend time on it.

Hope this helps get you started though!

But to load it into OpenGL, it is really above my skill level. I didn't find any code on the internet that loads collada files into opengl. I can't find sufficient info on the internet about skeletal animation and how exactly everything works, there are just a few articles that touch the subject on the surface, but nothing more.( or I'm just stupid)

To state the obvious but the one of the best ways to increase your skill level is to try new things out. Programming is all about this. :D

Think about things logically:

  1. Are you being realistic about what you can achieve in the time frames? If yes...
  2. You need animation data from blender. Either you need to parse some 3rd party format, or export the data into your own format. Have a look at the source code for blender python addons for exporting. It isn't a great stretch to learn some basic python (which is icky!) and export what you need.
  3. Consider what kind of animation you want. If you are starting out, I'd recommend starting just exporting 'vertex tweening animation', which means just export the position of each vertex on each frame, rather than the bones / skinning stuff. Vertex tweening is much easier to get working, and is not too daunting a task to write a shader for in the game.

Getting bones animation working is usually the final solution used for character animation, but is quite tricky / finicky to debug, and not something I'd recommend until you understand tweening. Tweening can of course be used for character animation too, and was used in many games back in the day (quake 3 etc), it just has some drawbacks such as memory use and lack of flexibility for animation blending.

Guys, first I want to thank you for the quick replies, but:

braindigitalis, collada supports animation, too. The problem is that I don't know how to load it into OpenGL.

lawnjelly, I already have the animation data from Blender, i have the file, I just don't have any idea how to parse it.

And I cant use vertex tweening, I need to use skeletal animation, because this is how I make my animations in Blender.

braindigitalis, collada supports animation, too. The problem is that I don't know how to load it into OpenGL.

lawnjelly, I already have the animation data from Blender, i have the file, I just don't have any idea how to parse it.

And I cant use vertex tweening, I need to use skeletal animation, because this is how I make my animations in Blender.

'Having a file' means nothing *unless* you can parse it. A quick google of collada suggests it may be overly difficult to parse.

http://codeflow.org/entries/2011/nov/18/parsing-3d-file-formats/#collada-the-xml-format-from-hell

Hint: Skeletal animation is often used to create the data for vertex tweening.

http://gamedev.stackexchange.com/questions/54939/are-there-alternatives-to-vertex-tweening

lawnjelly, this says that vertex tweening is bad.

But what I found is that on the bottom of this article: http://www.3dgep.com/loading-and-animating-md5-models-with-opengl/

you can download the source code for a md5 model loader, and I was wondering, can I just use this code to load models without actually understanding how to do it, is it ok?

As a CV demo I would do something with Vulkan. New, not many people code today but should get big. For ex. add Vulkan renderer to Flightgear. If that's to big, partially.

Guys, I decided that I won't try vertex tweening, neither .fbs files or vulkan. I will load collada file using assimp, I will keep you posted with my code, thanks for all the replies.

And what confuses me the most is that there are thousands of game programming hobbyists out there and most of them have engines and animated models, but nobody in the whole universe decided that it could be good if he/she uploaded a simple class that loads animated models using assimp, so mediocre guys like me can use it..... :huh:

Guys, I decided that I won't try vertex tweening, neither .fbs files or vulkan. I will load collada file using assimp, I will keep you posted with my code, thanks for all the replies.

And what confuses me the most is that there are thousands of game programming hobbyists out there and most of them have engines and animated models, but nobody in the whole universe decided that it could be good if he/she uploaded a simple class that loads animated models using assimp, so mediocre guys like me can use it..... :huh:

Loading animation data is very straight forward with Assimp as they keep their data layout very simple.

First Google search result was this, which explains mostly everything you need to know for skeletal animation with OpenGL and Assimp.

By the way, having working examples of projects you've done in your own time is the best way to get into the games industry.

Syntac, thanks a lot for that tutorial, the functions are not really thoroughly explained, but I will try to steal every idea I can from it.

One other thing. I have been wondering these days, what's the difference between vertex tweening and skeletal animation?

The one thing I came up with is that vertex tweening stores all the vertices in all the keyframes. For example, if my model has 10 000 vertices, and 3 keyframes, then 30 000 vertices are stored. And then you interpolate between these keyframes if you want( or if you can). And skeletal animation just stores the vertices once in the 1st keyframe, and then for the other keyframes it stores only the bones transformations and you again can interpolate. So the only difference is that skeletal animation stores object vertices only once and you can use the same vertices for 10000 keyframes, right?

This topic is closed to new replies.

Advertisement