main
side
curve

Can anyone tell me what the differences between these shaders?

Discussion in 'Archive: Scifi 3D Forum' started by SamS, Oct 16, 2003.

Thread Status:
Not open for further replies.
  1. SamS

    SamS Jedi Youngling star 3

    Registered:
    Sep 2, 2002
    I've been getting better with my 3D modeling and animation prowess, but I recently came across the Oren-Thayer, Blinn, Phong, CookTorr and such shading and have absolutely no clue what they are, what's the difference and what they're good for. Online searches though Google and Ask.com have yielded more confusion than answers; thus, I resort to people I know should know what all this stuff is about. So, give it up: What is the difference between all these shaders?

    Links will help too.
     
  2. malducin

    malducin Jedi Padawan star 4

    Registered:
    Oct 23, 2001
    They are not shaders but local illumination models, which can be implemeneted in shaders. They are a bit easier to explain with some simple math but here it goes:

    Phong illumination model: this one is more commonly know as the plastic model as it can simulate that apperance (the more primitive Lambert shading only simulated matte surfaces). It accounts for the specular reflection by introducing the cosine elevated to n, between the reflection and viewer vectors. Also the specular component color can be different from the one of the actual material, hence the ability to simulate plastics (metals on the other hand, the specular component is the same color as the material). Also do not confuse this with Phong interpolation (which sometimes, unfortunately is also called Phong shading (of polygons)).

    Blinn illumination model: is a bit more advanced than the Phong one and it simulates metalic surfaces which has more controls for specular fall off and eccentricity and uses an attenuation factor. It based on a more statistical view of surface reflectivity which assumes an object is composed of microfacets which reflect the light. This microfacets are not all orieneted in the same direction, hence different materials might produce different specular components. There is a statistical factor of how this microfacets are oriented. Which brings us to...

    Cook-Torrance illumination model: is a bit more advanced model than the Blinn one but also assumes a microfacet type material and a statistical approach to modeling that. It's basicle the same equation as the Blinn model but uses a more complex formula to calculate the statistical distribution (of microfacets) factor.

    Oren-Thayer illumination model: never heard this one. I've heard of the Oren-Nayar one (Michael Oren has done research on more generalized Lambertian models) which is used to simulate rougher surfaces like velvet, and is a generalization of the Lambert one. I believe the Oren-Nayar also uses the microfacet assumption but applied to Lambertian surfaces and approximates better surfaces that exhibit retroreflection.

    A good CG book like the Computer Graphics bible explain most of this, or somehting like CG 101 or the Karen Goulekas book (if I remember right) at least for the first 3. The Oren-Nayar model is relatively modern as it appeared in the SIGGRAPH 1994 Proceedings so it's not usually mentioned in the CG textbooks but if you are a member of the ACM portal you could read the paper there or at his homepage in Columbia University or MIT (and looking at it there seems that there are no papers between Michael Oren and anyone called Thayer).
     
  3. SamS

    SamS Jedi Youngling star 3

    Registered:
    Sep 2, 2002
    Thanx dude, and it was Oren-Nayer. I'll check out the book you mentioned and see how I can apply this to my future work.
     
  4. malducin

    malducin Jedi Padawan star 4

    Registered:
    Oct 23, 2001
    Well the Karen Goulekas and CG101 books are more like references. The one by Goulekas is just an extensive glossary. CG101 is part glossary but it also has some excellent chapters on the history of CG and significant companies.

    Perhaps the better alternatives is the CG bible, Computer Graphics by Foley and van Dam, which is the standard text for CG (good explanation on local illumination models), the Advanced Animation book by Watt and Watt (has a goo expanation on Blinn and Cook-Torrance), and for completeness the Computer Animation book by Rick Parent. This books are a bit technical though and won't be readily applied to your work unless you write a renderer or shaders for example. But knowing the tech behind can certainly help in knowing how things work and consequently apply the techniques better. For Oren-Nayar check out the webpages of Michael Oren at MIT.

    For a more practical look either check out the digital series by New Riders, or the Inspired 3D series by Premier Press, in particular, in particular Digital Lighting and Texturing by Jeremy Birn, Digital cinematography and Lighting by Ablan, and Inspired 3D Lighting and Compositing by Michael Ford and Kyle Clark.

    Other books are the Procedural texturing and Modeling by Ebert, Musgrave and others and the SIGGRAPH RenderMan course notes, which while specific to RenderMan renderers have some very interresting info about shaders, illumination models and lighting.
     
Thread Status:
Not open for further replies.