Search Unity

Lightmapping hard shadows?

Discussion in 'Editor & General Support' started by jefequeso, Nov 3, 2013.

  1. jefequeso

    jefequeso

    Joined:
    Oct 16, 2013
    Posts:
    29
    Is there any way to adjust how "blurry" the lightmapping is? In other words, I want to make lightmapped shadows closer to being hard-edged, like real-time hard shadows. It's a stylistic thing :p

    Is it possible?

    EDIT: I'm using the free version, btw
     
  2. EvilArev

    EvilArev

    Joined:
    Nov 10, 2012
    Posts:
    40
    Aside from the "Shadow Type" setting for the light the softness of the shadow is also controlled by the light settings in the Ligtmapping window. The "Shadow Angle" parameter determines that, while the "Samples" is responsible for the quality (more samples are needed for blurry shadows). Lightmap resolution is also important here. Lower res textures won't give you sharp edges.

    Best regards,
    Peter.
     
  3. jefequeso

    jefequeso

    Joined:
    Oct 16, 2013
    Posts:
    29
    Ok, thanks. I'll experiment with it.
     
  4. MiriamAteo

    MiriamAteo

    Joined:
    Sep 26, 2017
    Posts:
    17
    Hi, sorry for necroing this thread, but I'm having the same problem. I have an office scene with light streaming in from a window front on one side. Baked shadows give me a nice diffuse light scattering effect throughout the room, but the shadows cast by tables immediately infront of the windows are way too blurry. See the attached screens for clarification of what I'm trying to do.

    I've tried every parameter and resolution I could find, even tried layering 2 directional lights on top of each other (one with no indirect light intensity at all). Short of putting a real time light into the scene I cannot get anything even close to the effect I want, and I can't do that because we're targeting mobile platforms. How is it so hard to just take what's right there in the real-time light and bake it as is? Is this not possible in Unity or am I just being an idiot?

    Help please :(

    EDIT: nevermind, found the culprit. It's a resolution issue, but not something that can be controlled in a setting. The entire office is contained in one huge mesh, and Unity apparently can't split the lightmap into more than one Atlas. Even with a max Atlas size of 4k I get very low resolution lightmaps, hence the blur. Splitting the mesh up into smaller parts fixed the issue.
     

    Attached Files:

    Last edited: Mar 19, 2018