Add a method to disable hard shadows while keeping voxel shadows, during runtime

As a Roblox developer, it is currently impossible to change from hard ShadowMap shadows to soft Voxel shadows during runtime.

My game has multiple environments that each require different lighting settings. One of these zones is an underwater zone. Being underwater, hard shadows do not look accurate to reality and are jarring when the rest of the environment looks like it is underwater.

Disabling shadows entirely also looks bad, because areas that would naturally be darker are instead fully lit. The soft shadows given by Voxel look best in this scenario, but there is no option to use only voxel shadows unless the entire game is set that way from the beginning. Since other zones look better with the hard shadows, this is not a reasonable solution.

Another more common scenario where someone might want to switch to soft voxel shadows is when the sky is covered in clouds. Since the sun is occluded, soft shadows are more accurate.

A method to change between hard ShadowMap shadows and soft Voxel shadows during runtime would be very useful. Since Roblox doesn’t want developers changing Lighting.Technology during runtime, adding a separate way to disable hard shadows would be appreciated.

12 Likes

Maybe this is the real feature request? The title here sounds like an XY problem.

e.g. you want underwater to look better / you want more toggles on underwater rendering.

The zone is not actually underwater, the lighting is simply changed to make it look like it’s underwater. When actually covering the zone with water the lighting looks significantly worse.

You could just manage your lighting better…? I don’t see why changing the lighting system during runtime needs to be created when instead you can manage your lighting better and change depending on zone.

The lighting already does change depending on zone. I thought this was obvious. I already change all of the other lighting parameters to try and make it look like it’s underwater, but the lack of soft shadows still leaves it looking wrong. Most other zones in the game look best with hard shadows, so I need to be able to switch between hard and soft shadows during runtime.

Why don’t you try making your own shadows with textures?

Several reasons

  1. The zone uses terrain heavily, terrain cannot be locally textured in that way.
  2. Shadow textures are memory intensive, 2/3rds of our players are mobile players.
  3. Figuring out how to make texture shadows would take a significant amount of development time that would be much better used on actual game features.