Questions on 3D Game Development Process

Started by
3 comments, last by larspensjo 11 years, 10 months ago
I've been in the field of software development for 3yrs now, and so have some understandings on general software development process. However when it comes to game development my knowledge somewhat lacks, especially for the 3D graphic part.

I've looked up some tutorials on opengl and directx, and they seem pretty straightforward, but pretty much the same; create a GL window, draw lines and shapes...
But the thing is they don't talk much about 3D graphic/animation tools like Maya, 3D Max and Blender...
I heard about the *.obj file format. People say that you import the model by obj file and use that in your application, but I also heard that *.obj file only contains model work, not animation.

To sum up all these vague words, what I want to know are,

1. How can 3D graphical resources be used in applications that use opengl or directx?

2. How does this linkage work in the real field? (Division of labor)

3. If one can import animating objects from Maya or Blender, can I consider this object similar to animated GIF image on the web?

4. If importing an animating object is not preferred in the industry, do they import the sprite sheets of the movement like old 2D games?


I admit all these questions may sound funny or immature.

Thank you in advance!
Advertisement

How can 3D graphical resources be used in applications that use opengl or directx?


3D meshes come in different formats, there is as you said .obj, also .x and .fbx and heaps of other choices or can be programmed (tediously) vertex by vertex


If one can import animating objects from Maya or Blender, can I consider this object similar to animated GIF image on the web?


Animated meshes have an extra dimension than a .gif so they would not be treated as a 2d image. It wouldn't make sense


If importing an animating object is not preferred in the industry, do they import the sprite sheets of the movement like old 2D games?


2D animation is done using sprite sheets still. To animate 3D objects you have to import the mesh and animation files
The majority of Internet Explorer users don't understand the concept of a browsing application, or that there are options.
They just see the big blue 'e' and think "Internet". The thought process usually does not get much deeper than that.

Worms are the weirdest and nicest creatures, and will one day prove themselves to the world.

I love the word Clicky
Thanks for the quick reply. The answers are straight forward and pretty much cover all.
But could anyone post the step by step detail of using "tool-created" object in the application?

like,

create model -> put texture on the model -> make it move -> export to a file (mesh?) -> import the file (mesh??) -> deploy? (move, transform, stop, pause whatever...)

Sorry, I'm not in the field of game development but just want to learn the big picture of it.
The code for animating a mesh is too long for me to write up right now (I'm in school) but I can write a sample of how you'd go about loading and drawing a mesh stored in an X file using Direct3D 9:


LPD3DXMESH mesh; //mesh object to store the loaded mesh
DWORD numberOfMaterials; //stores number of materials in the mesh
D3DMATERIAL9* materialArray; //array to store the materials in
LPD3DXBUFFER materialBuffer;

D3DXLoadMeshFromX(L"filepath", D3DPOOL_MANAGED, &d3dDevice,
NULL, &materialBuffer, NULL, &numberOfMaterials, &mesh); //Loads a mesh from a *.x file

D3DXMATERIAL* temp = (D3DXMATERIAL*)materialBuffer->GetBufferPointer();

materialArray = new D3DMATERIAL9[numberOfMaterials];

for (DWORD i = 0; i < numberOfMaterials; ++i)
{
materialArray = temp.MatD3D;
}

//in your drawing code:

for (DWORD i = 0; i < numberOfMaterials; ++i)
{
d3dDevice->SetMaterial(&materialArray);
mesh->DrawSubset(i);
}

//finally in your cleanup code remember to release and deallocate memory:

mesh->Release();
materialBuffer->Release();
delete[] materialArray;


That will load a mesh at it's most basic (without textures) forgive me if there is errors, it's rushed and I'm at school so I couldn't test the code first
The majority of Internet Explorer users don't understand the concept of a browsing application, or that there are options.
They just see the big blue 'e' and think "Internet". The thought process usually does not get much deeper than that.

Worms are the weirdest and nicest creatures, and will one day prove themselves to the world.

I love the word Clicky
Be prepared that it is quite a lot of effort. It requires a lot of subjects that need to be mastered.

I just managed to get it going, and made a blog describing what I learned (based on Blender+Assimp+OpenGL):

http://ephenationopengl.blogspot.de/2012/06/doing-animations-in-opengl.html
[size=2]Current project: Ephenation.
[size=2]Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

This topic is closed to new replies.

Advertisement