Daeshawn opened this issue on Mar 31, 2009 ยท 78 posts
bagginsbill posted Wed, 11 November 2009 at 9:03 PM
I never answered the questions about how I arrived at the approximation because I already answered. I have a program that graphs functions in real time. It has the ability to graph multiple functions, and use parameters that I can click on to adjust the functions.
I wrote the real Fresnel equation, and I wrote the approximation, and I adjusted the parameters until they pretty well matched. I tried many approximations before arriving at the formula that results in those 4 nodes. It is the smallest set of nodes I can find that is within 1% accuracy across the whole range of values.
Every now and then I open this program up and I work on the approximation some more. I have better parameters than before, now.
I used the Blender node because it implements an expression involving 3 arguments that happen to be a good part of the formula I came up with. Blend(a, b, f) implements:
(1-f)a + fb
The way I'm using it, b is 1, so this reduces to:
(1-f)*a + f
The value I used was .04, but that's not actually the correct number for water. It is the number for glass. I was lazy and just copied my glass shader to do the water.
You want the best numbers I currently have for water?
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)