AnAardvark opened this issue on Dec 15, 2009 ยท 9 posts
bagginsbill posted Wed, 16 December 2009 at 5:35 PM
OK I'm not going to bother trying to explain the math. The Fresnel equations are pretty complicated, and I have offered approximations before in a few nodes.
But - the underwater case (or more generally going from higher to lower IOR) where TIR comes into play the math involves complex arithmetic (using the math definition of complex, meaning involving imaginary numbers) and approximating it is incredibly difficult. It's easier for me to just give you the 19 nodes it takes.
I've uploaded UnderWater.zip to my free stuff random shaders area. It contains two Poser materials. One is UnderWater.mt5, and the other is UnderWaterGC.mt5. The GC version is a gamma correcting shader and should be used if you have other GC shaders in the scene. Use the non-GC version in Poser Pro with render GC. The gamma is adjustable in the GC version - the top left node labeled PM:Gamma controls it. It is set to 2.2 by default.
In both, there is a Fractal_Sum node to make waves. If you don't want that - delete or disconnect it from the Bump channel. Of course you can connect whatever you want to the Bump instead - the Fresnel part is unaffected by that. Just leave the other nodes alone.
http://sites.google.com/site/bagginsbill/free-stuff/random-shaders
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)