Screen Space Global Illumination for Eevee

Screen Space Global Illumination addon for Eevee.

Trailer (old addon version): https://youtu.be/0_yJHuDACOQ

(alternative download links at the bottom of the post)

Native (newest) version:

SSGI implemented as a modified screen space reflections shader in a custom Blender build that has a secondary layer for diffuse reflections. Both SSR layer settings are consolidated under “Screen Space Raytracing” in Eevee render settings. In practice works significantly better than the old addon version.

Native updates:

  • SSGI Native 1.0 First version of native SSGI implementation in a Blender 2.93 alpha build.

  • SSGI Native 1.1 Compatible with newer master. Fixed translucent shader.

  • SSGI Native 1.11 Fixed diffuse input not being masked by metallic in Principled BSDF. (Issue introduced in 1.1)

  • SSGI Native 1.12 Fixed glossy input being skipped when no SSR present - globally or per node. Fixed some alpha issues. Fixed SSGI settings being reset on every file open.

  • SSGI Native 1.13 Updated to be compatible with latest Blender master, redone based on the newest SSR shader with small improvements and better half resolution trace resolve.

  • SSGI Native 1.13 Updated latest version on 2.93.1 to include fixes for some GPU crashes (Fixes by Procedural). Added back link to external download of Mac, Linux and experimental builds (1.14 with wip denoising and broken half res trace).

  • SSGI Native 1.15b Built on Blender 3.12. Included denoising options for SSGI and experimental world probe tracing for diffuse (default values aren’t accurate for probe tracing).

  • SSGI Native 1.16b Built on Blender 3.6.2**. Updated compatibility to newer Blender versions. Albedo color value input no longer internally clamped. Probe trace intensity value closer to correct by default. Reorganized UI settings. Added difference output of alpha blender materials to Ambient Occlusion node (temporary implementation) to make it possible to do zdepth soft blended alpha cards and other depth based effects. Variety of minor bug fixes. **25.09.23 - Updated add a quick fix for correct mix shader node behaviour.

Addon (old) version:

Addon for Blender that converts Diffuse and Principled BSDFs to nodegroups that give representation of diffuse component to SSR for SSGI effect.

Addon disclaimer: World/HDRI lighting in specular component is not handled properly between object reflections and gives inverted colors with the addon only version.

The addon (ab)uses Eevees built in screen space reflections with material nodes and thus won’t be comparable to a correctly built in SSGI solution.

The addon version currently doesn’t preserve keyframes on diffuse and principled BSDF nodes.

Addon updates:

  • 0.1.0 Fixed error in folder structure in initial release. Now installs correctly.
  • 0.1.1 Added color range input clamp. Changed the way increasing intensity works. New defaults only compatible with no world/hdri lighting.
  • 0.1.2 Added controls over World Material (broken glossy interaction disabled by default). Added option to scatter diffuse normals (base performance cost increased). UI and default settings changes. Clean up.
  • 0.1.3 (Compatible with blender 2.91 versions from Oct.21 2020 onwards) Added refresh materials functions that preserves all possible settings while cleaning and updating materials. Added option for cubemap only bake. UI improvments.
  • 0.1.4 Temporary fix for incorrect intensity in fresnel with metallics.

Info about futher plans:

Addon version is deprecated and there’s no plans for further development. Native version currently is not planned to be support past blender 3.1 version due to code refractor that broke compatibility and having a official implementation being in development by Blender developers.

Refund policy: If you chose to support it on Gumroad and want a refund for any reason, send the email used while making the purchase either to the email attached to the Gumroad receipt or to [email protected]. Sending a direct message on blenderartists.org to account “0451” with the purchase email cited is also an option.

Alternative download links:
Native builds
Addon (old)

Explanation of parameters of the addon version (outdated):

137 Likes

Made a mistake in the zip file on gumroad. Will fix in a moment.

Edit 2: Fixed folder structure - should install normally from a zip now.

4 Likes

Hi! this is my first time seeing this, and it looks incredible. I’m extremely excited about this implementation, and what you’ve done looks very awesome. :slight_smile:

from my quick testing, it works exactly right too. :slight_smile: here’s a quick render I did.

One thing I did notice is that if the normals are inverted, the surface seems to be glassy with no control over the roughness. Is that a limitation of this technique?

great work on this though, thank you for sharing it!

9 Likes

Hi!

I didn’t run into case like this during testing, but from a quick test I can confirm this happens. I’m in the middle of moving currently so it will be at least few days minimum before I can see if there’s a workaround that can fix this.

I’m also curious if there a use case for flipped normals like this in general? Some NPR techniques use flipped normals for outline for example. It usually glitches out on “incorrect” values like albedo values that are out of correct PBR range and too strong normals. It might be useful to add a clamp so it gives better results without the need to correct materials.

2 Likes

no worries, it works well otherwise!

Something like a clamp might be nice, yeah. I often use not-correct pbr values… npr techniques can be helpful to get an appealing image. :slight_smile: just my 2 cents.

3 Likes

Awesome job!
How did you come to that idea?

4 Likes

Thank you!

General inspiration was from using SSGI in UE4 and seeing how well it worked there.

The idea to use rough glossy BSDF as a stand in for diffuse, since it has SSR, is not a very novel one. I’d bet that the glossy look of objects while the shaders are compiling has given plenty of ideas.

I spent some time looking if I could add SSR natively on actual diffuse materials without changing the base look, with modifing source code, but since adding a second layer of SSR is far too complex for me, then the way I was trying to do didn’t really seem to have any big advantage of doing similar approach with nodes instead.

I posted most of my tests here: https://blenderartists.org/t/fake-ssgi-in-eevee/.

10 Likes

Absolutely badass! Thank you for making this addon!

1 Like

Btw, looks like in some cases it’s returning negative values resulting in the weird results:

Maybe there’s a way to cap it to zero or whatever value forcing it to behave that way?

SSR.blend (1.2 MB)

1 Like

Have any of you tried it with the Physical Starlight add-on?

1 Like

@ostapblender
It’s a issue with the nodegroup not working as intended with world lighting. I’ll probably look into it more in the future, but I don’t think there’s a way to currently fix it with nodes only. The workaround is to reduce “Darken Direct Lighting” (I need to rename that, what it does is isolate SSR to add only SSR to materials) which changes the overall brightness and look of the material. If the scenes world lighting contribution isn’t very intense you can get a decent result without completely reducing it to 0.

@BCerk
Only pre 1.22 version that used to decrease exposure by -6. The newer one might work better, but it still has all the same issues with world lighting.

2 Likes

Thanks for this 0451, will try doing a nice long rendered music video with this addon!

1 Like

It’s a bit disappointing to see the values like boost SSGI and darken direct light. That’s a throwback to 90’s and early 00’s when people still had no idea how GI is supposed to work and were using it wrong. GI should be something you turn on (or these days have on by default) and then you only possibly tweak performance/quality ratio values. But there should never ever be such thing as “artistic control” over GI. In PBR, such aspects of light transport should never be touched.

Now I do realize that this is a fake, and that’s it’s very far away from proper light transport simulation, but still, parameters like that just encourage bad practices. I’d suggest trying to get as close as Cycles references as possible i as many diverse lighting scenarios, then keep all these as constants under the hood. But seeing values like that in a commercial addon is honestly just discouraging, as it makes the whole thing look rather amateur-ish.

Here’s Unreal Engine 4 SSGI for comparison:

You can see that it has only 2-3 parameters concerning the speed/quality tradeoff. That’s it. No weird multipliers of luminances and roughness values.

5 Likes

you can take py file and solve problem.

3 Likes

Hope you feel the same way about Eevee because it sounds like it’s exactly what you have to do between Cycles and Eevee with tweaking light values. If Blender can’t get lights right between their render engines, this is some real harsh criticism that is entirely undeserved for a free addon.

9 Likes

Agreed. I’d rather have these extra controls, than not. What has drawn me to using Blender at this point in time, is the ability not to worry about what is completely correct or accurate. I’m able to tune in a look that I want with relative ease. I’ve used most of the commercial render engines released in the last 10+ years and Eevee is one of the fastest and most fun to use.

3 Likes

Unreal 4 SSGI is affected by post process volumes indirect lighting intensity, so there’s more control over it, just not in a r.SSGI. cvar.

I agree with what you’re saying overall. The choice was restricting it cases where it works as intended with less control and trying to support cases where it doesn’t with offering more control. The issues with world lighting are far more visible than the test cases I’ve tried it so I might have not made the correct choice there. The default values are a compromise due to that too.

If someone who chose to pay for it and feels like they had the wrong impression at that moment (or for any other reason for that matter), feel free to send me a email for a refund.

4 Likes

Rasterized vs Raytraced light is quite different matter. I said I acknowledge they will never be identical, but multipliers like these are usually a means of giving inexperienced people means of achieving worse results while at the same time increasing learning curve. It’s literally a loss/loss scenario.

Is it possible to use this fake to achieve same quality as Cycles? Of course not?

Is it possible to go through various different scene types and tweak constants so that overall, this addon produces as close results to Cycles as possible within what this approach can achieve, and then make those default and hide the multipliers? Yes!

1 Like

While what you say is not wrong, it’s a free addon made by someone in their spare time and not a commercial one. I don’t think such harsh comments are necessary, just give your suggestions for improvements in a constructive way.

7 Likes

Well, in UE4, you have option to use global GI multiplier but at the same time the way engine is designed discourages it. You kinda put those parameters in front, not even labeling them as advanced or something, meaning most people will likely use them wrong.

I don’t think your addon is bad or anything, and I don’t think anyone who finds it even little bit useful should ask for refunds. I just see the potential it has so it disappoints me that many people will probably use it wrong and achieve some not very pretty results just because of how user interface is designed to lead them through the usage of the addon.

1 Like