Sign in to follow this  
Nickie

Defining some terms

Recommended Posts

Nickie    322

Hello everyone,

I would like you to define some words.

Model - does it consist of just one mesh? Or multiple meshes?

Mesh - does it contain multiple objects. I mean should the mesh contain more than one pair of index/vertex buffers for example.

Node - It may be scene node, and it contain pointer to the mesh/model?, the texture, shader, etc.(to allow using the same mesh with different textures). It contain also parent(if the scene is tree oriented), relative position, etc..

 

Where does the animation goes to? There are thousands of ways that come to my mind to handle animation. Is the character represented from long list of verticles(just one buffer)? If so, I guess animation would go into the mesh object.

 

These questions may seem easy to answer by some people but I would like to make the things clear for myself.

There may be different interpretations of the words I mentions, but what do you understand/imagine when you see these words.

Share this post


Link to post
Share on other sites
_Slin_    209

Feel free to define those however you want or think of better ones allowing for a better structure, so the following is my interpretation I am using in my own OpenGL based engine.

 

Model: Contains several meshes with their material (so when rendering I set a material and render the vertices supposed to use it as that is basicly how OpenGL wants it). It may also contain different LOD stages. It can be loaded from a file.

Mesh: One vertex/index buffer pair per mesh.

Node: A node is just a position in the game world which may be part of a more complex scene tree and be associated with one or more models/lights/cameras/...

 

Material: Holds a shader and render states and maybe some special shader variables or something.

Entity: Is a node with a model and a skeleton

Skeleton: A bone structure and pose also holding a pointer to its animation data.

 

The Animation is a bit tricky. I put my skeleton with animation data (only supporting skeletal animations) into the entity, as that allows me to have different animation states for different entities sharing the same model. For vertex based animations I would probably make them part of the mesh, storing some frame variable in the entity, doing the blending between frames in a shader.

 

When exporting an object from blender to my custom file format, the resulting files are skeleton and animation data and the model. The model is exported so that it contains a different mesh for each texture.

 

This is how I do it and there a probably better ways to handle this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this