Am I better off importing level geometry as modular parts, or entire sections?

I’m looking at using Blender as my primary level design tool, but as I’m not a graphics guy I really have no idea what the final level should look like from an optimality standpoint: is it generally preferable to build a handful of modular building pieces in blender, import them separately, then snap levels together in UE4, or would I be better off building complete rooms and levels in blender, exporting the entire level as one big mesh, and only adding detail pieces like decals and mobile pawns inside UE?

UE4 makes use of instancing so I suggest using the separate meshes. Though AFAIK there is nothing wrong with making it one mesh other than potential lower lightmap resolution when using baked lights.

The general concensus is that making modular parts is the way to go. This helps the renderer to dont render parts which are not visible(==performance) and it adds to reusability of the assets.

The trick is to figure out how far to go. Obviously creating a single brick in Blender and use that to build houses in UE is a bit overdone. Unless you are creating a game where can you throw a wrecking ball to a house to see it crumble in many pieces :wink:

Oh good, that’s what I was hoping- as much as I sometimes struggle with BSP-based map design, I really like being able to play with things directly in the environment they’ll occur in, and modular parts really help with maintaining level proportion, which is something I’ve always struggled with- if I measure super-carefully once, and get a library of consistently proportioned pieces, whenever I’m unsure of how to lay out an area I can just go “Okay, here’s a door, and here’s a wall that is exactly 3m tall, put everything around that until it looks right”.

This is probably going to end up being game-specific, but have you found any magic bullet for sizing wall sections? That’s the one area my proportions usually break down in, because I always end up with lots of small units at weird, varying scales, and so by the time the room fits together, it no longer matches up with the character models’ proportions.

Make separate meshes. Things don’t always go through the FBX export / import process as well as you would hope and you often have to do some “fixing up” or things like Materials once it gets in Unreal. Also, if you notice little things you don’t like about your mesh after you get it into your game (and believe me you will) it is much easier to fix it in a smaller mesh and reimport. The imports also will go much faster and have a better chance of succeeding with a bunch of smaller meshes instead of a giant mesh. If you are creating buildings remember to break it up into a separate mesh for things likes doors versus the rest of the building as you will want to probably automate the door with a script which you won’t be able to do if it is a single mesh. Modular is better.

Related question, which I’ve been googling and feel really silly for not answering for myself; is it possible to snap meshes together surface-surface, so I can quickly match up walls, corners, doors and so forth? I tried vertex snapping two cubes together, but that still results in them overlapping each other enough to cause Z-fighting.

Use a grid. Make your meshes with certain size constrains and make sure the object pivot is correctly placed. For example for walls: make them 1, 2, 4 and 8 meters wide. Set the grid snapping in the UE editor to 50 or 100 and you will notice that placing the meshes becomes really easy :slight_smile:

Think about sizes/grid/pivot position before creating the meshes. Document your conclusions and you will notice you will have a lot of fun for many days/weeks/months to come!

Some reading to do:

Holy crud, these links are awesome, you just made my morning- thank you for the citations! :slight_smile:

And geez, talk about quality of life improvements: shifting grid snapping from 10 to 50 has already made my life massively easier!

Only down side I found was: if your camera is facing the oposite direction you need to rotate the assets you are placing 180 degrees to make the grid work. Many times I thought ‘what the hell is wrong here??’ :stuck_out_tongue:

Modular is great, just avoid creating flat surfaces out of multiple parts because it will have lighting issues.

Yeah, I’ve been there :frowning:

One solution is to go for full dynamic lighting. This brings all kinds of different problems though, like performance.

But if you’re gonna use baked light maps, this might be interesting to read: UDK: Lightmapping Basics and 18 Important Principles for Creating and Using Lightmaps for UDK. Its for UDK, but almost all applies to UE4 too :slight_smile:

I’ve already been toying with the idea of full dynamic lighting, mainly because I already a day/night system and procedural weather which makes baking every possible lighting setup kind of a chore, but I’m not sold yet, mainly because of the performance concerns.

To add to that:

It doesn’t make much sense to have modular flat surfaces anyway. Why render a flat surface with, let’s say for example, four flat meshes when you can render it with just one? Less vertices and triangles with one mesh anyway, with just one draw call instead of four. In UE 3 and 2 part of the reason why modular geometry was favoured was because of the forward renderer. It meant that for every dynamic light (explosions and other effects) that cast light on a static mesh, that static mesh had to be re-rendered. This isn’t the case with UE 4 since it uses a deferred renderer, there are no multiple render passes for meshes if multiple dynamic lights cast light on them.

The only thing that matters is the flexibility it provides to the level designer, plus implications to lightmapping.

And, remeber, UE 4.8 has an experimental feature to take several meshes and “bake” them into one mesh and draw call. While the feature is intended for mobile and VR, it improves performance for any game situation, so long as the drawbacks are acceptable to you. You could setup your modular assets and then test this out to check that any ill effects are acceptable in your level.

Hey guys can somebody help me I’m trying to make modular assets to use in ue4. I made some floor and wall meshes to build a house with in blender but when i import it and try to snap the meshes together they never fit together flush. I tried reset location or each mesh to 000 and everything else i could think of but nothing works. When i finally got them to fit flush by manually getting it the best i could the lighting shows that there are still spaces between the meshes. Its driving me crazy.

Most likely your pieces aren’t in the same units as UE4

Also note, if your floor/wall meshes are very simple, then there’s no reason to make them modular, it would be better to model things in Blender like you want and export to UE4, since the memory advantage would be almost nothing but would cost a lot for draw calls.