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.

Graphics H-Trace: Global Illumination and Occlusion [ RELEASED ]

Discussion in 'Tools In Progress' started by Passeridae, Mar 11, 2022.

  1. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    388
    Thank you very much for your support! It means a lot! :)
     
    Gooren likes this.
  2. sirleto

    sirleto

    Joined:
    Sep 9, 2019
    Posts:
    100
    Also interested in BiRP only
     
    TheOmnisimush and atomicjoe like this.
  3. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    910
    Doesn't really seem to work with dynamic time of day.
    - Since it relies on reflection probes, you're going to need some kind of dynamic reflection probe which inherently introduces lag spikes (since a reflection probe in HDRP costs at least 10ms no matter what it's rendering).
    - Despite having a realtime reflection probe, it's still broken during nighttime. Showing very bright lights while rotating the camera.
    upload_2023-2-18_13-51-43.png

    The built-in SSGI seems to work fairly well in the same scenario, because it can fallback on the sky when no reflection probes are present and doesn't have the nighttime artifacts.
     
  4. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    388
    Hi!

    First of all, could you please share your Unity and HDRP versions? Also, are you running the patched or the unpatched version?

    It needs reflection probes only as a fallback. It can work without them just fine as a screen-space only effect.

    I don't know your Unity version, but since 2022.2 there's an option called "time-slicing" which dramatically reduces the cost of rendering a real-time reflection probe and makes having one at the camera position a totally viable solution.

    If this is not acceptable for you then there're custom user-made scripts which use two reflection probes baking one at a time with a certain interval and linearly swapping them. Here's an example of such script: https://forum.unity.com/threads/ssg...enoiser-and-performance.1211346/#post-7836549

    I tested both approaches myself and found both quite performant.

    Could you please share a video of how this looks in motion and in comparison with on / off? That would help me to identify what's wrong.

    Also, I have posted a setup that resembles a day / night change with a real-time reflection probe here: https://forum.unity.com/threads/h-t...cclusion-released.1251273/page-5#post-8529137
    Maybe it can be of help.

    Have you tested the native SSGI without the fallback? Sometimes it has such a limited radius that you get like 10% of SSGI itself and 90% of the fallback and that explains why it holds up so well under rapidly changing camera angles.

    Of course there's a possibility that you encountered a bug or some other issue with H-Trace and I will do my best to help you, but providing additional data about your case is crucial here.

    If you're sure theat the sky probe fallback is the key difference - I can try to patch a couple of files for you to make it work with H-Trace. We have added it in the next update already, but if you need it now - DM me and we'll see what we can do ;)
     
    Last edited: Feb 18, 2023
    tmcz_911, Gooren and PutridEx like this.
  5. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    910
    @Passeridae Let's not waste any further time on my prototype. If dynamic time-of-day is a scenario you want to support then I will be happy to test this asset again when I'm ready to add it to the actual game.
     
  6. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    388
    blueivy and atomicjoe like this.
  7. UsefulWeapon

    UsefulWeapon

    Joined:
    Oct 26, 2013
    Posts:
    28
    @Passeridae Hello! I just bought you awesome asset and i am very impressed with it. But i have i question on this thing:

    I am getting some kind of ghosting effect and flickering on the controller while i move. Is it possible to fix this ?
    Also i cant get an effect like on your video of this sample scene where you rotate directional light and the light bounces off blue walls and etc. How can i set it up on the demo scene ?
     
    Last edited: Mar 11, 2023
  8. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    388
    Hi and thank you! :)

    This is a denoising issue. To mitigate it (to a certain degree) you can try to lower the "detail preservation" slider. It will blur small details (like contact shadows) but will hopefully produce better noise reduction. Other denoising settings may have impact on this issue as well. Samplecount, Recurrent Blur and Intensity are the most important ones for this case, I think. We are actively working on a new denoiser that will do better in such cases with little to no manual tweaking. It will be included in the upcoming major update.

    The key thing there was a real-time (with time slicing) reflection probe that was placed roughly in the center of that room. Have you tried something like this? If this doesn't help I can write a more specific manual with some screenshots ;)
     
    Last edited: Mar 11, 2023
    Gooren likes this.
  9. Win3xploder

    Win3xploder

    Joined:
    Dec 5, 2014
    Posts:
    158
    I have a question about the realtime reflection probe: won't it be incorrect because the probe doesn't see any diffuse GI?
     
  10. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    388
    Can you elaborate more on that?

    Theoretically, we need the probe to see the direct lighting. So everything should be either lit or not lit. Shadows are supposed to be absolutely black. Realistically, the probe can see something different. Like direct lighting + fake indirect lighting provided by, say, ambient probe (the most typical setup). If this is the case then the incorrectness starts from here. Ideally, we would like a probe to see only the direct lighting, but at the time of baking be able to compute ssgi and have indirect lighting too.
     
  11. UsefulWeapon

    UsefulWeapon

    Joined:
    Oct 26, 2013
    Posts:
    28
    Thanks for the answer, i think it is better for me to wait for the new version of HTrace then. When you are planning to release it?
     
  12. Win3xploder

    Win3xploder

    Joined:
    Dec 5, 2014
    Posts:
    158
    How do I setup the probe correctly?

    edit: found a workaround, attach a post volume with a tiny sphere trigger to the reflection probe that has the indirect lighting controller on it with the indirect diffuse multiplier set to 0!
     
    Last edited: Mar 12, 2023
  13. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    388
    Soon-ish. Can't promise the exact date, but I hope that it won't take longer than a month. I think, we'll give access to the Beta to anyone who will be willing to test it and already owns the 1.0 version (you'll just need to DM me and attach your invoice from the asset store) so you will not have to wait for the official asset store release this way ;)

    Yep, that's a valid approach.
     
  14. TyGameHead

    TyGameHead

    Joined:
    Apr 29, 2017
    Posts:
    20
    Is the 2.0 update and up version coming in the same month.
     
  15. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    388
    Hi, no, first 2.0 and then URP.
     
    Gooren and SammmZ like this.
  16. kite3h

    kite3h

    Joined:
    Aug 27, 2012
    Posts:
    190
    Most of these methods use reflection probes as fallbacks. Even in Unreal Lumen, the lumen card is a billboard, but the ambient capture is in 6 directions. The Unity Reflection Probe does not automatically scatter a large amount of lumen cards into screen space like lumens do, but it also has the advantage of being able to adjust performance with OnDemand.
    Unlike Unity's default renderer, HDRP updates requestrender. Don't use RenderProbe.
     
  17. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    388