Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

Having trouble decoupling ambient light from sun

Discussion in 'High Definition Render Pipeline' started by Sendatsu_Yoshimitsu, Feb 25, 2021.

  1. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    I'm working on implementing a very basic day/night cycle using 99% baked lighting, a single realtime or directional light that rotates to provide convincing shadowcasting, and a bunch of color grading to visually indicate time of day without actually making it hard to see.

    Where I'm running into trouble is getting the indirect bake. If this were circa 2018 SRP I would go into the environmental lighting tab of the render settings and just bump the intensity up, but now that everything has been reorganized around simulating physically accurate lighting parameters, that doesn't seem to be an option. I've scoured the Physically Based Sky documentation hoping it would have a similar workflow, but every single option I'm finding to bake ambient light in the scene seems to be based around precomputing bounces from a static directional light.

    So what's the intended workflow here? Using a single realtime light to shadowcast into a scene whose utility lighting mostly comes from the baked indirect is such a common workflow that I can't imagine it's gone- am I missing a volume option somewhere? I know there's an indirect lighting controller, but that only amplifies light already in the scene, and if the directional light is dynamic and sometimes below the horizon it won't get picked up.
     
  2. i2eilly

    i2eilly

    Joined:
    Feb 27, 2018
    Posts:
    45
    I am pretty sure that the ambient light is now sourced from the skybox volume, so you could try to change the sky box colour/intesity prior to the bake and it should brighten up your scene for you.
     
  3. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    Oh hey, I think you're absolutely right- at least if I pop in an HDRI or some kind of cubemap it absolutely provides ambient light, thank you!!

    This is getting into nonsense I should probably just keep poking at the documentation to figure out, but do you happen to know whether the physically based sky itself is capable of generating environmental light? It's an alternative to the HDRI and I see settings to expose/multiply environmental light, but bakes using the physical sky don't seem to record any static indirect light like the HDRI does.
     
  4. Julien_Unity

    Julien_Unity

    Unity Technologies

    Joined:
    Nov 17, 2015
    Posts:
    68
  5. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    That's handy, thank you!

    If anyone else runs into a similar issue, I finally chased my problem down to editor UX: I was trying to set ambient lighting up entirely through volumes, I didn't realize that indirect lighting game from the Environment(HDRP) setting in the lighting tab.
     
    i2eilly likes this.