Modular mesh design vs large meshes; lightmaps; help me come to terms with it all!

Hey guys,

I’ve been playing in UE4 for almost two years now. Off and on as life will allow.

I keep getting stuck on the modular design issue. I get it in theory, but in practice I feel unsure of how to proceed.

Let’s use this simple sketch to illustrate my thinking. If I want to create the first design, modular makes sense to me. I can divide it all up, reuse a lot of pieces and snap it all together in UE4. However, if I want to create something more along the lines of the second sketch, a modular approach starts to hinder me. There aren’t especially straight edges to line up, no pieces I can reuse - dividing things up adds a whole extra step to the process. And probably pushes me towards straighter lines and something a little more ‘boring’ like the first design.

I’m trying to create smaller, detail-oriented environments. I don’t need to replicate the same walls/buildings hundreds of times in my game spaces. The ‘pros’ of modular design don’t especially apply to my approach in all cases.

But there is still the question of handling lightmaps. Let’s say I were to model the base geometry for this house all in one go (excluding smaller details that’d I snap on after). I would need to use a very large lightmap - but I least I won’t have seaming issues on my modular edges. Compare that to making the base geometry out of 20 modular pieces and using much lower lightmap resolutions for each piece. Performance-wise, is it six of one, half dozen of the other? Or do 20 low-res lightmaps perform better than one ultra-high-res lightmap?

Two years in and still wrestling with this issue. Basically, what I’m asking: if you were to approach modeling the second design for UE4, what approach would you take? Would you bother with 2-foot modular wall pieces, or would you export it out all in one chunk? At what point does sticking to a strict modular workflow become unnecessary (again, with meshes that you probably won’t use more than once?)

Thanks!

Hi ian80,

I was in a similar position where I made every house as one single mesh. However as an single developer I found this process not very iterative friendly:

-Building different houses took too much time
-Make small changes took too much time
-Not very much variation
-UV layout headaches
-…

Instead with a modular approuch I can easily build different houses by just sticking them together - like playing lego - which is actually even enjoyable.

The key point for modular mesh design is to plan in advance: What is your base size? Player collision size? Possible roof slopes? Wall thickness? Where is the anchor point? Where do the edges meet to ensure the mesh is tileable?

With planing it is possible to make your models more natural instead of the rigid feeling on the left side of your example.

There is also the possibility to make use of bigger modules:
http://wiki.polycount.com/wiki/ModularMountAndBlade

And for extra information: Skyrim's Modular Approach to Level Design

Regarding your lightmap question: I think it is less of a performance than a memory question.
For example if you use a 2048² lightmap texture resolution with dxt1 compression the size is around 2mb big.
In contrast to 20 * 256²(?) = 0.655mb.
(I based the calculation on a post from cupsster on Size of texture on Video memory — polycount)

2mb can appear as relative small but for multiple objects and on mobile devices this can quickly become critical as most user prefer a small app size.

Hope it helps.

Just joining in on this thread and I also struggling with design direction when it comes to environments. Planning ahead is important for modularity to work and work well, but I struggle a lot with the planning. I think it just comes down to preference and practice.

You could create modularity in your wecond sketch by making “straight” sections and join them with modular intersections…
A bit liek this…
The black parts would be modular roof and wall section that you can reuse.
The colored meshes are the non-modular intersections. You could also make variations here, or even make it as one piece…
d03f9eb82d57c7d5f4b22b4eebee8be6b0ffb608.jpeg
(a bit crude painting, but you will get the idea…)

Thanks guys!

Very helpful stuff to mull over. And confirms that I’m at least thinking about this stuff in the right way.

,

Yes! This is a very good point.

Good explanation of lightmaps. I’m glad to understand that now. And thanks for the links, those will definitely help me start thinking in modular terms.

KVogler,

Great point! I really is a question of planning properly.

Modularity is about making more content in less ammount of time. To make it easy, just make your models as individual as possible, for instance if you are making a house you could model the doors, windows, walls and roof separately, you could even go deeper and make the windows to work as separate pieces that can make different results. After that you could make variations and try to mix them to get different combinations. You can then think about what materials you are going to need, you could try to make a library of material functions and try to texture your models inside Unreal to test all the possibilities. But in essence, is about thinking about how you could make your work easier. Just by doing it you can learn a lot by making mystakes!

You can break any part into modular stuff, when you are following a worldgrid.
Only thing important is, that the connecting vertices sharing same position, but:
For your right model it’s not very useful, when you not shape all houses like that and watch out for connecting vertices.
I would start with your left object, break down wallseg/wallseg with window/wallseg with door, corner (need only one, or more for variation), then horizontal.
Much work, much to learn Google
Only rough thing how i would start to breakdown the house. Plan modularity ahead, when sketching. Make the door wall segments same width, then you can swap and the positive effect of modularity starts.
When your segments have different sizes, you could use fillers for that, but i would suggest to stay close at possible to one size(2 units for example, or 50% of that or 25%, but not 13,47%, then “fillermess” starts and modularity makes no sense.(only my 50 Bucks) ^^
92416c9b7bb4cbb5c1b052d1a5967c62548c80e3.jpeg