• Advertisement
Sign in to follow this  

Hierarchy of meshes and entities

This topic is 997 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm confused on how to manage meshes and entities in my world.

Some key points I (think I) know:

- Meshes must be loaded once per object. (e.g "big_sword.mesh" should not be loaded twice from the file).

- Entities are basically 3d world transformations that represent loaded meshes?

- Meshes can contain nodes and skeleton data, while the nodes are "trackable" by the coder so that different meshes can be attached to them. (e.g attach the root node of "big_sword.mesh" to a node called "hand" in mesh "barbarian.mesh")

 

I'm not sure what exactly is the different between entities and nodes. Can anyone shed some light over this?

Share this post


Link to post
Share on other sites
Advertisement

You sure helped, but I still can't grasp the whole concept. How do I implement my own scene graph?

Looking at this and this tells me this is a big subject. Can you recommend good learning sources?

Share this post


Link to post
Share on other sites

Can you explain the next quote from the article?

 

The scene manager should have a simple linear array of all the objects in the scene. The scene graph itself is implemented within those objects by themselves, separately from the scene manager. The only thing the scene manager needs to know about any scene graphs is that one exists between all the objects it contains and that it should linearly iterate over that array and call curObj->Propagate() on each object.

Share this post


Link to post
Share on other sites

 

Can you explain the next quote from the article?

 

The scene manager should have a simple linear array of all the objects in the scene. The scene graph itself is implemented within those objects by themselves, separately from the scene manager. The only thing the scene manager needs to know about any scene graphs is that one exists between all the objects it contains and that it should linearly iterate over that array and call curObj->Propagate() on each object.

 

If I understand it correctly then he tells us that a scene graph does not define the structure to store and hold the scene objects (in the scene manager), but is just an included expression of parent-child relations between objects. While each of the objects can be addressed by an index (due to the linear array), references (e.g. pointers) to the parent and/or children are explicit.

Share this post


Link to post
Share on other sites

So I could have a SceneManager class, with all the object in a single array, and then the separated scene graph hierarchy will have nodes that only point to the objects in the SceneManager class?

Share this post


Link to post
Share on other sites

So I could have a SceneManager class, with all the object in a single array, and then the separated scene graph hierarchy will have nodes that only point to the objects in the SceneManager class?

Something along this, yes.

 

See, there are many possible ways to structure the world. Spatial vicinity, several parent-child relations, static vs. dynamic objects, groups of belonging colliders, … whatever. The solution is not to try to create the one omnipotent structure, trying to fulfill all needs but ending in a solution that fulfills each need to 80% at best. Instead each sub-system should drive its own structure that is best suited to do its job. That means to have say an octree to solve spatial vicinity problems, several dependency trees, perhaps several groups of belonging colliders, and so on. That is what L. Spiro says e.g. with "a scene graph is not for rendering".

Share this post


Link to post
Share on other sites


I use a GripComponent component as part of a game object that represent an item

 

just curious, those have to be custom defined on a per object basis right - IE to locate the grip point correctly?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement