Download

Trying to determine the better approach to modular interior environment creation

I’m planning a project where modularity in the environment is going to be key. The levels themselves will be moderately large, repetitive, and I plan to build the basic geometry (that is to say walls, floors, ceilings, etc - not more detailed pieces like columns or beams) on the fly in the engine using flat planes to quickly create many levels out of relatively few parts. This means I’m not willing to go back into Maya and combine a bunch of meshes into one big mesh for each level, as that would drastically slow down my process.

That being the case, I’m trying to decide between two approaches to doing this. The first way is to model out a whole bunch of uniquely shaped wall pieces and assemble them individually in-editor. However, as I understand it (and please correct me if I’m misunderstanding something, as I’m definitely still learning the technical details of the engine), that would lead to a lot of draw calls and could impact performance at runtime. It also requires many unique meshes for my differently-sized walls, and would require more effort up front.

I discovered an alternative in the form of creating walls, floors, ceilings, etc procedurally using Blueprint by simply duplicating a small plane an appropriate number of times in each axis. At first this seemed ideal since it would cut down on draw calls (or so I understand it, again please correct me if I’m wrong here) and be far more flexible, however further reading has turned up the claim that this can also be very demanding of the hardware in other ways.

I was hoping someone could shed some light on the details here, clear up any misconceptions I might have, offer some advice or point me in the right direction, and maybe turn me onto any other leads that might be useful. I’ve created the image below to illustrate what I’m talking about by comparing the creation of an irregularly-shaped wall using these two approaches.

You are just going the wrong way about it.
Make a few types of wall meshes that work for exactly what you need.

They need to have a thickness to them, or you get light artifacts.

They need to be manifold, or you get light artifacts.

They all need to share the same texel density, or you get a ■■■■ end result. (For lightmaps too)

Corners need to be convex, or you get light artifacts.
This means you need several meshes to handle inward or outward corners.

Because you need to expand and contract the enviroment you will need several lengths to choose from. 1m, 2m, and 4m are good starting places - the height is all the same based in your standard, or you can make variations to address non/standard ceiling heights.

That’s your modular base.

Now when you snap your walls together and you have about 100 wall meshes for one side of the house, you can just pull out Actor Merge and create the unified mesh in engine.

The merge works pretty smart.
It can even eliminate internal geometry and generate a clean impostor mesh that doesn’t include the house interiors for instance.

From time to time you may still have to adjust meshes, but if your modular pack was made correctly there’s almost never any need to exit the engine…

Note:
To make modular assets, start with a good unwrap at measured texel value for the largest possible wall.
After you have that (and the UV for the lightmap is set correctly), this wall will be the master template for everything else.
You modify it, making sure to only remove from the ligntmap uv and to never re-calculate the UVs so as to keep everything at the exact same values.

1 Like