Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Lightmapping Baked Shadow Intensity

Discussion in 'General Graphics' started by WimB, Dec 5, 2019.

  1. WimB

    WimB

    Joined:
    Sep 23, 2014
    Posts:
    35
    Hi

    Is there a way to control the strength of the shadows that are baked with lightmaps?
    No matter what the shadow strength is on the baked lights, the shadow strength is always the same and too strong. Anyway to change the baked strength?

    Regards
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    Hi,

    You didn't mention which render pipeline you are using, but if you are using HDRP, then you can use Indirect Lighting Controller Override post-processing effect. That allows you to do some adjustments, although it doesn't offer option to alter the lightmapped shadow density, just the intensity of indirect diffuse lighting and intensity of indirect specular. But it might already help in some situations.
     
  3. WimB

    WimB

    Joined:
    Sep 23, 2014
    Posts:
    35
    Hi Thanks for the reply
    I am just using the normal original render pipeline, not universal or HDRP
     
  4. kslusarz

    kslusarz

    Joined:
    Mar 1, 2018
    Posts:
    7
    @WimB

    You can kinda hack it by adding 2nd directional light that cast no shadow - tho it's not the best solution
     
  5. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    @kslusarz Old school rendering hack, but that's one viable option too if nothing else helps.

    @WimB as you are using standard render pipeline, it might be worth looking into customizing a shader so that you could access lightmapping data and adjust it. It might be easier than with HDRP/URP, too. With a customized surface shader you could just adjust whatever you need in the lighting data, i.e. apply post processing like you want.

    I think I could provide a quick example of a custom shader if needed.
     
    kslusarz likes this.
  6. WimB

    WimB

    Joined:
    Sep 23, 2014
    Posts:
    35
    Thanks for the reply.
    Adding a second directional is an light interesting idea, but it would also make the rest of the scene brighter in the bake which wont work for this unfortunately
     
  7. WimB

    WimB

    Joined:
    Sep 23, 2014
    Posts:
    35
    Thanks. if you have an example to test that would be great, Its purely the shadow intensity I wanted to change nothing else. Im not a shader programmer/programmer but have been using the shader graph, maybe it can be done in this?
    Thanks for the help
     
  8. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    yes, if you have an example shader (including terrain) would be awesome!