How to keep sun rendered?

I’m trying to make sun rays work rather the player is looking at the sun or not.

As you can see here, when the sun isn’t on the player’s screen the sun rays disappear:

Does anyone know how to keep the sun rays rendered no matter where you are looking?
Let me know if you have questions.

(apologies if this is the wrong category, just assuming this will be fixed with code)

There are three possible solutions to this:

First is to “bake” the sunrays into the map, like half-life 2 does in some areas.
This can be done with beams, with a decent visual look from a distance if done properly, but look bad when you get close to them.

The Second, is a plugin that is in development called Volumika, which can be seen here.
This solution isnt exactly sunrays, but it still looks better than having none.

Third is a bit insane, but I’m adding this on after writing everything else because I just thought of it.
You could possibly script your own raytraced godrays, they wouldnt look anywhere near as good as say, minecraft shaders or AAA games, but it would still properly render them properly.

You could do this by raycasting from the sun, or a general position for the sun, to radius around the player and attach a beam that goes from point A to point B.
(Poorly drawn idea)

Unfortunately though, because roblox renders sun rays depending on whatever is on the screen, there is no way to use the roblox sunrays to get the proper effect you want.

If only roblox had an option for raytracing, or just added raytraced godrays… that would fix all these problems and many more.

I’m not nearly advanced enough in scripting to raycast an entire system like this. But that actually looks so cool! I’d love to do something like that.

I’ll try baking the lighting, thanks!

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