Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Do we isolate static and dynamic meshes in our games?

This topic is 1499 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

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

Edited by lucky6969b

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!