Home Technical Talk

Modular Environment Techniques

interpolator
Offline / Send Message
icegodofhungary interpolator
I have read the wiki up and down a few times. I'm still a little unsure about some techniques of making modular environments.

  1. When you're making modular buildings that are meant to be seen inside and out, is it good practice to make both the interior and exterior walls one piece? Say you have an apartment building that's brick on the outside but plaster walls inside. Would you make single modular pieces for the walls, that have both materials? Or would you have a set of modular pieces for the brick exterior, and then a set for the interior? 
  2. When you make a modular wall piece for a building, would you model the whole thing, or just the faces that will be seen by the player? I've seen art that models the entire wall, even the parts that will butt up against one another when modular pieces are assembled. I've also seen people make "hollow" walls where non-visible faces are deleted. Which is better practice in according to current/next gen modeling practices? 
  3. How do you use UVs these days? I haven't made much of anything since the days where everything had their own unique unwrapped UVs. It seems now that you create an atlas/trim sheet and then just orient your UVs for each face where you want it on the atlas and go with that. So the UVs aren't nicely and carefully laid out like they used to be when things were hand painted. Is this a correct perception of the technique?
  4. How do you handle flat and plain surfaces with modularity? Say you have a fairly large marble floor, there's no geometry to model really other than a flat plane. Is a plane sufficient to serve as the mesh of the floor?
  5. Kinda related to #4, when you have plain environments with little or no mesh detail, how big do you make the pieces? In other words, is smaller modular pieces better (but more pieces overall) or larger pieces (fewer pieces overall)?

Replies

  • m_asher
    Options
    Offline / Send Message
    m_asher node
    1. It'll depend on the overall complexity of the kit and the player's camera perspective. I'd lean towards separating them for the sake of layer management .
    2. Manifold meshes give you some wiggle room for tweaking/offsetting without light leaks, but you'll pay for it with your lightmap and you'll inevitably have some (manageable) z-fighting issues somewhere. Non-manifold meshes are efficient from a texture space perspective (the extra triangles from the un-detailed backside of a manifold mesh don't create a significant overhead, excluding the obvious exceptions), but you can end up needing more unique meshes in order to create a functional tileset.
    3. Your best bet here is to assume you'll have 2-3 UV maps per asset by default. You'll use trim sheets, decal sheets, and tiling textures as you've described, mixed with geometry masks (from face weighted normals, vertex colors, baked AO, etc) and unique textures depending on things like view distance and game logic.
    4. Floors tend to be either really flat, with materials that use some fun macro texture tricks to break up tiling patterns, or not as flat as you'd think, with trim meshes and decal planes aiding surface transitions and hiding flaws. It'll depend on what you're making.
    5. Build your floors to fit your lighting conditions and the player's camera.. Size your floor pieces to fit your targeted lightmap density, to start with, then figure out what kinds of gap-fillers you'll need to keep things flexible.
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    The goal with making any kind of modular set is to minimize the number of drawcalls in an environment while also minimizing how much work it takes to make that environment. 

    These two things are usually at odds. 

    Any new material you place on an object is a new drawcall so to minimize that you should try to have 1 material for each object. Sometimes this is impossible but with good planning you can get away with it. It's better to use a more complex shader that has multiple UV's and blending than to have more than one material. 

    Trim sheets and tiling textures are definitely the way to go. You can even make textures that use 'thirding' - http://poopinmymouth.com/tutorials/thirding-textures-tip.html - which is a way to have tiled textures that also have unique features. 

    The one thing I always recommend is to download some existing assets from a game. There's many good sets available. For example Epic games released assets from their game Paragon:

    https://www.unrealengine.com/marketplace/en-US/paragon-agora-and-monolith-environment

    Making your meshes as contiguous as possible ("watertight") is the best way to go in my experience. It solves many problems with lightmaps and auto-LOD systems. 


  • Mark Dygert
    Options
    Offline / Send Message
    1) So much of that depends on the design of the game, the hardware its running on the engine you're using and how important those particular pieces are to that particular scene. Most games don't let you go inside every room of every floor of every building and if they do let you in, it is usually limited to a fairly small area. But then something like a warehouse might be just the outer shell with no interior walls so it might make sense to combine them.

    Generally you separate them for a few reasons...
     Not all interior walls run along the exterior of the building. You want to be able to build interiors separate from the exterior walls. So then you'll need interior walls, do they have backs? Will those backs be all the same or will a hallway be different than an interior room? Will all of the rooms be the same? 

    If you combine interior and exterior there could be a lot of excess geometry that isn't seen but is still rendered. IF you don't combine the interior and exterior, it lets you build out just the playable areas, which could be a fraction of the footprint of the actual building.

    A fairly typical conversation with design:
    "we let you into the lobby but the guard stops you."
    Oh ok lets not detail out all 78 floors.
    "But later he lets you up to the penthouse"
    ok can we use a cut scene in the elevator to transition to a separate mini level when you go to the penthouse?
    "No it's a glass elevator, we can't break immersion"
    You guys are retarded, I quit. lol jk but seriously that's stupid.
    "FINE! GAWD we won't do glass but you guys are seriously wrecking my creative vision..."
    We aim to please.

    What about draw calls? Can you combine meshes after the fact? Does the engine support that? Will that transform modular pieces into unique meshes? What happens when you update the modular pieces? Does the engine update and recombine them or does someone need to do that? Is that a step you can afford to do at the end of the project to improve performance or does it need to be done early on and constantly refreshed when changes get made? Can tools be made to make that process easier?

    How does the engine handle lights shining through the backs of polygons? Does the wall need a back to properly block light?

    If you do have a lot of freedom inside to move around and you except the building to be pretty much 1:1 inside and out then, it could be a lot of draw calls if you separate the inside and the outside, so you should save of draw calls and merge them together. BUT then you might have another design requirement that there be a few different types of interior walls, one with wanes coating one has raw brick, one has broken plaster walls ect... but the exteriors might all be the same, so if you've combined them what do you do? Do you make another set and swap out the interior walls? That seems wasteful but it might be the right solution under certain circumstances. 

    So it's up to you to design a modular system that meets the design goals of the game and tech budget of the hardware you're using. There isn't one way to always tackle the problem but a bunch of problems to solve and things to balance out. 
  • icegodofhungary
    Options
    Offline / Send Message
    icegodofhungary interpolator
    Thank you guys so much for taking the time to answer my questions.
Sign In or Register to comment.