Download

1024 lightmap density enough for complex objects?

Take a look at some of these pics.
The structure looks pretty bad (brown splotchy patches) and I’m wondering if it’s my light map density or UVs.

Any ideas? Should I just crank up the light maps to 2048 or something?

It looks like a UV layout problem. Are there wide spaces between UV islands or pieces? are any overlapping? asking about lightmaps, not texture UVs. It could also be light settings for the scene, such as distance field AO or global illumination.

Note: The pictures were posted twice, with one of the pictures having no material rendered on the surface of the multiple columns.

@presto423 thanks for the reply, I think you’re right.
Sorry for double image posts, When the preview doesn’t show up in the post composition area I get confused about attachments vs embedding.



I think I might be looking at two potential problems (minimum). Let me know if any of the following sound right in your experience…

  1. I don’t have enough edge loops in the geo of the columns (ie. long thin polygons)?

  2. I’m using the ‘smart UV project’ Blender method, meaning I’m not defining edges and therefore loosing the res as you say?

Another thing: Do you know if Epic changes the UVs of an object upon FBX export?
I could have sworn my original .obj has proper UVS, but the first FBX uv looks pretty off.
The light map looked cleaner though?

Am tinkering but any specifics you have are appreciated :slight_smile:

1 column = 1 object = 1 lightmap = Low res lightmap
X columns = 1 object = 1 lightmap = High resolution lightmap => is really bad for lighting

Smoothing group is your next step, not increasing polygons number!

Here’s UVs in the engine




No problem about that attaching of images. I’ve seen it before, and had a problem too. Which option is better, the attach or insert? I think insert won’t double post, but be careful of its’ sizing.

There’s definitely overlap in the first UV chart. The second one looks great overall, but the spacing might be a bit too much…although it’s quite evenly spaced. I think you’re correct about edge loops and the Blender smart UV method and also the UE4 changing UVs by default. There’s the option to maintain UVs on import, or to generate new ones via the auto-generator built into the engine (which is accessible in the Static Mesh Editor). I’d suggest 3-4 more edge loops on the long cylinder part of the columns, and perhaps 1 or 2 extra edge loops at the transitional areas too (transitioning from one diameter to a bit larger diameter, and then a curving slope to the square top structure. In the picture, the one edge loop about 1/3 up the column roughly corresponds to the height the incorrect shadowing reaches. And it’s probably also corresponding to the 1st UV chart, where there’s a ton of overlap in the middle / middle-left area. Lots of overlapping UVs in the right area too. Try shrinking the UVs in the 1st chart in order to space them out and remove the overlapping entirely. Adding a few more edge loops to the columns might make it easier to separate the UV islands / pieces and remove that overlap.

As for the Blender Smart UV thing, skip it. Re-work the UVs before exporting, and then ensure that UE4 is set to preserve the imported UVs. Look that up in the docs for how to do it. It’s somewhere in the main lightmaps / UVs pages. I’m working with dynamic lighting mostly now, but recall a ton of reading I did in the forums and docs regarding UVs and lightmaps. They’re tricky, that’s for sure. Several rules about lightmaps and UVs, particularly in reference to UE4, are as follows:

  1. No overlapping UVs
  2. Size of UV islands (pieces of the mesh flattened to fit in the lightmap) can be decreased or increased in the chart, but try to utilize the 0-1 UV space by not having huge gaps between the islands, and also not letting the islands go off the edge of the chart. Since you’re maintaining the UVs from Blender / external app, and not using UE’s built-in auto-generator, create at least a 1 pixel wide margin for the UV lightmap chart. No UVs / islands / pieces should be crossing over that margin at all.
  3. Cut up the islands into smaller pieces if necessary, but in such a way that it correlates to the structure of the mesh and the intended lighting. This one is a tricky one, if you ask me, because it’s kind of arbitrary as to how exactly to get the intended results with analyzing the mesh’s distinct features.
  4. If all else fails, export the mesh by itself from Blender into UE4, use the UV auto-generator to create a UV lightmap in UE, and try that. If it’s practical and easier, cut the mesh into a few pieces prior to exporting. Then rebuild it in UE4, merge / group the mesh pieces into its whole, and then generate the UV lightmap for the final.

Another aspect of exporting from Blender to UE4 is the axes (XYZ). They’re different in Blender from UE4. I think -Y or Y needs to be changed to +Z (Z up) before export, and the other axis to X. It’s the last two that need changing in Blender when in export settings. Otherwise, UVs and mesh faces / vertices are going to be facing the wrong directions in UE4.

Exactly. On your lightmap, it’s obvious that your columns do not receive enough light, hence the weird shadows. You should use only one column and instance it.

Avoid going more than 1024. In your case it should be far less. Your model is quite simple.

Hey Guys,
Thanks for the reply and sorry for my delay.

@presto423 you’ve given me a ton of great insight and approaches.
Many of the things you’ve said will give me different things to try and I super appreciate the detail of your post. 100 thanks my friend.
Thanks also for the modeling / edge loop suggestions, and for the potential axis conflict between Blender and UE4. I go do some research on that right now.

@Trucabulles thanks to you too. Appreciate the quote and tip. I will look at instancing now.

thanks very much @Metathesus
I missed your comment originally when it got sandwiched between two images.

you’re welcome…
I went in Blender today, and noticed that a certain option needs to be checked to get the axes exported correctly. I also checked UE’s import box by trying to import a model I made, and it has a ‘Convert FBX to UE coordinate system’. However, the model didn’t have the metal texture I applied to it in Blender when I added it to the level. It looked how it looks in Blender in Look Dev mode, or without the metallic texture I set. So, in essence, do testing with the export settings in Blender AND with the import settings in UE4, separately at first I would suggest.

@presto423 thanks again for the heads up

Because of your post, I did a test export.
The Blender>Unreal pipeline seems to be working cleanly on my end (I think).
I just tested my newest Blender 2.8.(3?) FBX export, and it seems to import well.
For reference I’ve attached a few images for others who stumble on the thread.

UE4 generated nice light-maps for me – It makes decent space of the original UV (with some padding).
I guess I’m splitting up every poly in column model. I’m a n00b. (UV 00 and 01)

The Blender auto UV is still pretty nice though for quick objects and rookies like me.
Back to the homework :wink:

p.s. not sure about the smoothing group warning. That’s a 3DS MAX terminology isin’t it? Maybe that’s crease line in Blender?

20200330-15_47_48Window.png
20200330-15_50_34Window.jpg

I’m thinking it’s the “Convert Scene” option in the UE import window. The Blender settings are at -Z forward, and Y up. I’m a newb too, but I think UE is Z up and X forward (or -X forward), referencing positive Z as the vertical up axis, and X or -X as the horizontal forward-facing axis when opening a new scene in UE. It’s that, or those reference the axes for normals exclusively. The shadowing looks great in the final photo. I’m working on a 3rd-person shooter basic scene, and the shadows have jagged edges, and are worse where they’re at angles to the shadow edges parallel to the walls. I’ve tried a bunch of things: scalability settings up, modifying CSM settings, and more. It’s hardly improving. I think there’s a point at which I have to ask for help in the forums, but I rarely receive a reply with a solution. I don’t post my own threads much, though, so it could be too low frequency amidst all the other posts. I’m really bothered by all these glaring issues in Unreal, and once I get a new computer, I’m going to try a different engine or two because it’s basically impossible to create something with the rampant issues I encounter and things I’m not sure how to do in Unreal.

hey good tips on the axis differences, good eye I hadn’t noticed that… I just saw it didn’t come in upside down and I was lik, good enough lol…

regarding your shadows, did you over ride the light map settings like I did?
I doubt with my rookie knowledge I can help you but worth a question :slight_smile:

The floor is where those jagged shadows are, and it’s already at 512. I considered it, but I thought 512 is enough. It should work at 512. If it was a larger scene, with more variance in shadowing / lighting, I might choose a higher value. I’ve seen it sharper and not jagged before, but I don’t know how to re-create that.