Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Directional Specular LightMap causing bad results with custom LightMap UV channel

Discussion in 'Global Illumination' started by Thomas.Guillory, Aug 11, 2015.

  1. Thomas.Guillory

    Thomas.Guillory

    Joined:
    Jul 22, 2015
    Posts:
    6
    Hey guys.
    This is an issue that's been causing me headache the past couple days. When baking lightmaps with the "non directional" option, my maps look fine. But I need to use the "specular directional" option in the end since I will be using spec maps, and the results are far less than satisfactory.

    Here's an image that shows what I'm talking about using an example mesh. I created my own lightmap UVs in a second channel so that I could control my seams and softness / hardness of edges. When baking "directional specular," however, the edges that are fine in "non directional" get really jacked up. The only way I can avoid this right now is letting Unity generate UVs for my mesh, but this results in hard many hard edges and seams in incorrect places.
    BakeResults.png

    Just curious if the problem is user related and I'm missing something here.
    Thanks a ton!

    I posted this in another forum on here, but this one seems more appropriate. Sorry for the unnecessary threads.
     
  2. Thomas.Guillory

    Thomas.Guillory

    Joined:
    Jul 22, 2015
    Posts:
    6
    Another thing we are interested in which may not be possible without a more robust shader, but:
    Is it possible to retain normal and specular information using the Non Directional bake options? Using Specular Directional results in a ton of maps and in general, so far, lousy looking bakes.
     
  3. Thomas.Guillory

    Thomas.Guillory

    Joined:
    Jul 22, 2015
    Posts:
    6
    Even stranger, after opening the lightmap images in photoshop, none of these artifacts seem to be visible in them. Here's an example of the black line that's appearing on the roof where the shadow meets the frontal plane that is lit:
    roofLM.PNG

    There is no black line, like the model shows...
    It looks like the errors are happening at smoothing group change areas - which is odd, because that has nothing to do with UVs and doesn't happen in a Non Directional Bake.
     
    Last edited: Aug 12, 2015