Screen Space Global Illumination for Eevee

https://developer.blender.org/D10575 uploaded the patch. Needed to take some time off, so it’s later than I intended to upload.

@Metin_Seven
It’s still a way too hacky solution for master. It’s been a great learning project so far, so I currently plan to keep maintaining and improving it until there’s a official implementation.

@juliocargnin
I’m pretty unfamiliar with how UI is handled so I can’t say for sure, but I imagine it can’t be a hard change unless there’s some good reason why render settings are locked.

@Blenderer
Some SSGI shaders use cubemaps as a fallback or some other basic world lighting approximation. I did some very hacky tests a while back and they weren’t that promising. Rendering with a huge overscan percentage gets pretty expensive, but it tends to work better.

@Boder
There’s some energy conservation issues. One of them being that I forgot to decrease diffuse input intensity in the principled shader when metallics are used. Fixed that in patch, but not yet in the builds.

I assume the lighting cache is issue with master. I don’t believe I made any changes to baking.

@philo_vivero
Instructions for building on Mac.
https://wiki.blender.org/wiki/Building_Blender/Mac
Once that is set up you can apply the patch or locally replace some files.
https://wiki.blender.org/wiki/Tools/Patches

I’m still looking into adding a Mac build, but I’m wrapping up the Linux one first (stuck at it not finding the correct GCC version atm).

5 Likes

I encountered something weird in the latest Native build that didnt happen in the Add-on version.

My trees are now suddenly glowing lol

And when i tried to troubleshoot it, it’s apparently the alpha…? I really don’t understand why, it just doesn’t glow anymore when i disconnect the alpha (but ofc, i need the alpha)

I have more screenshots showing what it’s supposed to look like, and what my settings are, but new users can’t upload more than one image, oh well

Removed by popular demand

2 Likes

Hi, thanks for sharing.
About GCC I think you have already seen my message about how to get it in Ubuntu 18.04 (I had edited that message a few days ago to add that information).

About the patch, where you upload it on blender developer site, in “History” you can add “base” (hash) information, so we know exactly in which version of Blender the patch should be applied to do “git checkout BASE”.

I have successfully applied the patch on today master. But I don’t share my Linux build because I get an instant Blender crash when I want to open most of the Blender scenes. You can check it with “mr_elephant.blend”. Can you reproduce it or is it a problem with my build?

1 Like

Thanks for this! I too am getting the crashing when trying to adjust materials; haven’t tried a reflection plane file yet.

Thanks again.

2 Likes

some crash after adding a material - I recall that this was an issue in previous mac builds

1 Like

Another thing I’ve noticed is that if a blend file was saved with SSGI Windows fork and the opened in the Mac fork the SSGI won’t work.

If I open from a point before I saved in the Windows fork than the Mac version performs as aspected, minus the material crash bug.

2 Likes

Thank you, hopefully 0451 might be able to chime in with some assistance. I almost feel like we should all chip in to buy him a Mac Mini!

1 Like

I really love this addon. Eevee is missing this feature hard. Is there any way we could see this make its way into master when its fully formed?

Even if it took some crowd funding I’d love to see it happen.

1 Like

A couple problems I’m noticing. I have a reflection plane that no longer has any effect. When I try to view the material nodes for that object, Blender crashes.

I have successfully applied the patch on today master. But I don’t share my Linux build because I get an instant Blender crash when I want to open most of the Blender scenes. You can check it with “mr_elephant.blend”. Can you reproduce it or is it a problem with my build?

@YAFU @philo_vivero
I can’t replicate the crashes on my local Windows build that the patch is derived from (neither with master + changes from a few hours ago). Haven’t tried with applying the patch yet or other OS versions.

Can replicate the reflection plane not working, although it’s not resulting in a crash. Also seems like whole glossy evaluation gets skipped in some cases where it shouldn’t (like with SSR disabled).

Another thing I’ve noticed is that if a blend file was saved with SSGI Windows fork and the opened in the Mac fork the SSGI won’t work.

@anon55679826
To what extent? Are pure glossy / metallic materials still rendering?

Apologies for rushing the patch without proper testing.

@Irfansyah_Aryabima
The SSR inputs are multiplied with alpha potentially in multiple places. So I’d guess it’s either unclamped alpha that’s greater than 1.0 or there’s some places where the SSR inputs are manipulated without unpacking first (if it cycles through random colors when changing alpha value then that’s likely the case). I couldn’t replicate with a simple test, so I’d appreciate it if you could PM a blender file where the issue is present.

@YAFU
Regarding the GCC version, I haven’t tried troubleshooting it yet. “gcc --version” reports version 9.3. So I’d guess it’s down to incorrect cmake settings?

1 Like

Removed by popular demand

2 Likes

Removed by popular demand

2 Likes

Removed by popular demand

2 Likes

Ah i cant send out DMs yet, and i’m uncomfortable putting the blend file here, but I can at least put the alpha image i’m using here

2 Likes

Sorry for not being able to help here. I’m not a developer, I’m just an old Linux user who knows how to compile some things by following recipes on the internet.
But you can ask the questions on devtalk.blender.org forum. This is where I go when I have compiling/build problems.

1 Like

Fixed issues with alpha. Had some left over issues in input from getting it compatible with a refactor.
Alpha blend is not included in depth buffer, so it’s incompatible anyway, so no screen space reflections of any kind. Hashed and clipped should work as intended. Glossy BSDFs that don’t have specular screen space reflections will not be skipped. Reflection planes seem to work correctly from limited testing. Current master has bunch of artifacts so I’m waiting a bit before updating the windows build, but will update this as 1.12 soon.

I can’t replicate crashing and blend file based issues on windows. I’ll look into Linux build next.

@YAFU
The info so far has been really helpful, thank you for that. I’ll probably be able to figure it out when I have chance to dwelve into it bit more.

@Paper_Sun
There’s some news coming soon from Blender devs. I don’t know enough to speculate to what extent similar functionality will be covered, but I would expect at least some mentions to similar plans.

6 Likes

Is there a patch?

Hi, great job you’re doing with Eevee!
A question, when I change the value to the intensity, when I reopen the blender, it automatically goes to 1. Is it a bug, or does someone know some trick to leave it in another value, change the code or something easy. Thanks. Pura Vida!

Removed by popular demand

@philo_vivero
SSGI112.diff (51.6 KB)
I don’t want to spam the developer portal so I haven’t updated that one.

@diegocabrera88
I noticed all the other values reset as well now. Not intended behaviour. I need to review ui and versioning.

1 Like