Do we isolate static and dynamic meshes in our games?

Started by
2 comments, last by Krohm 9 years, 11 months ago

Hello,

Do we isolate static and dynamic meshes in our games in different file formats?
I think I asked this question before, but I forgot the title, so please bear with me.
Now I have actually built a simple scene in Ogre, I find it a pretty nice engine and I am quite happy with it, so I decided to stick with it. However, one question on my mind is do we usually use static meshes (or a scene file), like the buildings, factories and other background infrastructures while using the .mesh format for dynamic meshes, like the player, and the agents etc. And do we usually place a tag on the scene so that the player, the agent have an original position to stand?
Thanks
Jack

Advertisement
Some games do. I'm not sure who "we" are that you refer to in your post. That "we" group of people might, or might not.

Static meshes can be processed differently than dynamic meshes. They can be treated differently in graphics, and treated differently in physics. Static objects can have additional information baked in to them, like lighting information and physics information and AI information and pathfinding information and so on.

It does not need to be a different file format or extension, it can be done in other data.

And while some games do it, other games do not. It depends on the nature of the game.

I am tempting to collectively export the scene, including the players and agents, as a whole.

This avoids some alignment problems later on in the process... I believe, but strangely enough, Ogre is designed to

be used in 2 different ways, one static, one dynamic, I don't know what the problems would appear

if I use one way or the other, I can't predict. But what is your preferred way? just take general game

programmers' preferences as an example?

Thanks

Jack

I could basically copypaste what frob wrote but I guess I'll elaborate what I do FYI.

Meshes in my system are to be approached with care.

In the DCC tool (Blender) you can just import a mesh from an external file. It will get fully pre-baked by the filter and become part of the world. This means if you have 100 repetitions you get 100 times the memory footprint. In the past, the filter would look for cloned nodes at file level and try to figure out what was instanced and what not. I found that quite brittle in practice as Blender makes super easy to duplicate instead of just cloning.

Nonetheless, in this case, meshes are always static.

To have instantiated meshes I have a very rough annotation system in place. Meshes are given a resource handle and their contents are really ignored at filter level (in Blender they are represented by the same mesh for convenience, but they don't have to). Those meshes are always instanced and can be marked static or solid on a per-instance basis.

The filter currently produces a separate list for guaranteed-to-be-static meshes. They are supposed to go through a different processing path involving, besides other things, extensive pre-batching. For the time being, they just generate collisions in the static rigid body domain instead of using the dynamic system.

Previously "Krohm"

This topic is closed to new replies.

Advertisement