Search Unity

Question Can I achieve specular highlights on my water surface with only baked lights (HDRP)

Discussion in 'Global Illumination' started by laurienash, Jan 28, 2021.

  1. laurienash

    laurienash

    Joined:
    Mar 15, 2013
    Posts:
    61
    Hiya,

    I'm struggling to understand if it's possible to get specular highlights from baked lighting?

    I'm using Unity 2020.1 with the HDRP render pipleline.

    I've got a water surface, for which I've made a PBR shader in shadergraph, which uses a flow map.

    You can see the effect here:

    https://gyazo.com/9c146f1649fd750c970305e43ae80a43

    When I light the water with realtime spotlights, it looks like this:

    CaptureSpec.PNG


    When I bake the lights, I lose the specular highlights:

    CaptureBaked.PNG


    Is it possible to achieve the effect of the realtime lights by setting them to baked? I'm finding that setting them to mixed drops the framerate too much.

    I do have light probes in the scene.

    Thanks!
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Unfortunately, there's no easy way to go about this. Baked lights will lack realtime specular contribution, which is by design.

    Alternatively, you could try one of the following:
    • Implement "fake specular" in your shader. It would simply be a camera aligned gradient multiplied against the surface normals.
    • Place a reflection probe within the scene, and set the sky HDRI to an image containing high frequency detail. Studio HDRIs should work well for this.
    • Alternatively, try using mixed lights again, but make sure you optimize HDRP settings first. There are many things to tweak, so make sure you disable those that you do not need.
     
  3. DefyGravity

    DefyGravity

    Joined:
    Mar 26, 2020
    Posts:
    6
    We have a huge scene with 304 lights that we turn on for baking only. For PBS specular we have a smaller set of real-time lights. Maybe try 2 sets of lights?