How to make realistic sunrays

I have been trying to make realistic rays in windows for my liminal spaces game, and I was wondering how I would go about doing that. I know you can use sunrays but those only work when your graphics settings are higher than 7.

Here is something I am going for, I was just wondering if I could make it only in their windows instead of using sunrays?

2 Likes

There are a few ways to do this, but most of the options aren’t very optimized so a the best solution for you may vary depending on the size of your game.

  1. Transparent part
    The easiest way to do this is just making adding a transparent neon part between 0.95-0.98 to your window for a cheap and easy way to “simulate” volumetric lighting/Sunrays.

  2. Beams
    Most common method you see in games, just a beam with a transparent texture

  3. Mesh part
    This is essentially just a bunch of transparent parts running horizontally that catches the light multiple times, creating the illusion of volumetrics, while it looks cool, however this isn’t one id recommend since its very unoptimized. Fog Mesh asset link

  4. Billboard UI’s
    this one is my favorite method since i think it looks the best, and it’s dynamic, while it’s still not perfectly optimized, most machines should be able to handle it when used sparingly.

When you boil it down, it’s just a grid of parts (I use a 3 x 3 x 3) with a billboard UI inside each one (LightInfluence is greater than 0), inside the billboard UI should be a frame the same size as your Billboard UI, and inside the frame should be an image label the same size as the frame and billboard UI, with a transparent texture. (Somewhere between 0.95 - 0.995 works best for me), lastly, set all both frame and image label background transparencies to 1.

after you create the grid, shine a light on it, and it should create the faux volumetric lighting,


2 Likes

Thank you so much for this, I will make sure to check all of these out!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.