Rendering oily/polluted water?
Posted
by
Fraser
on Game Development
See other posts from Game Development
or by Fraser
Published on 2013-11-08T21:53:23Z
Indexed on
2013/11/08
22:18 UTC
Read the original article
Hit count: 313
Any shader wizards out there have an idea of how to achieve an oily/polluted water effect, similar to this:
Ideally, the water would not be uniformly oily, but instead the oil could be generated from some source (such as a polluting drain from a chemical plant) and then diffuse throughout the water body. My thought for this part would be to keep an "oil map" as a 2D texture that determines the density of oil at each point on the water surface. It would diffuse and move naturally with the water vel;ocity at that point (I have a wave-particle simulation for dynamic waves, and am already doing something similar for foam on the water surface). However, I'm not sure how physically correct that would be, since oil might not move at the same velocity as the water.
And I have no idea how to make all those trippy colors :-). Thoughts?
© Game Development or respective owner