Best practices for big Buildings in UE4

The occlusion tests still consume fill rate even for invisible objects. They just don’t consume as much pixel shader power as the fully-shaded thing, so if lots of things with complex shaders are hidden, they’re a win. If the occluded things use simple shaders, or are not fully occluded (visible through windows, leaves, fences, etc) then it’s actually a loss compared to “just draw it.”

Building modular pieces that have both front- and back-sides “feels” natural, but isn’t the most efficient way to build the geometry. On the other hand, if the player can look out the window, and is supposed to see an external part of the mansion, then making the pieces “thick” is the easiest way of making sure you don’t forget any spots :slight_smile:

When modeling architecture I approach it from Modular to begin with, but then to keep the calls down I GROUP modular bits. So if I have a long hallway that uses the same arched castle hallway 12 times, I will duplicate them in my modeling program (Maya) combine them all and re-assign light map UVs. The trickier bit comes when applying the collision shapes, although if i have them for the first modular bit, then I can duplicate and translate them as well, as long as they don’t overlap at all (A very important detail).

All collision pieces must be combined in the end and given the UCX_ prefix that matches the model name you will export.

for example :

castleHallway_one
UCX_castleHallway_one

select those together and export as castleHallway_one.fbx


Now when I make a castle piece that repeats a shape 12 times, the downside is that shadows may suffer. I can scale up the resolution of the texture in UE4, but at some point it just may be too big, and you will suffer problems on that end. So when I make modular pieces I make groupings and can decide which is best.

So I’ll make a hallwayArched_six (which has six spans) and a hallwayArched_two (which has two spans). I do the same for many areas of my game because this keeps my calls down for all the geometry.

However, sometimes i just build in UE4 with the single shapes until i know what my overall building will look like, then export the entire building to Maya as an FBX. Then I can decide what groupings I want to make in maya (with the originals not the exported work which will turn into triangles). I keep the UE4 fbx file as a template while I make groupings of various geometry, including floors, stairs etc.

Working this way is particularly helpful for accurate construction of stairs. I generally don’t like to use any automated shapes out of UE4, preferring to model and UV map all geometry myself.

Remember that as you work you will need to make sure you have proper UVs for shadow rendering, and I can’t stress enough that when you are testing your game and you don’t render shadows even at preview level, the playback will get slower and jerkier, because it’s trying to generate ALL shadows in real-time.

For modular worlds this gets heavy quickly.