Search Unity

Question Relationship between reflection probes, light probes, light maps and raytracing

Discussion in 'High Definition Render Pipeline' started by mchangxe, Feb 15, 2023.

  1. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69
    Hello guys,

    Ive been using hdrp for the past year in projects but ive not done a proper deep dive into the concepts of hdrp rendering. Now with some free time on my hands, I decided to once and for all dive into the concepts of not only hdrp rendering but rendering in unity in general. After doing some research, combined with my previous experience with hdrp and urp, I have some questions.

    Before that, heres what ive done so far:
    1. I've watching a roundup explanation of rendering techniques in hdrp by Pierre from here:
    .
    2. Played with reflection probes, light probe volumes, ray tracing and path tracing in HDRP.
    3. Went through majority of the tutorials from the HDRP sample scene.

    After doing so, I have a pretty basic understanding of how rendering scenes are done in hdrp (I imagine URP is a toned down version of URP, with similar features such as probes and lightmaps). I understand that to get proper reflections, I need reflection probes; to get proper indirect lighting, I need light probe volumes; without relying on ray tracing, i need to bake indirect lighting information.

    However, my questions now are about the relationships between concepts such as probes, raytracing and lightmapping:
    1. Whats the relationship between raytracing and probes including both reflection probes and light probes? If I use raytracing in a scene, do I still need to place reflection probes and light probes?
    2. Whats the relationship between raytracing and lightmaps? If I am using raytracing, do I still need to use lightmaps?
    3. Whats the relationship between lightmaps and light probes? How do they work together in a scene?
    4. whats the relationship between reflection probes and light probes? How do they work together? Do reflection probes contribute to global illumination?

    Thanks in advance! Ive always thought about these questions in my past experience with unity rendering, but brushed them off. I would now like to learn about unity rendering in a more systematic way, what are some resources that I should look into? Books? Videos?
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    1. Raytracing still has some limitations, like the distance a ray does before it falls back to a baked result, or the number of bounces it does. You can make both very big, at the cost of performance.
    ex : a ray for RT reflection will bounce from a reflective surface and then use the rasterized value of that surface as information, meaning that if you don't bake GI in your scene, you won't be able to see GI in the reflected objects.
    2. Same as for 1. applies to lightmaps, it's just another method to bake GI (or other lighting information). Also, lightmaps can serve as a fallback when the raytracing is missing information for some reason.
    3. Lightmaps are for static objects, light probes are mostly for dynamic moving objects (ex. a moving character receiving indirect light bounced of a static wall)
    4. Reflection probes are for indirect specular lighting, light probes are for indirect diffuse lighting. They don't convey the same information.
     
  3. mchangxe

    mchangxe

    Joined:
    Jun 16, 2019
    Posts:
    69

    Thanks for the answers, they make sense. Just to double check, so if I use ray tracing, I still need to bake GI, use reflection probes and light probes correct? And also, I have a new question, when I turn realtime raytracing on, I also need to override the screenspace ambient occlusion and reflections correct? So raytracing is used for these two features and thats what raytracing means in the context of rendering correct?

    I was just abit confused if screen space ambient occlusion and reflections are the actual features that use ray tracing, why arent they called ray traced ambient occlusion and reflections? Is it because you can also use ray-marched ambient occlusion and reflections?
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704
    Yes, in addition to enabling realtime raytracing, you also need to use the SSAO and SSR overrides.
    Raytracing is one of the modes in which they operate, not an additional layer of rendering on top of them, and this is why there is no dedicated RT occlusion or RT reflection.