SSGI with outdoor areas and vegetation: Noise/Denoiser and performance

Been testing SSGI in a forest outdoor env, it’s actually a good fit for outdoors!
With full res enabled, it’s much better, there’s still some noise and ghosting, but it’s manageable in outdoor areas.
But performance is quite high, approx 7.3ms on a GTX 1070 with quality set to low (in outdoor open areas quality doesn’t make a big difference in visuals so keeping it low is good) and that cost is a bit crazy.

but with Full Res Disabled it goes down to approx 2.6ms! which is manageable on a GTX 1070.

The issue is noise goes up quite a bit with full res disabled, and it’d be worse than the video since the game would be taking the entire window.

I don’t know what res is used if Full Res is disabled. Is it quarter or half?
If the noise could be reduced with full res disabled it’d be a really big win for SSGI, and In general better denoising. In my experience SSGI isn’t good for interiors, too much noise and the limitations of screen-space effects.

But It could really be a really good fit for outdoor areas. It gives forests much better visuals imo, it looks beautiful with sky shadowing for the trees/vegetation.

Video showing noise with all types of difference quality modes, zoom levels:
44itc2

Forest comparisons with and without SSGI:

Forest with both disabled:

With SSAO only (High intensity, Full Res Enabled, high quality):

with SSGI only:

3 Likes

Don’t know how these people got great results with ssgi https://mobile.twitter.com/the_f_key/status/1432852247562620936

https://mobile.twitter.com/the_f_key/status/1432981892811395072

https://mobile.twitter.com/the_f_key/status/1450859669572964356

https://mobile.twitter.com/the_f_key/status/1448705523545743363

https://mobile.twitter.com/the_f_key/status/1433002516120317952

I really want to know from unity what they use to make it look so good… I never get such results

The performance alone is just really too much to swallow for me. I wonder if it applies GI after or before DLSS…

Even in low, SSGI performance hits really hard, and in half res, artifacts just start popping in.

1 Like

finally got the SSGI working great for interiors
(first SSGI off and second SSGI on)
7744245--973653--Screenshot (143).jpg 7744245--973647--Screenshot (142).jpg 7744245--973656--Screenshot (145).jpg 7744245--973659--Screenshot (144).jpg
just use a reflection probe and set your SSGI fallback to reflection probes and sky most of the artifacts and noise with moving camera is solved with that (there is still a bit of noise and artifacts but its okay for me and yes noise increases with half resolution and having more performance optimizations and yes, denoising improvements for the ssgi would be really a win) it gives more accurate and better results when reflection probe updates frequently or is realtime when there is day and night cycle but other wise one bake is enough… (above i have baked the reflection probe for each scenario)… it also removes the ugly ambient light of the sky… more screenshots coming below… need to test it for outdoors as well

1 Like

I don’t recommend to use AO in conjunction with SSGI as it artificially darkens areas even more, which leads to unrealistic results.
SSGI does the job very well and is all what you need.

4 Likes

Half.

Depends on the version you are ON but on the latest versions SSGI use the same denoiser as the raytracing one (2 denoiser pass). It costs a little more but without it, it hardly usable so it’s a trade off we had to make.

2 Likes

Yeah but in those cases i prefer to bake the lighting, at least for static objects, in those cases is better to bake

Sadly, I cannot use baking for my game!!

So with the reflection probe fallback it really became a solid GI solution, even with just a single probe at camera position…

No SSGI


SSGI

SSGI + reflection probe at camera

The result with the probe is astonishingly good, however I need fully dynamic GI and therefore I have to rely on realtime reflection probes, which tank performance alot.
You can of course set them to On Demand and update them less frequently, but this will result in abrupt changes in lighting/reflections.

So I came up with a two-realtime-probe setup in which I schedule and split the reflection rendering of the two probes over a couple of seconds and then smoothly blend between their results.
The performance overhead is greatly reduced, but still offers smooth and good looking results.

This is the script if someone is interested;

using UnityEngine;
using UnityEngine.Rendering.HighDefinition;

[ExecuteAlways]
public class ReflectionProbeUpdater : MonoBehaviour
{
    [Range(0.1f, 60)] public float interval = 2;

    Transform[] reflectionTrans = new Transform[2];
    HDAdditionalReflectionData[] reflectionData = new HDAdditionalReflectionData[2];
    Transform camTrans;
    float[] updateTime = new float[2];
    float[] weight = new float[2];
    float intervalTwo;

    void OnValidate()
    {
        Setup();
    }

    void Start()
    {
        Setup();
    }

    void Update()
    {
        weight[1] = Mathf.Abs((updateTime[0] - Time.time) / intervalTwo * 2 - 1);
        weight[0] = 1 - weight[1];

        for (int i = 0; i < 2; i++)
        {
            reflectionData[i].weight = weight[i];
            if (Time.time >= updateTime[i])
            {
                updateTime[i] += intervalTwo;
                reflectionTrans[i].position = camTrans.position;
                reflectionData[i].RequestRenderNextUpdate();
            }
        }
    }

    void Setup()
    {
        for (int i = 0; i < 2; i++)
        {
            reflectionTrans[i] = transform.GetChild(i).GetComponent<Transform>();
            reflectionData[i] = transform.GetChild(i).GetComponent<HDAdditionalReflectionData>();
        }
     
        camTrans = Camera.main.transform;
        updateTime[0] = Time.time;
        updateTime[1] = updateTime[0] + interval;
        intervalTwo = interval * 2;
    }
}

Just create an empty object, add two realtime reflection probes (set to On Demand) as childs and add the script to the empty.

EDIT
Changed the probe blending calculation to be linear instead of using Mathf.Sin, should be significantly faster now.

12 Likes

Another shot in a shadowed forest, this really shines…

No SSGI


SSGI

SSGI + reflection probe at camera

Hopefully the time slicing support for realtime reflection probes comes asap, so we can hope for way better performance.
Even though my solution renders the probes just every few seconds, it still renders the complete probe in a single frame, so time slicing will be a game changer here.

6 Likes

great stuff! SSGI feels great for outdoors/vegetation with reflection probes.
HDRP might also get realtime time slicing which would help a lot with performance.
[HDRP] Add time slicing to realtime reflection probes by simonb-unity · Pull Request #6661 · Unity-Technologies/Graphics (github.com)

3 Likes

SSGI really helps in adding depth and realism to the scene… no baking here just one realtime reflection probe and SSGI… there are a bit artifacts and some nosie on the character while moving in indoor scenes but i am finding ways to reduce it… Currently TAA does help in reducing the noise but there is a bit of smudging caused by it… I really want unity to add a complete realtime GI solution soon… i feel that even if the realtime GI isn’t much accurate or not that good SSGI can really make it look better and accurate and in return it would also stabilize the SSGI output




5 Likes

Happy to see that the SSGI + reflection probe trick works for you :stuck_out_tongue:

3 Likes

don´t take me wrong but i think you can make those renders looks better

can you please show us a video? in this case is better to see a video

Make it better in what way?
It’s of course all hackery with just a realtime reflection probe at camera and it’s not going to look as correct as with loads of probes scattered across the scene.
But it’s good enough for mostly open areas and still OK for indoors.
It’s always a tradeoff between quality and performance.

I think he is referring to the vegetation sticking out like a sore thumb…kind of looks weird…maybe the subsurface scattering is too strong…

the three components all play separate

sky, trees and river+rocks. It feels like it was copy pasted from 3 different pictures. I can’t really put my finger on it but something is off.

But that is more scene composition rather than GI+RP…so maybe irrelevant.

1 Like

Yeah little but at the same time big details, the 3 screens looks very flat.
Try to change the lighting and shadows without post effects to achieve more contrast because it looks very flat, mostly in the area of the leaves.

It looks off because you can see the bright sky, but then 70% of the image is very dark.

Find the image’s brightest point in the sky, now, look the reflection of that area in the river, is way too dark and it needs to be at the same value (or at least 90% closer if you are shy with the idea xD)
I also think the SSGI is making a “decent” job but not entirely well done (in my opinion) maybe it works for interiors but for me, in fact, the “No SSGI” screenshot looks better jaja

Edited: i uploaded 2 examples

7847490--995193--hh.jpg
7847490--995196--2.jpg