Home Technical Talk

Modular Buildings - how much to break apart?

bpears
polycounter lvl 4
Offline / Send Message
bpears polycounter lvl 4
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

  • FlynT
    Options
    Offline / Send Message
    FlynT polycounter lvl 8
    No offense but i don't get the question, cutting a floor into 4 sides? A floor is often just a plane like this one here
    dqoz11.jpg

    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? :D

    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
  • Bruno Afonseca
    I'm not sure if I understood the question, but you could give this a read: http://www.slideshare.net/JoelBurgess/gdc2013-kit-buildingfinal
  • iniside
    Options
    Offline / Send Message
    iniside polycounter lvl 6
    The short answer is... it depends.
    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.
  • bpears
    Options
    Offline / Send Message
    bpears polycounter lvl 4
    Sorry guys, I should have been more clear. I am talking about the stacked floors of a building, not a ground floor. And cutting them into 4 sides.

    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?
  • Eric Chadwick
    Options
    Offline / Send Message
    Again, depends.

    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
  • bpears
    Options
    Offline / Send Message
    bpears polycounter lvl 4
    S-curves? you mean curving the players walking space like roads and such, so looking forward doesn't seem infinite and show too much?
  • 54Strat
    Options
    Offline / Send Message
    54Strat polycounter lvl 5
    S-curves, not heard that before. Nice phrase. The term I use is dog-legs.
  • Eric Chadwick
    Options
    Offline / Send Message
    Dog-leg, I like that one!

    An old diagram. Below and above the "B" there are twisty cooridors that block the view into the next room.

    byf1_figure1.jpg
Sign In or Register to comment.