Blender modular assets to UE4 Light mapping

I’ve spent about 80 hours total in the last two weeks watching tutorials and scouring forums. While there is a lot of info out there, none of it seems to explain what I thought would be quite simple. I want to model modular assets (walls, ceilings, floors) in Blender, export them to UE4 and start building, without light leaks or texturing issues.

I think the biggest issue I’m having is the Lightmap UV. In blender, I make my wall asset (a modular 4m x4m x .2m square wall at this point). I set the first UV for the texture, add a grid image of 2048x2048 (the size of the texture) line things up, and okay, Looking not bad! Then I create the second UV for the light map. I use lightmap unpack, give it a heft margin and the use ctrl + P to increase the margin further. I’e tried allllll sorts of things here, and most of the time, I just don’t get what I’m looking for. Sooo many questions. Can anyone point me to a definitive “best practice” resource for this? I’m very noob to this. Am I suppose to do anything else in blender, like bake lighting there, or is there something on the UE4 end that I’m suppose to do? UE4 defaults the lighting channel to channel 0, but should I switch it to channel 1 since that sounds like it would be the second UV channel? How does it know what to choose for the UV channel?

Thanks Gals/Guys,

As far as lightmapping is concerned, your second UV channel should be set up to be your lightmap. When you import to UE4 you need to make sure that the Generate Lightmap UV’s option is disabled, otherwise it will create a new UV channel and assign the lightmap index to that channel. If you disable the option then it will automatically set the second channel as your lightmap.

As far as modularity goes, you shouldn’t construct walls/floors/ceilings out of multiple meshes that way, it will give poor results in lighting due to how UE4 builds lighting. Instead, try to make complete sections where any separations will be on the corners, it will look better and have better performance because it uses fewer objects. Modularity is largely used to save memory, yet a simple wall uses very little memory and has a much bigger impact due to increased draw calls.

Thanks Darth! I’ve seen so many conflicting answers to the modularity build style. I’m trying to do realistic Archviz stuff. My biggest concern with creating my walls as a few large pieces, rather than 100 small pieces, is that I am designing a 2 story office building with all sorts of wall shapes AND I’m worried about tiling being to the same scale on all walls, and lining up properly. I believe that topic refers to “texels.”

I managed to solve my problem for the moment, but not in a happy feel-good sort of way. The issue was that I had it looking perfect…then, all of the sudden, it rebuilt and there were these large (3inx3in) triangular shadows where each modular piece met up. No amount of adjusting any setting would fix it. I finally gave up for the night (3am), closed the program and put comp to sleep. In the morning, I re-launched Epic Game Launcher, Launched the game engine, and BAM! everything was good again…So, it’s working, but in that uneasy sort of way.

Some other interesting learnings in my quest for modularity:

UE4 has modular architectural resources in their sample content, which caused me to assume 2 things: The first, is that they encourage modular building. The second, was that it must represent a “best practice” form of modeling modular walls, so I should dissect it! I looked at 4 things:

Q1: Did it also have shadow problems on my level when things were broken looking?
A1: Yes, and those triangle corner shadows were bigger.

Q2: What are its dimensions?
A2: 4m x 4m x 20cm. The same as mine, and there are other sizes, too.

Q3: What are its 2 UV maps like?
A3.1: The Texture map is huge, goes off the screen, and is red instead of white, which makes me feel like UE4 is even saying “this is bad.” Perhaps these walls weren’t Quality inspected? When I look at the tile material I use on it, it is 4x smaller than on my walls, where I let one 4m x 4m wall face take up the whole 0 to 1 UV texture space. It appears that the designer let the texture UV map size represent 1m^2. Put another way, if I were to bring their model into Blender and look at the UV lightmap, just the front face alone for the wall in the UV map would be 4 times bigger than the whole 0 to 1 UV space. I hope that makes sense.
A3.2: Their lightmap UV looks better than their texture one. It is at least fully contained within the UV space BUT the spacing between the UV islands is not significant looking. As in, if the UV space represented 128x128 pixels, which is what they have it set to by default for the light map resolution, then the margin, or spacing, between the islands is about 1-2 pixels. Sounds small compared to other sources.

Summary: Sometimes, just closing UE4 and restarting it will solve issues that seem to have happened for no good reason. UE4 provides modular assets that seem to be designed in a way that breaks the rules…so, for me at least, the jury is still out for the hope of finding a “best practices” for archviz building.

It might be easier if you post some images of the problems you are facing, because there are a lot of different things that could be causing the shadow problems that you describe.

As for A3.1; the uv layout that goes off-screen (and is red), is perfectly acceptable (in professional environments as well) if its intended to be textured by a seamless tiling texture. The reason for this is simple. Seeing as the texture is seamless it doesnt really matter if the uv’s fit perfectly within the 0-1 uv space, and the size of the texture can simply be controlled by multipling the uv coordinates in the material editor.

Hi there, i would like to give it a view, but its not on youtube anymore??

Hey, sorry about that @eaglegal, the audio got trashed so I had to re-upload. Here you go

Or you could just use Mesh Tool :smiley:

Mesh Tool is an mesh editor for Unreal Engine. It allows you to edit mesh assets and prototype props and levels without leaving Unreal Editor.

Select & Transform

  • Vertex/Edge/Face/Quad/Object Mode
  • Select/Translate/Rotate/Scale elements
  • Vertex Snap
  • Delta Transform
  • Marquee Select
  • Convert Selection between Vertex/Edge/Face
  • Show/Hide Transform Widget
  • Customizable Transform Widget Pivot

Vertex Op

  • Create Face from Selected Vertices
  • Collapse/Weld Vertices
  • Align Vertices
  • Set as Ruler

Edge Op

  • Split/Turn/Bridge/Extrude Edges
  • Insert Edge Loop

Face Op

  • Slab Transform
  • Draw Quad/Circle/Box on Customizable Draw Plane
  • Flip Faces Normal
  • Extrude/Inset/Duplicate/Separate Faces
  • Assign Material to Individual Faces
  • Flatten Faces / Plane Cut/ Mirror Faces

Texture Map (UV) Op

  • Planar or Box Mapping
  • Pan/Rotate/Scale/Flip UV
  • Match UV / Flow UV

Object Op

  • Flip All /Weld All Vertices
  • Hide/Show Other Actors
  • Recompute Normal
  • Insert Primitive
  • Auto UV / Auto Smooth

Mesh Op

  • Save/Duplicate/Browse to Current Editing Static Mesh

**Modules: **

  • MeshTool (Editor)

Important/Additional Notes:

  • Full c++ source code included, works with both Luancher and Github builds

  • Works with both C++ and Blueprint only projects


new course artichitercutral with unreal engine