Home Technical Talk

Modular building and actor count

polycounter lvl 9
Offline / Send Message
Orgoth02 polycounter lvl 9
I have been seeing a bunch of people building modular buildings and large structures out of a bunch of smaller pieces and assembling them inside a game engine. I understand that is offer a high level of quick customization but I am curious if it is the most efficient way of doing things. You can quickly get a high number of actors in a scene if you are building everything out of "Lego" pieces. To me it seems more efficient to build what you want in the 3d program out of the pieces, merge it into one object, then import that into the game engine as one actor this way it saves on the number of actors that need to be drawn. Please correct me if I am wrong or missing something.

Replies

  • PolyHertz
    Options
    Offline / Send Message
    PolyHertz polycount lvl 666
    game engines are designed so that instances are cheap, if you merge it all before importing then it counts every piece as unique and performance suffers.
  • McGreed
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    the trick is to use modular pieces that are just the right size so that you don't have to use too many of them.

    Also a lot of game engines will have lodding and culling systems that reduce/remove actors when they're not visible or far away.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    doing it all as large meshes would take more memory since less things are being reused, and loding and occlusion wouldn't work too great.

    as in most things the idea is to strike a balance, yes im sure having tons and tons of actors in a scene would have a bad effect on performance, but have very few very large meshes for everything would be the same.
  • Autocon
    Options
    Offline / Send Message
    Autocon polycounter lvl 15
    If only there was a way to set up all your materials and models in UDK and then link it to a max/maya file so you could assemble the scene in Max/Maya and then just export directly to UDK and have it all assembled there! Ah if only.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Autocon wrote: »
    If only there was a way to set up all your materials and models in UDK and then link it to a max/maya file so you could assemble the scene in Max/Maya and then just export directly to UDK and have it all assembled there! Ah if only.

    Stop teasing us with your superior production proven tools in your studio darn it!

    Damn Naughty-Dogites and their superior programmers, one day, I shall have my reven-wait, isn't CE3 supposed to have such a system in place already?
  • PredatorGSR
    Options
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    Our engine can also mitigate that issue by "glomming", the engine can combine multiple objects with the same material into a single object, thus reducing the number of objects. We manually set which objects can be glommed in max because you only want certain types of objects to be able to be combined. This is a step which happens automatically after a full build, so it doesn't affect workflow at all.

    And yea, if you have a scene that is only a single object, you can't cull out that object unless it is entirely out of view. With smaller pieces you can quickly cull out anything that isn't seen, which is good for performance.
  • Mark Dygert
    Options
    Offline / Send Message
    It really isn't that different than the approach everyone uses for trees, bushes, grass, plants and other foliage. Create a few things, mix and match them to make varied looking environments. With buildings you just need to learn how to fit the pieces together, sticking to the grid helps.
    Autocon wrote: »
    If only there was a way to set up all your materials and models in UDK and then link it to a max/maya file so you could assemble the scene in Max/Maya and then just export directly to UDK and have it all assembled there! Ah if only.
    Yea that would be awesome... But still UDK is light years a head of source (at least what is released to the community) and to quite a bit a head of Unity.

    In UDK you have the procedural building tools, where you feed in a bunch of pieces designate certain things such as walls, corners, molding & trim, even store front and roof. Assign those to a box and it figures out how many of which piece goes where. This is an incredibly quick way to assemble a city, copying your setup and swapping out some of the pieces. Suddenly laying out an entire city happens in a few days instead of a few months.

    Another major bonus to modular design is in the time it saves you. You create a handful of modules and that translates into entire buildings, you're not stuck creating blocks and blocks of unique buildings. You create just a vertical slice of the building that can be arranged uniquely a few different ways from the same few pieces.

    Not all games use the same formula. There are times when your module will be an entire floor to a building instead of wall section, or the entire module will be the entire building, it all depends on the design and scope of the game.

    Also, its easier to cull objects if they're separate actors, enabling the engine to dump the majority of the building if it isn't seen, rather than one giant actor that must stay on the screen for longer even if you can only see one little corner of it.
Sign In or Register to comment.