Shadows in Space

Started by
3 comments, last by l0calh05t 8 years, 10 months ago

Hi, I've been trying to implement shadows for a space-like scene (extremely large draw distance, very distant light source, objects ranging from 1m to 100km in size) and I was wondering if there's a better approach than stencil shadows? I looked briefly at shadow volumes but due to the distances and sizes involved, I imagine I'd quickly run into resolution issues.

Is there any other technique for shadows that'd work with such constraints?

Advertisement

Mmm... yeah actually there is.

in space everything is uniformly lit to a certain degree. As light does not ever stop without bouncing off of something. As it gets further away from the source, the light gets weaker as it's emitted radially.

So the first trick I suggest is to apply some environmental lighting. How you want to do it is dependent on you. What I suggest are two different enviormental lighting layers.

One layer will account for larger objects. Looking at photos of space shows me that large objects will typically have their shadows more pronounced by the nearest star. Meaning darker shadows.

Use a small amount of environmental lighting to help give definition to normally black areas. You don't want anything pitch black.

The second layer, I'd have it where environmental lighting is more pronounced. Smaller objects seems to receive light well in space, and the shadows are much weaker.

For shadows... I'd suggest having the frustrum effect both layers. So when small objects pass behind larger objects and light is blocked, they are effectively blotted out.

stencil shadows and shadow volumes are different names for the same.

you could simply use per object shadow maps. every object in space is very limited in size, thus chances are usually small that other objects will contribute to the shadowmap, but if those do, it's most likely enough to project them to the near plane of the shadowmap.


So the first trick I suggest is to apply some environmental lighting. How you want to do it is dependent on you. What I suggest are two different enviormental lighting layers.

Environmental lighting in space? I assume we're talking about an inter-planetary travel kind of situation where we're not up close to any planet surface and where we can't distinguish too many detailed planetary surface features. Tell me, which large surface exactly does the light from a nearby star reflect off of to warrant a strong environmental/bounce light influence? Yes, there's always going to be some amount of indirect light hitting any surface, but in a setting where objects are separated from each other by massive distances this is going to be quite negligible.

Of course you can use artistic freedom and paint in very bright and colorful nebulae all over the place which drastically influence a planet/celestial body's surface in some way, but this doesn't seem very realistic to me.

Honestly, the only time you'd actually get any benefit of doing a shadow implementation at all at this level of detail is if one celestial body occludes incoming light from a star to another celestial body (an eclipse) which is actually somewhat rare as far as I know.

I gets all your texture budgets!


So the first trick I suggest is to apply some environmental lighting. How you want to do it is dependent on you. What I suggest are two different enviormental lighting layers.

Environmental lighting in space? I assume we're talking about an inter-planetary travel kind of situation where we're not up close to any planet surface and where we can't distinguish too many detailed planetary surface features. Tell me, which large surface exactly does the light from a nearby star reflect off of to warrant a strong environmental/bounce light influence? Yes, there's always going to be some amount of indirect light hitting any surface, but in a setting where objects are separated from each other by massive distances this is going to be quite negligible.

Of course you can use artistic freedom and paint in very bright and colorful nebulae all over the place which drastically influence a planet/celestial body's surface in some way, but this doesn't seem very realistic to me.

Honestly, the only time you'd actually get any benefit of doing a shadow implementation at all at this level of detail is if one celestial body occludes incoming light from a star to another celestial body (an eclipse) which is actually somewhat rare as far as I know.

Maybe Tangletail meant the lighting situation if only starlight is present? In interstellar space with no nearby stars that light would be nearly omnidirectional ('environmental').

This topic is closed to new replies.

Advertisement