santicor opened this issue on Mar 11, 2009 · 6 posts
bagginsbill posted Wed, 11 March 2009 at 5:22 PM
In matmatic, a basic GC shader with Diffuse and Blinn effects that uses a color map would look like this:
gamma = 2.2
clr = ImageMap("").labelled("Color Map")
s = Surface(clr, 0, 1, 0)
clr = clr ** gamma
s.Alternate_Diffuse = (Diffuse(clr, .8) + Blinn()) ** (1 / gamma)
One that does basic Fresnel reflection (involving a cheap and bad approximation instead of the real Fresnel effect calculation) would change that last line to this:
fe = EdgeBlend(.04, 1, .07)
s.Alternate_Diffuse = (Blend(Diffuse(clr, .8), Reflect(), fe) + Blinn()) ** (1 / gamma)
Of course if I gave you the matmatic function for the actual Fresnel effect (which requires 14 nodes all by itself) you'd just say this:
fe = TrueFresnel(1.33)
That's the beauty of matmatic - complicated multi-node things become as simple to use as the built-in nodes.
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)