Fishery : Fancy Lighting
February 14, 2017
The environment felt a bit drab without some environmental eye candy, so I decided to add some water lighting effects to add to the underwater feel. Specifically, I wanted animating water ripple effects to shine onto the seabed from the water surface and light ray effects (sun light beams diffusing through water volume).
After a few quick searches, I rediscovered lighting cookies. I heard about them before, to create stencil-like effects for light sources such as flashlights, but I hadn’t actually used them before. It turns out to be pretty simple, I found some water ripple textures and then de-saturated them to use as cookie textures.
I placed the two cookies on two directional lights and then applied a slow rotation on each of them to create the illusion of animated water ripples (actually animating them would have been more costly in both art resources and engineering). After playing around with the lights’ intensities, I was rather satisfied with the results.
Now I wanted to tackle the task of creating underwater light rays. My first intuition after some searches was to use several LineRenders, drawing long, stretched, billboarded particles that I would move around gently with scripts, but then I realized I could achieve the same thing with the built-in particles system by playing around with the particle size and shape. I then get the added benefit of not needing to manually animate or manage the lifecycles of the particles, avoiding that by manipulating the particle system’s color/size over lifetime features. Placing them on dark surfaces led to there being ugly intersections between the bright rays and dark geometry, but these things are supposed to be emitting light, so I added another directional light with a circular gradient cookie to leave spots of light on the seabed on which I placed the light rays. Now you can’t really see those ugly intersections anymore 🙂
Henry Ho