SEGI (Fully Dynamic Global Illumination)

Testing on my ATG-Simulator: Pardis project using Unity 2021.3 LTS.

My project is kinda spacious, it is a huge open-world game that I’m working on since 2018 on my own.
In these test runs, SEGI uses 2 to 10 fps with these results on a Laptop with nVidia MX150 gpu @ 720p in a customized Low Settings mode using medium graphics settings.
Note that the game is in debug mode and it is not finished yet! thus, has a lot of overheads which causes the to fps drop significantly.

On a low-voltage RTX3060 laptop system, using the maximum possible settings, SEGI uses 1 to 25 fps @ 1440p - images below.
SEGI - Off vs Maximum Custom Settings on RTX 3060 Low-Voltage


Off vs Custom Low Settings w/ exaggerated illumination on RTX 3060 Low-Voltage


  • Once again, thanks again to the SEGI community for providing such a useful golden asset.
5 Likes

To clarify, are you using the Built-In Render Pipeline or URP?
Thanks!

This project is using the Built-In Render Pipeline.

Speaking of shaders, I had to exclude the player car (the red truck), And CScape’s buildings and bus stop game objects (speaking of which, they use a custom shader) from the GI calculation layers, as they leaked lots of light - to the point that the whole screen got their albedo color.

  • Best.
2 Likes

After getting fed up with the performance impact and inherent limitations of SSRT GI I decided to take another look at SEGI now a few years later. I was surprised how well SEGI Cascaded works after some tweaking of settings.

The performance isn’t great (it is more or less analogous to the SSRT solution I was using), but the lighting looks so much more realistic and without the obvious limitations of Screen-Space. One of the biggest benefits for me isn’t even the light voxelization, but the skylight and occlusion settings, since a lot of my project is “outdoors”. SEGI just grounds all these objects with believable ambient, it’s great.

It also does wonderful things for character lighting, which I always struggled with making look realistic with Unity’s typical harsh shadowing and lackluster light systems. All in all I’m pretty happy with SEGI now, and once I improve the base performance of my project I think the performance impact of SEGI will be quite manageable.

My biggest issue currently is that SEGI doesn’t interact properly with GPUinstancer objects, which I use for trees and foliage. So all these natural elements feel slightly unrealistic as they don’t get the full range of shadowing/occlusion/light voxelization as other scene objects do. Has anyone gotten SEGI and GPUi to work together nicely? I assume somehow rearranging SEGI buffers in the render stack might do the trick, but thought I’d ask in case anyone has already gone down this rabbit hole.

4 Likes

@chingwa I guess changing SEGI codes to support GPU buffer seems a very hard task to do for the community since no one could - greatly - develop it further in years since OP abandoned it!

Best bet is to have those GPU instances converted to ordinary gameobjects with MeshRenderer for interactions. This is how TerraWorld’s GPU Instanced Renderer system works in runtime where it can take a target (e.g. camera) and convert all GPU instances around it based on distance radius to normal GameObjects for any type of interactions such as physics, collisions, renderer operations and…

The following video shows this GPU to CPU conversion system in action:

4 Likes

@TerraUnity Yes that is a good point, and on my to-do list now, thanks.

1 Like

I dont get this. Why would the colliders and physics be tied to the GPU instancer in the first place? Our system iterates GO on load and adds the rendering data to be instance while keeping other components intact, if a object moves it updates the buffers as needed. Whats the advantage of taking the data out ?

Can’t speak for @TerraUnity but at least in my case I’m rendering multiple hundreds of thousands of instances (trees, foliage, details) on the GPU, which doesn’t seem feasible to do with gameobjects on the CPU, even if you remove the rendering aspect of those gameobjects. So in this case converting just near instances into objects with collision (and proper rendering data for SEGI) seems like the best choice.

1 Like

As @chingwa pointed out and to further add to this, we are talking about hundreds of thousands of objects here and GPU Instancing through its API gives you the ability to have a fully GPU based renderer, but if you need those models to be interactable while in game mode - for example colliding with trees - you need to have them back as ordinary CPU gameobjects and in this case having it feed into SEGI’s voxelization data through its renderer.

FYI, having Instanced Drawing option on prefab’s material which is placed in scene, does batch model’s instances but you still have the gameobjects in place which involve memory footprint, transform calculations, renderer drawcalls, its components and everything else a GO holds which you can’t go beyond couple thousands even if it’s a simple one.

2 Likes

LUMINA with Sky Master ULTIMATE Ethereal URP volumetric lighting, for complete atmosphere and lighting simulation




HDRP WIP - Voxels and GBuffers all working, plus GI applied to the scene. Remain only to do the correct blending.

LUMINA URP



Hi,

A fully real time voxel based system for URP based on SEGI is now available in the asset store, LUMINA GI: Voxel Based Global Illumination. (currently on -50% Off Initial Release Sale)
It is for URP and a HDRP version is also almost ready.

The system is made to work directly with **Sky Master ULTIMATE **URP Ethereal Volumetric Lighting system, for a complete atmospheric scattering and lighting simulation.

2 Likes

This is crazy !!! The dream come true at last, looks stunning. Cant wait to try this one out :slight_smile:

1 Like

Hi. This is latest SEGI code, before ninlilizi deleted. Feel free to fork and keep working on it:

https://github.com/iamtanmay/SEGI

3 Likes

Hi, thanks for the link.

Is this an extended version of the original SEGI cascaded version ?

Yes, its the most ‘ahead’ fork on github atm… However, it needs to be updated for Unity 2021 onwards, you will get a

“Invalid pass number (13) for Graphics.Blit (Material “(SEGI_C material)” with 1 passes)” error,

probably because how screen space materials are suppose to be initialised… probably 1169 on SEGI_NKLI.cs or 783 where the Graphics.Blit is called

…but I haven’t worked with screenspace stuff, so I am not sure…

1 Like

Thanks, will check all out, is really useful

Amazing :), would be great if could post some videos from the HDRP version as well if possible


https://www.youtube.com/watch?v=BjFrviY8ru4

https://www.youtube.com/watch?v=l5wdBNBLMl0

https://www.youtube.com/watch?v=F3ZJtszWhXY

https://www.youtube.com/watch?v=E-6bW7FMaH8

https://www.youtube.com/watch?v=rzas6bI02hc

Hi, sure, i post a few above.

Lumina GI HDRP BETA testing is also now available, all users of the current URP system (currently on -50% Initial Release discount) can have access to the HDRP Beta before the store release. The HDRP asset will also be at a deep discount when released for all current users of the current URP LUMINA. Please provide the invoice in a personal message here or in email and will send links to the HDPR beta asap.

The new system is directly compatible with the Sky Master ULTIMATE URP - Ethereal Volumetric Lighting system and the two can be used together for cutting edge lighting and atmospheric effects (Video).

SEGI still works great with Unity 2020.3.38f1 LTS if you still need a built in solution!

edit: Lucky me they didn’t canceled the built render pipeline totally, because HDRP is not handy to setup and the management is very poor, and it’s super slow! SEGI is much faster when you turn up the quality steps! Tested both with the same scene/project. SEGI is faster!

3 Likes

Cool, glad to hear! Are you using a build from GitHub or directly from the Asset Store?

I never purchased SEGI on the asset store, that’s why I downloaded it from Github!
Btw SEGI definitely has its limitations, made some more tests…but then again it is build quite smart and handy. I still prefer it more than the Unity solution, but you have to make your sacrifices. Especially when it comes to big terrain/world building.

2 Likes