Global Illumination Showcase

You never knew Roblox’s lighting could be this good.

I’ve developed a script that calculates global illumination using sparse raytracing combined with built-in voxel lighting and shadow mapping. All effects are fully dynamic and calculated as you view them. No imported textured meshes or baked lighting.

Here are a few screenshots:
(First one is with ReShade mod applied)



And of course, enjoy the game yourself:

42 Likes

With the script that you developed, this looks beautiful.

1 Like

I think I did this a while back, but your version is so much better looking :exploding_head:

What algorithm did you use to achieve this? I’m really curious :stuck_out_tongue:

2 Likes

It’s mainly raycasting from the sun to the surfaces and calculating the angle, color, and intensity of the reflected light based on the material and geometry. There are a few other details for optimization dynamic recalculation though.

2 Likes

How did you figure out where to cast to and how many rays do you cast?

2 Likes

Will you be releasing this script or keep it to use in future projects?

1 Like

It typically casts about 1000 rays every time the lighting is recalculated. The rays are cast within a radius of the player.

2 Likes

I’ll probably be keeping this script for myself for now. After I work on it a bit more I might release it.

1 Like

This is an amazing showcase of the new lighting. Thank you!

1 Like

Excellent work! It looks phenomenal. It’d be easy to believe the screenshots posted above weren’t even taken in ROBLOX.

2 Likes

Have you thought of or attempted to use this to make volumetric lighting? Something similar to this was accomplished a few years back with the beta FiB builds and it would be pretty nice to see it into effect today.

Images from @tryler2, not mine.

8 Likes

I love the second picture, it’s look the best in my opinion. Great work, keep up the good work! :+1:

1 Like

I have thought about volumetric lighting. Roblox already has screen-space volumetric lighting (aka sun rays). The main problem with that is that it only looks good in certain circumstances, like in those images. I’ll consider adding that effect if I can figure out a good way to update it dynamically. I’ve actually programmed volumetric lighting into Minecraft in the past, but the code for that was totally different.

3 Likes

Wow! This is an impressive nice lighting showcase! good work! :sunglasses::+1:

2 Likes