Hello, just wondering what you guys think should be the cutting points for modular pieces. I was thinking, each floor(duh), but also cutting each floor into 4 sides. I was considering this because of occlusion culling. The player won't be able to see all sides of a building at one time in most games. Plus, if it has equal sides, you use the same modular floors on one side, for the other(s). What you think?
Replies
I mean i've seen people using uniform box models where every side has a different floor texture applied to it, but that is rather rare. The benefit of this technique would be more on the side of the level designer since he just needs to rotate the model to get a different floor. But from a performance perspective this would only make sense when all floor textures are visible, if not you just waste texture memory since they will get loaded no matter if the face is visible or not.
I hope i didn't missed the actual question here?
Anyway if i missed it you can also dig into the modular section of the polywiki, maybe your question get's answered there.
All the best
How modular stuff is fragile balance between culling vs draw calls. Each seprate mesh add at least ONE Draw Call (and more often more), to redeuce them you want to keep meshes merged and as big as possible. On other hand single huge mesh is harder to cull. You either cull entire thing or you don't.
It's also about designer flexibility inside game editor. Although I'm not entirely convinced by the last argument. Modular or semi modular pisses can be still assembled into bigger chunks inside 3d app, and I think everyone is pefectly capeable of doing so.
EDIT: also, in regard to drawcalls- since I will be using Unity, there will only be 1 drawcall per module type because they will be prefabs. So that is another thing to consider. Trying to find a balance in modulation/prefab/occlusion culling vs single mesh chunks. At what point has a building been broken down too far in this scenario?
If this a FPS, and you navigate the inside of the building, then you're probably safe having each room be a single floor mesh plus multiple wall meshes plus a roof mesh.
Do some tests, and profile them on your target hardware. Can't stress this enough!
If you use a well-designed layout, with proper S-curve portals, then you can cull very efficiently without visual pops. Whole rooms can be culled when they're out of the player's sight.
We did a 3D semi-iso shooter with tons of modular pieces in Unity, worked very well performance-wise. I have a making-of video here, and you can see the sizes of the modular chunks: http://ericchadwick.com/img/env_robot_rising.html#gameplaydesign
An old diagram. Below and above the "B" there are twisty cooridors that block the view into the next room.