DirectionalLight

At the current moment, the only way to control the direction of lighting is by formulas to set the sun’s position through TimeOfDay and GeographicLattitude.

While this works for a few positions in the daytime, if you want the sun to come from a horizontal or downward source, it will start to get darker and take on the properties of moonlight.

DirectionalLights are used in game engines such as the Unreal Engine


A DirectionalLight would change the global direction of illumination, as well as the brightness and light source color settings based on the CFrame of the part that it would be inside of.

This feature would be really useful for games that take place in unusual settings, such as space games where there is no “up” direction.

38 Likes

I support. You should re-upload the picture with neon for those arrows and stuff, though. I missed them the first time around!

3 Likes

I very much support this suggestion.

My spaceship game will benefit visually from this, imagine a star system where spaceships can fly freely, in some cases they may fly directly above the star and this is a problem because there’s no way to achieve a downward source of global illumination.

3 Likes

I have to agree with this!

I’d much rather have a directional light source that would allow us to quickly and easily set up how we want our game’s “sunlight” to look!

3 Likes

Support!

Having DirectionalLight and some sort of new lighting for suns is something that I really want in some universal or quirky games, horizontally speaking, I guess this can also world in some other games that can use this with some realistic lighting. :eyes:

↓ Some quotes that I agree with for this to be added:

Along with this, I do hope that there could be more features to lighting and possibly more Technology or Lighting properties/settings that can expand what we can use it for and make with it.

I do see this happening in the future if it ever gets viewed from a lot of users and possibly Roblox staff, which would help out a lot of developers one day, very beneficial if you ask me. :3

3 Likes

Can we still not do this?.. It’s unsettling and a mark against roblox as a real game engine that the only way to make the light source from below is using the very funky day/night system.

I advise a full overhaul:

  • Ability to turn off ‘Moon lighting’ (Makes moon act as normal sunlight, for maximum control)
  • Optional ability to specify a ‘Night Skybox’
    (Dynamic stars in skyboxes are cool, but pointless when it means you are forced to use a pitch black skybox when night hits, fading out YOUR skybox!)
  • Option to use a Light Direction options that completely over-rides the direction of the sun/moon when used, or just uses sun direction when not specified.

These all seem exceptionally easy, useful, and IMO, could be implemented WITHOUT breaking ANY functionality for older games! (These are all settings that can be left un-specified and will work like before when default.)

Come on roblox, you really want to be a big game engine - this is one you’ll need.

1 Like

Maybe there could be two DirectionalLights under Lighting by default (maybe not literally under, maybe just 2 properties) to represent the moon and the sun, which the TimeOfDay and GeographicalLatitude would control automatically. I think this would also fix the sudden snapping of lighting direction at specific times.

The only two hurdles I see is that on Android, there is simply no support for multiple shadowmapped light sources, only the single sun/moon amalgamation. We were supposed to get proper Future is Bright support in Mid 2023, but it was pushed back to somewhere in the middle of this year on the Roadmap. Perhaps this Feature Request is being stalled until then?

Then there’s also the question of how the literal Sun and Moon sprites would be represented. If you change the direction of the sun light source, would you expect the sprite to follow it?

I just wanted to share my 2c.

1 Like

Then there’s also the question of how the literal Sun and Moon sprites would be represented. If you change the direction of the sun light source, would you expect the sprite to follow it?

I’d say it just over-rides it. If you wanted the direction of the sun/moon you’d just leave it blank realistically, otherwise you can calculate it yourself if you still need it to follow something perhaps

Having two specific sources of light, sun and moon, is an interesting concept, but realistically I’m fine with it being single-sourced so long as I can control that source better. The more the better of course, though!

1 Like