cedarwolf opened this issue on Jun 01, 2013 · 48 posts
kobaltkween posted Thu, 20 June 2013 at 4:53 PM
You have nothing to be ashamed of. I only found out Eccentricity was a form of inverted IOR when I was reading on the web at some point well after using Blinn for years.
If your shininess is even throughout the material, then yes, just leave your Blinn alone. If it isn't, if you have a specular map, then where the map is brighter and the material shinier, you want a lower Eccentricity, lower SpecularRollOff, and higher Reflectivity.
To use your specular map with Blinn, you need to define a mathematical relationship between "shine" and each of those three Blinn properties. You have to define what a "shine" of 1 looks like, what a "shine" of 0 looks like, and the transition between them for each property.
I initially just followed Bagginsbill's equations for those three "shine" relationships (you can find them here in the forums). Going beyond them to something that better suited my work was time consuming.
To make my life simpler, I now mostly use a specular node without Fresnel built in (i.e., one that doesn't get brighter at the edges), plug the Fresnel into its Reflectivity, make a Math Add node with a base number of at least 1 and a second number to add up to I want the highest IOR to be (for instance, Math Add (1.1, 0.15)), then plug the specular map into the second value.
It sounds more complex than it is. ;D
I built a relationship between IOR and RollOff, but since that's basically how big and blurry a fake reflection of a non-existent light mesh should be, I've gotten really loose about it recently.
Quote - I will test the colored light theory, what should I look for, in terms of things that wouldn't look right if the shader was incorrect?...
You'd be judging your specular colors. If you want a control to compare it to, you can use the more accurate node set up as shown in my attached image. Just use Blinn instead of the Specular node I used, and don't involve the Fresnel Blend.
It's not exactly a theory. It's math. The conservation of energy solution you've used is incorrect. That's a fact, not something you need to test. What you'd really be testing is - Can you see the error?
To make the problem you're trying to spot more concrete, here's the math. I've broken the equations out into each color component. First the correct equation for those two elements:
Red Final = Clamp (Red SSS - Red Blinn) + Red Blinn
Green Final = Clamp(Green Final - Green Blinn) + Green Blinn
Blue Final = Clamp(Blue SSS - Blue Blinn) + Blue Blinn
Clamp means any results above 1 get converted to 1 and any below 0 get converted to 0. Blender's Blending input does this automatically. So this is the equation you're using:
Blinn Grey = (Red Blinn + Green Blinn + Blue Blinn) / 3
Red Final = Clamp (Red SSS - Grey Blinn) + Red Blinn
Green Final = Clamp(Green Final - Grey Blinn) + Green Blinn
Blue Final = Clamp(Blue SSS - Grey Blinn) + Blue Blinn
Let's say a particular spot on surface has SSS shading with an RGB value of (100, 150, 50). And that the same particular spot has a Blinn value of (50, 175, 100).
The first equation becomes:
Red Final = Clamp (100 - 50) + 50= 50 + 50= 100
Green Final = Clamp (150 - 175) + 175 = 0 + 175 = 175
Blue Final = Clamp(50 - 100) + 100 = 0 + 100 = 100
So the correct final color is (100, 175, 100).
The second equation becomes:
Blinn Grey = (50 + 175 + 100) /3 = 108 (rounding to the nearest 1, as colors do)
Red Final = Clamp (100 - 108) + 50 = 0 + 50 = 50
Green Final = Clamp(150 - 108) + 175 = 42 + 175 = 217
Blue Final = Clamp (50 - 108) + 100 = 0 + 100 = 100
In your equation the final color is (50, 217, 100). A much more green, and much less red color than (100, 175, 100). In other words, your specular will have more of the light color and less of its inverse than it should.
All that said, if it looks fine to you, don't worry about it. Rendering is just math. You can do the math and calculate the difference between wrong and right equations. Or even between more and less accurate ones. But you need to use your eyes to judge whether that difference is worth bothering about.
Bagginsbill has a full and highly accurate conservation of energy system written out in Matmatic for dealing with all the different shading components, including reflection. But he didn't use it in your reference or his EZSkin shader. I haven't seen him say why, but I'd bet it's because he didn't think the difference was noticeable enough to be worth the trouble.
Judgement is the heart of testing lighting and materials. It can be a fact that certain shading problems exist. It can be a fact that certain people can see them. Those facts don't mean you have to change what you're doing. Only you can decide if those issues are important.
Regular workflow is inaccurate. I can often spot the problems of regular workflow in people's renders. Does that mean those aren't good or even great works? Not even by my own standards. I've favorited thousands of works with regular workflow problems I could see. The same goes for the myriads of different technical issues I've seen in works, from anatomy to gravitational effects to basic composition rules. None of those issues stopped the works from having an impact on me.
A highly positive critique can include several technically valid and artistically relevant flaws as long as the merits outweigh the flaws. Every choice an artist makes has a cost as well as a benefit. Only the artist can decide what choices are worth the cost, and what strengths are most important. And, for that matter, which critiques are helpful and which aren't.
Quote - Also, don't mean to sound a little dumb (lol), but how do I determine IOR in reflections and such... I usually keep it at it's default cause I'm clueless and don't want to ruin anything... Also how would I determine what specular settings match the IOR?
You definitely do not sound dumb.
IOR is kind of easy because scientists have done the work of measuring lots of values. You can find charts and lists of IOR values online. Water is 1.33. Corneas are about 1.38. Glass is around 1.54, but varies based on the type of glass. Diamond is 2.4.
Even though you'll find metal IORs as low as 1.44, that's incorrectly ignoring the imaginary component. I find metals work best with an IOR of about 15 to 20.
I use those as my basic scale. A car won't be shinier than a diamond, but it can be shinier than glass. A regular wet surface will probably have an IOR somewhere around water's. I tend to keep regular skin around 1.25, but someone like Latexluv might want to get closer to 1.1 or lower. Checking, vegetable oil is 1.47, which is probably the very highest I'd ever make skin or lipstick.
Just make sure you never let your IOR dip below 1. 1 is a pure vacuum, and lower than one requires a very special physical case.
And you're definitely not asking too many questions. ;D