Strange show after buid lighting in ue4.12.2

hi,
i got an strange shadow after build lighting in ue4.12.2:

i got an lightmap in my fbx
no smooth mesh selected…

what is my mistake?

thanks for an answer and a sunny weekend for everyone :slight_smile:

greetz
loopon

ps. i´m sorry for the title… :-))

What do the channel 1 UVs look like? You can open up the static mesh editor and click the UV button, and change the drop down to UV Channel 1.

hi ZacD,

i changed the uv-button onto UV Channel1 and saved the static mesh…
but when i reopen the static mesh editor, the UV Channel is on 0 again.

so i got the same build lighting result as before.

your lightmap resolution is too low

I wanted to see a screen shot of the UV channel 1, changing that drop down only changes the preview.

@darthviper107
thanks for this tip…maybe 512 is high enough?
@ZacD
ok… here is he screen shot:

3142ab30f434b72527b881d18fc6f835112f3877.jpeg

You need some more space between the UV islands and you need to try and make sure that the rectangular pieces are 90 degrees shaped.

You probably need UV splits on the 90 degree angles or a higher resolution light map.

This one is pretty simple, but im not very good at explaining things so bear with me.

Lightmass needs like ~3 pixels between each UV island when the edges are hard angles. for the side of a cube, that means the edges there need to have 3 pixels between the UVs for the lightmap.
Unreal Engine since 4.4 has had a built-in tool for separating and spacing our your UVs in a way that lightmass can work with, and its super easy and useful to use.

Here’s how:

  • Open your static mesh.

  • make sure that your UVs are not completely stretched like crazy. * This tool only re-positions your UVs, it doesn’t create them from scratch*. They can over-lap, they can go beyond the 0-1 range, they can do whatever they want… except be stretched. Use the option here to visualise each of your UV channels. By default, UE4 will put the lightmap on to the second UV channel, which is channel 1 (the first being 0, your default texture channel).


  • Look at the ‘build options’ under each of your LODs, and make sure that ‘generate lightmap UVs’ is checked.

01.5.PNG

  • here you will find some settings that may or may not make sense, but all we need to worry about for this is: ‘generate lightmap UVs’ ‘minimum lightmap resolution’, ‘source lightmap index’, and ‘destination lightmap index’

  • we are going to work back-and-forth between this menu and the one slightly below it, under ‘static mesh settings’

03.PNG

  • an overview of what we are going to do:

  • build settings: will set the UV channel for the lightmaps, and bake the UVs so that lightmass can work properly

  • static mesh settings: will define the resolution of the lightmap.

  • source lightmap index is where the Unreal Engine will get the UVs from to make the lightmap UV set. This is ‘0’ by default, and probably wont need to change unless you’re doing something complex.

  • destination lightmap index is where Unreal Engine will put the lightmap UVs. You can set both of these settings to ‘1’ if you have weird UVs in channel 0 and a pre-made lightmap UV set in channel 1. We’re going to leave these alone though, they dont need to change.

  • minimum lightmap resolution defines how much space to put between your UV islands so that the lightmap doesnt bleed through to other areas of the mesh, creating the artifacts that you are having. the lightmap resolution that you end up using can always be higher than this, but should never be lower.

  • You have, in your mesh settings, over-written your lightmap resolution to 256. Let’s work with that then. Under the static mesh settings, set the lightmap resolution to 256.

  • Under the build settings, set the minimum lightmap resolution also to 256.

-click ‘apply changes’ under build options to save these changes.

  • notice how the UVs for this mesh have now changed. This is the UV set that our mesh will use for the lightmaps, and is set perfectly by UE4 to ensure no bleeding or artefacting in our lightmaps occurs.

  • if, after baking the lighting, you still see artefacts, use alt-0 in your viewport (or the setting in the image below) to view the resolutions of your lightmaps on your meshes in the world.

03.PNG

  • Each square represents 1 pixel for the lightmap. If the squares are too large, your lightmap resolution may be too low. consider increasing the minimum lightmap resolution and the static mesh lightmap resolution until the artefacts go away, then increase only the static mesh lightmap resolution for increased clarity.

Happy deving :slight_smile:

wow…

thats, why i love this community…

many thanks to all !!!

and a special thank you goes to Construc for his great tutorial.

now i know again, that i don´t know ue4 at all :-))

a great weekend for everyone!

greetz
loopon