Jump to content

View more

Image of the Day

#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Do we isolate static and dynamic meshes in our games?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 lucky6969b   Members   


Posted 18 May 2014 - 11:03 PM


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?

Edited by lucky6969b, 19 May 2014 - 12:10 AM.

#2 frob   Moderators   


Posted 19 May 2014 - 12:22 AM

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.

Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I occasionally write about assorted stuff.

#3 lucky6969b   Members   


Posted 19 May 2014 - 12:29 AM

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?



#4 MaxDZ8   Members   


Posted 19 May 2014 - 01:07 AM

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"

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.