Home Technical Talk

Modular Building Design Workflow?

I have been trying to learn how to do this and so far I have decided to make buildings using smaller set pieces ( I make walls and door ways that are 128x128x6 units and than design roofs and other things around the final results of the buildings) but lately I have noticed that modular design example seem to be done with much larger pieces.

Do you all think I'm doing this wrong? I was told that by using modular design I can instance each piece and each set piece would only show up in RAM once at run time in an engine like UDK or Unity.

I cannot find much information on this and a lot of the example tutorials show people making buildings that a player cannot walk into.

Does this all depend on the type of game and weather or not the player gets to go inside the buildings or are these methods meant to be universal? This method for designing buildings are pretty new to me, any advice would be greatly appreciated.

Replies

  • passerby
  • 1magus
    Options
    Offline / Send Message
    Yes I have seen these and for the most part they are very helpful, but I cant help but feel that a lot of information is left out of the loop. I don't know what it is but I cannot seem to make models that detailed enough and clearly it is me but I wish there was a set of tutorials that lead you through a set path for modular design and making extremely detailed game models.
  • 1magus
    Options
    Offline / Send Message
    Back8 wrote: »
    I think I can learn to join you slowly.

    Sorry I'm confused, what do you mean?
  • Pola
    Options
    Offline / Send Message
    Pola polycounter lvl 6
    Ignore back8, he's spamming alot of threads with nonsense.
  • Butthair
    Options
    Offline / Send Message
    Butthair polycounter lvl 11
    What you are asking for is the "magic pill" - a source to answer as much as you have to question. Reality is modularity is everywhere and the resources are everywhere. Search and you will find a lot, whether directly related or not. The best way to be good at modularity is the same way to be good at anything else - do it - again and again, improving from the last time.

    I can tell you everything I know about modularity, but you are a unique snowflake as are we all and we all do things differently, go about them in different steps, choose different methods and make different products.

    Go with what you know and what makes sense to you, if it doesn't then maybe there's another way, maybe you need to do it differently altogether. Maybe something doesn't need to be modular. Something annoying I run into is getting all into modular-izing everything when really, it might not matter. Is it for mobile or an MMO? Modularity is more prevalent here. Is it a single player? Uncharted may be modular, but not everything needs to be stressed.

    Figure - cool looking versus optimal running.
  • Eric Chadwick
    Options
    Offline / Send Message
    1magus wrote: »
    but lately I have noticed that modular design example seem to be done with much larger pieces ... <snip> ... using modular design I can instance each piece and each set piece would only show up in RAM once at run time in an engine like UDK or Unity.
    Yes. Generally you want to use as few individual models as possible. So you should attach all the walls and roofs together for a single exterior, into a single model. Make several houses with different layouts. Then duplicate/instance these models across the level to create your town. Some engines do not use instances, it depends on whether the type of game and target hardware actually gives you some performance savings with instances. Sometimes it does not. Ask your graphics programmer or technical artist.
    1magus wrote: »
    Does this all depend on the type of game and weather or not the player gets to go inside the buildings ?
    Insides can also be made in a modular way. Insides are a different model from the exterior, because you want to exclude the exterior from being rendered when you are inside, and vice versa.

    Some games use an S-shaped entry hall, so they can hide the exterior completely once the player goes inside... while in the S curve, there is never a time where you see both outside and inside at the same time, so that's when the models are swapped.

    Other games use a portal system, where the view of the interior from the exterior is only rendered for the small view thru the doorway. The artist places a special object inside the door that activates this rendering trick, and adds a bit of data to all interior pieces to identify them as render-interior-only.

    Others, like SkyRim, use a loading screen to disguise the rendering switch between interior and exterior.

    I hope that makes sense.

    A lot of these things you learn on the job, because each studio (and each game) have different requirements.
  • 1magus
    Options
    Offline / Send Message
    A lot of this is very helpful. Would you say designing my small set pieces one by one and than combining them in my 3D modeling program to form a large modular piece could work?

    It is a single player RPG the player in cities has free non linear exploration.
  • Eric Chadwick
    Options
    Offline / Send Message
    Yes. Just make sure the house uses a single packed bitmap, rather than a collection of multiple little bitmaps.

    For example, in the Modular Mount & Blade tutorial, the nine textures at upper left should ideally be packed into a single large bitmap.
    http://wiki.polycount.com/ModularMountAndBlade
    This reduces draw calls, because each house only has to fetch one set of textures (diffuse, normal, spec, etc.) for all its triangles.

    Packing a texture is good advice for a PC game, but some consoles work better with multiple small textures instead of one big packed one, because the smaller textures fit into memory better.

    It's something you need to test on the target hardware and game engine to figure out what works best. This is where it's invaluable to work with a graphics programmer and/or a technical artist.
  • 1magus
    Options
    Offline / Send Message
    Well for now we are just focusing on PC hardware, it's difficult enough just trying to make the game. In Unity I was only using around 8 textures for 2 buildings each piece had at least 2 IDs but if one piece needed the wood texture it used the same one as the others.

    Still my buildings look blocky and when compared to the professionals I'm doing something wrong.
  • HAWK12HT
    Options
    Offline / Send Message
    HAWK12HT polycounter lvl 12
    Texture detail is what you need along with proper PLAN PLAN PLAN (im not screaming ) this is what I am saying after one whole year learning on my own and im still way behind with this modular stuff. Check this tutorial out which i made might help

    [ame="http://www.youtube.com/watch?v=Gxdjc2a7Toc&quot;]UDK Modular Tutorial by FahadKM - YouTube[/ame]
  • 1magus
    Options
    Offline / Send Message
    Interesting tutorial but I'm afraid I have many other problems.

    Here is a new building I'm trying to design with modular design in mind. My original design had smaller pieces where you see the edges but apparently I was doing everything wrong. I guess they are supposed to be part of larger pieces so for now each story of a building I'm making one big piece. I kept the edges so I could separate each piece of the wall to better tile on the UV Map.

    My original design also had these separate pieces with multiple material IDs to fit into UDK and Unity and each ID would have a different texture applied but I guess most people just make one giant texture for the final result?

    I honestly don't even know if this new design is right
  • 1magus
    Options
    Offline / Send Message
    Would you all say in the case of the insides of a building being a separate "scene" that the modular sets should be big ones for the exterior and smaller ones for the interior?
  • Eric Chadwick
    Options
    Offline / Send Message
    Your image looks like a good start. The corner piece there seems to have more edges than it really needs. But it's going in the right direction. Have you started a thread in P&P yet? That will help a lot.

    Buildings are going to be blocky. One trick is to add detail meshes on corners. See the Modular Mount & Blade buildings for example. They also used a nice modeling trick to add depth to the roofs.

    One texture with multiple smaller textures packed into it... that's the way to go for a building for a PC game. It's a slightly more difficult process than using separated smaller tiling textures, and multiple materials. But the framerate improvement is worth it.

    Interiors are usually in the same locations as the exteriors, as they would be naturally. Same scene, same scale. You just make sure they are separate models, so you can cull one or the other. The culling is done in code, you usually have some tech that identifies when the player is inside vs. outside.
  • 1magus
    Options
    Offline / Send Message
    I just made a pimping thread
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Environment modular threads are always pimping, because funnily enough It's not a very covered topic.
  • spectre1130
    Options
    Offline / Send Message
    spectre1130 polycounter lvl 6
    The thing I can't wrap my head around even after watching this video, and several others, is how you set up a texture atlas like this for units in Unity. I see the video above uses udk which uses a different unit of measuring right? When i model something for Unity lets say and I model for scale, how do I then fit said models' uvw islands to match up on a grid that is set up in way different unit of measuring and with power of 2 texture units inside the 0-1?
  • Eric Chadwick
    Options
    Offline / Send Message
    Unity is setup by default to 1 unit = 1 meter.
    http://wiki.polycount.com/CategoryLevelDesign#Units_and_Scale

    How you set up the UVs is completely up to you and the needs of your project. It helps to set a goal of how many pixels per meter you want, so you can try to maintain an even pixel density in your scene. Something like 100 pixels per meter, or whatever makes sense for your scene. Mobile is going to be much less resolution than PC for example. Then when you UV your meshes, try to keep to that scale.
  • spectre1130
    Options
    Offline / Send Message
    spectre1130 polycounter lvl 6
    Unity is setup by default to 1 unit = 1 meter.
    http://wiki.polycount.com/CategoryLevelDesign#Units_and_Scale

    How you set up the UVs is completely up to you and the needs of your project. It helps to set a goal of how many pixels per meter you want, so you can try to maintain an even pixel density in your scene. Something like 100 pixels per meter, or whatever makes sense for your scene. Mobile is going to be much less resolution than PC for example. Then when you UV your meshes, try to keep to that scale.
    I think I am picking up what you're throwin down. I was asking because I am doing a modular building for first time. We are using Unity and the conversion of pixel units to meters on a square grid confuses me.
Sign In or Register to comment.