Do You Smell That Stink?
Until scientists figure out a marketable way to incorporate the sense of smell in our media (good luck with that), artists must convey stinkiness visually. This is typically done by using “stink lines” (very technical term). I can think of no better example than Ren and Stimpy’s classic animated stink lines, which were featured in just about every episode.


Wanting to make our glorp puddles (alien poopoo) feel a little more revolting, we decided to give them some of these stink lines. They are easy enough to draw. After all, little kids do it all the time. But how do you draw and animate stink lines in 3D space? Well here’s the answer to that question you never asked.
A particle system is a good solution for this. By fudging with a robust set of parameters, it doesn’t take long to come up with a system that spawns, moves, and destroys limitless visual entities, like a gross wavy stink line for example. That’s fine, sure, but I also want the lines to warp and wave as they drift through the air and I don’t want to expensively animate them with a skeleton or blend shapes. This is where a little shader magic would be useful!
It’s very simple, really. All we need to do is make a black and white “wave map” image and tell the shader to move the stink line’s vertices based on this information by plugging the image into the shader’s vertex offset function. White pushes them in one direction and black pushes them in the other. Then we just have the shader move and repeat this wave map along the length of the stink line by adding the time function to the wave map’s UV’s. It’s useful to expose parameters in the shader like wave speed, wave size, number of waves, etc. so they can easily be tweaked until the desired result is achieved. For extra variation, I plugged the wave size parameter into a sine wave multiplied by time so the scale of the waves will also shift over time.


I don’t just use this type of effect on stink lines. All the fluid-type objects in Cosmo’s Quickstop and even the customer task bars in the UI use an effect similar to this. It’s a cheap and effective way to add dynamic animation to anything from wind-rustled foliage to turbulent rip-tides.
-Bryan