I have read the wiki up and down a few times. I'm still a little unsure about some techniques of making modular environments.
- 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?
- 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?
- 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?
- 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?
- 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
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.
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.