Home Unreal Engine

Lightmaps look ok on hard edge, not on soft edge with normalmap (UE4)

Willog
polycounter lvl 2
Offline / Send Message
Pinned
Willog polycounter lvl 2

Hello.

I have a problem with my meshes; They have soft edge with a normal map and the shadow appears strange on the bottom of the mesh, and the shadows behind the mesh are not great.

I noticed that when the mesh has hard edges, there is no problem with it, and all become ok. I specify than the mesh with hard edge has 64 resolution of lightmap, the one with soft edge has 512. They have the same uv lightmap.

I already tried increasing resolution of my mesh, snapped on grid (3dsmax), increase the bound, played with lightmass settings, and nothing work ..

Someone have an idea?

Thanks. 




Replies

  • Barbiturat
    Options
    Offline / Send Message
    Barbiturat polycounter lvl 10
    Hi, padding between uv shells should be bigger, especially if lightmap has low resolution.
    http://wiki.polycount.com/wiki/Edge_padding
  • Willog
    Options
    Offline / Send Message
    Willog polycounter lvl 2
    Yes, I already try with a bigger amount of padding, 4 pixel or even 5 but nothing change :/ 


  • Barbiturat
    Options
    Offline / Send Message
    Barbiturat polycounter lvl 10
    Also check "Light Map Coordinate Index". It should be "1" in your case. 
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    You can try disabling lightmap compression and see if it makes it any better. But generally they should be compressed and you shouldnt have a full project with uncompressed lightmaps on everything. If it helps, and its only this asset that gets the issue, you can disable the compression on its lightmap only. The compress lightmaps checkbox can be found under the world settings/lightmass. There is also an option in the project settings to make lightmass taking normal maps into account during bake, or to ignore them.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    If the artifact is there under dynamic lighting then lightmap uvs have nothing to do with the problem. What does your normal map look like? Did you bake using an averaged sync(mikkT) method? If so, did you allow UE4 to calculate the tangents/bi-normals on import?
  • Willog
    Options
    Offline / Send Message
    Willog polycounter lvl 2
    @Barbiturat : I already check my mesh on index 1 :/ 

    @Obscura : This setting was already uncheck for the test, with and without don't change anything on my mesh. I also tried with the option "Use normal map for static lighting" check and it change nothing.

    @musashidan : I baked my map on substance designer with the mikkt method, for the import I used the default settings, and with my test the normalmap, or the entire smoothing group seems to be the problem, but I don't know why :/.


  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Try setting your normal import options to 'compute normals' and 'mikkT'. As it is you're importing the mesh normals and using the legacy tangent basis.

    For a fully synced workflow you want both baker and render engine to take care of the normals for you.
  • Willog
    Options
    Offline / Send Message
    Willog polycounter lvl 2
    I just tried this, and the result was the same for the lightmap but my normalmap had strange shading effect. I tried to bake with another tanget space plugin on designer but same result :/.


  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    You should keep testing with only fully dynamic lights(no static or stationary) That way you can completely rule out lightmaps in your troubleshooting. Are you using mesh distance fields or DFAO?

    Have you changed the cascade shadow settings at all?
  • Willog
    Options
    Offline / Send Message
    Willog polycounter lvl 2
    When I pass my light on dynamic, the problem is not present anymore. It's only when my mesh is on static, or stationary.

    I only use the default setting on UE4 from a new scene (Because I don't understand why in all of tutos or article on the net, people can have good lightmap at the begin of their project, and not me *-*). But all of the tutos use a mesh with hard edges, and 0 normalmap. Or it's maybe a default option who can cause it?

    I tried to increase several options on the lightmass, it tend to decrease the artifacts, but it's strange than my mesh create this even if the normal map work well, the lightmap uv is good etc.
  • Willog
    Options
    Offline / Send Message
    Willog polycounter lvl 2
    Re all ! 

    I come back here because I think I found the problem ! 

    -My first mistake was I exported my mesh with tangent and binormal from 3dsmax, and for unreal I had to uncheck this.
    -Next, the problem was related to the lightmass parameter, with few test and some theories, I found the correct settings.
    -And finally ; for some problems, the snap on grid was the solution, and the rest was due to the lightmap density was too low and needed a little adjustment.

    Thank you to everyone for taking the time to help me and give tips for this problem :).
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Willog said:

    -First of all, I exported my mesh with tangent and binormal from 3dsmax.

    This is incorrect if baking in Substance and rendering in UE4. See my post above on averaged(synced) MikkT workflow. You don't want to export tangents/bi-normals from Max.
  • Willog
    Options
    Offline / Send Message
    Willog polycounter lvl 2
    No it was a mistake in my sentence, I listed the bad manipulations made by my hand, so you were right :) I'll change my sentence
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Willog said:
    No it was a mistake in my sentence, I listed the bad manipulations made by my hand, so you were right :) I'll change my sentence
    Oh right. Well, glad you got it sorted. ;)
  • MrTartarus
    Options
    Offline / Send Message
    MrTartarus polycounter lvl 5
    Hello there,

    I have the same problem. (I did 2 UV set on maya, the second for the lightmap) and It is reacting the same way.




    @Wilog, Howw did you solved your issue ?

Sign In or Register to comment.