How does Global Illumination work?

Looks like it’s studio, so no external shaders are used. No viewports either by the rendering and distortion, so it’s pretty interesting. No idea what the reflections could be made with, but surely there’s a lot of glass material used, just not sure how and where.

2 Likes

Tbh personally i don’t see any interest in working with such technologies since it would be so complicated to maintain and keep performance in a universal way for all sorts of games, but we can guess it uses different instances such as beams, emitters, surfaceuis, gradients. Lots of calculation would be needed though for a realtime light engine. It looks cool for a demo for sure though

1 Like

Ive heard of something called screenspace global illumination, but that still doest explain how the lighting is rendered… Yeah i agree there must be some kind of trick being used here

The developer also stated it is very optimized and they will be using it for their game, so its definitely not some one off gimmick… I am very curious asto how they did it

There used to be ways to have real time raytracing that worked with reflectance and glass parts until roblox released their anti exploit, i’m not up to date about this whole thing but maybe the community found a work around.

1 Like

Hopefully someone can explain it here, its super interesting and Id like to implement it into my own games too

Seem like they used water for screen space reflection but removed the texture for less distortion:

For the custom lighting system I think they baked it except for the global illumination and here is the resource for something closed to that Custom Baked Lighting “Engine”.
For volumetric fog, Volumetric Lighting / Fog Implementation.

For global illumination, I can’t really tell if you have any footage with only light source and in an enclosed area which doesn’t have sunlight or only sunlight as the only light source and that doesn’t have too detailed screen for easier analyzing but in my thinking I think they just put at least 2 lights source in the same part one has less range but brighter one with far more range but less bright or am wrong.

The last footage showing real-time global illumination has built in baked lighting without it being separate unless it required for the effect to work, but I don’t think it radiance cascade since it would require them to deal with every pixel on the screen which is very heavy performance, or they used lower resolution, also the bottom back should be lightened up here by the sun which it isn’t? Unless am wrong about everything again, still that’s part of the back looks like it was done by baked lighting instead of real-time.

1 Like

Also source where I get 2 light sources in a part for global illumination


At the blue neon wall, you can see how’s that looks like based on the shadow and that second light source hit the marble wall right next to it brightening it up

1 Like

Slightly off-topic, but if anyone is looking for a more techinical explanation about how proper global illumination and lighting works, look for a channel named Branch Education on a popular video site.

They have two recent videos explaining both ray tracing and explaining traditional rasterization / video game graphics in detail, the latter being the one that ROBLOX currently uses.

2 Likes

Best I could find is this page which supposedly is their own lighting system. It’s called Alare

It seems to cost 10 dollars although there’s a free demo. However Itch.io flagged the page as quarantined so I don’t know how legit this is

2 Likes

Oh my god, thank you!Ive been dying to find a channel like this

1 Like

I actually just found a new image from the dev, with sunlight;

1 Like

Oh yea, that is global illumination


As for the implementation of using radiance cascade, am still pretty unsure how they did it, there are papers and video that I am learning right now and some of them might be able to answer your question.
Sources: https://www.youtube.com/watch?v=3so7xdZHKxw, GM Shaders Guest: Radiance Cascades - by Xor and Alex, Radiance Cascades - tmpvar, RadianceCascades.pdf - Google Drive

One more thing, they’re probably using the custom lighting engine but tweak it to their own need adding radiance cascade, but it seems more baked to me than real time unless they move the light sources or obstruction around which they can rebake it and keep applying, but then that isn’t real time anymore if the fps plummet, in the meantime there is other resource that you can use and maybe more performance but doesn’t have much hassle to deal with custom lighting engine. I’ll try to do it if I have the time nvm, also you mentioned reading the code, can you share it also do you know where the ray cast are calculated like from the light source or the camera?

1 Like

Oh nvm, I just looked at the video again, and it shows the part where the light source can be seen on all the faces of the wall


But still there might be actual global illumination

1 Like

Also seem like it ray traced global illumination and not radiance cascade.

So they just render the light by ray casting into the scene either from the light source or the camera, which I think is what they did here since there are some part of the video showcased from their lighting system shows the specular highlight flickering and based on the amounts of travel hit/indirect, detect, reflect place a point light at that location and apply properties on the info collected from the environment through all the ray traveled.

Here are some resources that done this:
Many's Ray Tracer 2.1! [GI and MORE!], [DEPRECATED] Ray-Traced Global Illumination Plugin | Make your lighting look Incredible!.

1 Like

Hi! I am working on an updated version of my old implementation listed under this post with Global Illumination and will release a detailed explanation in a new post. Many people use actual lights to imitate global illumination, but this can often be an inefficient solution because of specular highlights and potential lag with multiple light sources. This means it’s often incompatible with Future is bright lighting.

A good alternative is to use Surface Space lighting instead of World Space lighting.

The only resources that roblox has for image manipulation atm are surfacegui, editableimage, and imagelabel, so I used a mix of those to project points on a 3D surface! Every surface of every object is treated as either a cube, box, and later a mesh (when Roblox releases getVertexNormals along with editablemesh). I stuck with Radiosity concepts by diving each surface into patches, then dividing those patches into pixels and drawing the results with editableimages. That way, each patch could be a uniform size across the whole world, and any pixels off the edge of a surface can be ignored. For the rendering, I really wanted to use a cube map! But this was impossible because I’d have the render the scene from every pixels perspective. In the future, maybe I can render a low quality image from the perspective of each patch and interpolate the pixels indirect based on that, but that remains to be seen! So I just went with raytracing direct lighting with several rays per pixel for soft shadows. Indirect lighting is optional using a Monte Carlo pathtracer. The results take from 30 seconds to 4-5 minutes, but don’t usually go beyond that.

1 Like

This older implementation does not support global illumination, only direct lighting smoothed using anti-aliasing. A new version will be released soon using EditableImages and pathtraced GI.

2 Likes

This is extremely cool! One suggestion I would make to potentially reduce lag is instead of shooting multiple rays for each patch, instead shoot 1 at each patch intersection and interpolate the pixels between them using Color3:Lerp(). This could potentially reduce your rays by alot while not reducing quality by much, just a suggestion though

1 Like

have you heard of the trick where you make a part and set its transparency to somrthing above 1 (like 99) and add a highlight? that is 100% what they did for the reflections, its not perfect but looks nice. no idea how they did the lighting, maybe surface guis?

This would be an amazing suggestion! It’s very close to what Radiosity Cascades do: I wanted to shoot only a few rays per patch and then interpolate the results as a sort of mock-cubemap, but only from the perspective of the patch. However, I’ve been having issues smoothing the entire surface because it is divided into patches, meaning the results have to be recompiled after rendering!