## ← Energy Balanced Materials - Interactive 3D Graphics

• 2 Követős
• 36 Sors

### Beágyazókód kérése x Embed video Use the following code to embed this video. See our usage guide for more details on embedding. Paste this in your document somewhere (closest to the closing body tag is preferable): ```<script type="text/javascript" src='https://amara.org/embedder-iframe'></script> ``` Paste this inside your HTML body, where you want to include the widget: ```<div class="amara-embed" data-url="http://www.youtube.com/watch?v=ajp2pJ5frU8" data-team="udacity"></div> ``` 2 Languages

Showing Revision 2 created 05/24/2016 by Udacity Robot.

1. The Blinn-Phong reflection model has been around for more than 30 years. It
2. used to be hard-coded into older GPUs from the early 2000s. It's easy to
3. evaluate and somewhat intuitive to control. One technique worth mentioning with
4. this reflection model is that you can get the specular highlight a different
5. color than the diffuse components. For example, if the specular component is
6. given a white color, the object looks more like a shiny plastic. If both the
7. specular and diffused components are multiplied by the same color the material
8. looks more metallic. However this classic reflection model is not energy
9. balanced, you'll notice as I change the shininess, the material looks smoother,
10. but overall the amount of light reflected becomes greater. If you think about
11. it, this makes a lot of sense. Here's the Blinn-Phong equation again. You take
12. N dot H, and take the maximum between that and 0, and raise that to the power
13. of shininess. The graph of the angle between N and H, versus the specular
14. intensity, is like this. Clearly the area under the graph for cosine squared is
15. smaller than for cosine, so the amount of energy coming from the surface will
16. be less as you increase the shininess. Cosine cubed has even less overall
17. energy. As the shininess goes up, the area under the curve goes down. Two
18. changes give a better result, one that's both more plausible and easier to
19. control. One idea is to attenuate the specular term by the lumbersian fall off.
20. In other words, just like diffuse, make the specular term drop off as the angle
21. of the light to the surface becomes less straight. N dot L. The other idea is
22. to make these narrower curves be higher, giving them roughly the same volume at
23. 3D. This idea is captured in the last term. As shininess increases this last
24. term also increases, when combined with the Lambertian term this new equation
25. gives a reasonably-balance result. Here is the original BlinnâPhong equation.
26. You can see with the shininess of three it's overall much brighter than a
27. shininess of 100. By energy-balanced I mean that changing the shininess does
28. not noticeable change the amount of energy reflected from the surface, You can
29. see the effect by running the demo that follows. By the way, this demo puts all
30. its shaders inside the JavaScript program itself, if you want to look at an
31. example of how that's done. Using the Lambertian N dot L term also eliminates a
32. serious problem with specular falloff. You may have noticed it yourself with
33. the basic Blinn-Phong model. Here's a view of the model with the low shininess
34. and the light coming up from behind it. The diffuse term drops off smoothly,
35. but the specular suddenly drops to zero, giving a pretty bad result. By using
36. the Lambertian dropoff, the specular term now fades properly.