Talk:Blinn–Phong reflection model

message: We need an image to illustrate the situation here.  Anyone? --cslarsen 11:03, 5 May 2006 (UTC)
replies: text: Done. - Rainwarrior 18:46, 7 August 2006 (UTC)
replies: text: I believe there is an error in the image caption. The rightmost image is supposed to approximate the phong model by modifying the specular power and thus making the highlight smaller (as blinn-phong tends to make larger highlights for the same specular power than phong). But surely we would have to *raise* the exponent to make the highlight smaller, not lower it as the caption suggests. Jtsiomb 14:13, 24 January 2007 (UTC)

text: I agree. What is the proper procedure in this case? We cannot change the caption since it is part of the picture. Should we add a correcting phrase to the text of the article.--130.133.8.114 (talk) 13:13, 20 May 2010 (UTC)
thread_title:  Need an image 

message: For D3D I don't know but.
To what I know it's only Gouraud in OpenGL as default.
:Gourad shading is an interpolation model while the Blinn–Phong shading model is a shading model, or an illumination model (see List of common shading algorithms); those are two completely separate things. According to OpgenGL Programming Guide — Seventh edition, OpenGL uses the Blinn–Phong shading model. This is not explicitly expressed, though, but the book describes the formula OpenGL uses, which exactly matches that of the Blinn–Phong model. It may be that Gourad shading is the default interpolation model, of that I do not know. —Kri (talk) 13:10, 9 July 2013 (UTC)
thread_title: No sure it's default in OGL or D3D

message: Someone reverted this paragraph: "Blinn-Phong is the default shading model used in OpenGL, and is carried out on each vertex as it passes down the graphics pipeline; pixel values between vertices are interpolated by Gouraud shading by default, rather than the more expensive Phong shading." with the comment "rm paragraph: speaking about a 'per-vertex phong shading' is rather strange to me".
I don't know if the original statement was true, but it makes perfect sense.  While Phong shading is a per-pixel shading with normal interpolation, the Phong reflection model or the alternative Blinn–Phong shading model, though called differently, can be used at vertices and interpolated with Gouraud shading.
I'm going to revert the deletion.  If someone knows for sure that it's true or not, please comment.
Dicklyon 16:13, 29 June 2006 (UTC)
replies: text: It was correct. Doing actual normal-interpolation takes a lot of extra calculation and gives only a little benefit. The traditional way to get around this is to increase tesselation, but nowadays you can write a fragment shader that does it. (I'm still wondering if we could have a normal-interpolation feature added to GLSL that could in hardware interpolate two normals with a quadratic approximation to the normalization, instead of having to take a square root at every step....) - Rainwarrior 05:07, 30 June 2006 (UTC)
replies: text: Indeed, an approximate normalization of the interpolated normal is a lot quicker than a reciprocal square root.  But then the high power of the dot product multiplies the normalization error up by a big factor, so you really need a different (and quicker) formulation of the reflection model to get a net win.  Right?  Maybe like this ? Dicklyon 05:28, 30 June 2006 (UTC)
replies: text: That's true, any errors would be worsened by high specular exponents... it's just something I've had in the back of my mind for a while, I haven't tried out any experiments of my own yet. I was more wondering if an automatic normal approximation might ever be built into GLSL, i.e. instead of just the varying type, have a normalized_varying type or something where interpolates them as normals doing an approximation in hardware somehow. I suppose there are already extensions that use a cube map to approximate normalization though. I should try some of these out. - Rainwarrior 06:17, 30 June 2006 (UTC)
replies: text: The sensitivity to normalization errors comes from using the dot product as a proxy for the angle.  If you use the squared magnitude of a vector difference instead (approx sin^2 instead of cos), then the error due to normalization when you compute a smaller specular reflection is much less.  Making an approximate Phong-like or Blinn-like or Gaussian-like specularity out of the sin^2 is easy. It's all published in an obscure Apple tech report and a patent. Let me know if you'd like a copy. Dicklyon 15:06, 30 June 2006 (UTC)

text: Find the "Lyon-Phong" variant via my new home page . Dicklyon 20:37, 1 July 2006 (UTC)
replies: text: Thanks! - Rainwarrior 20:50, 1 July 2006 (UTC)
thread_title: Default in OpenGL?

message: Jtsiomb added an explanation, but I'm not sure I get it.  It seems to rely on L and V being constant across a face, but that would only be true of the light and viewpoint were infinitely distant, no? Also, the language about how it might "seem absurd" is not appropriately encyclopedic.  Seems like a rewrite is in order. Dicklyon 03:55, 24 January 2007 (UTC)
replies: text: You are absolutely correct. I didn't realize while writing it, that I was implicitly assuming the light and viewer to be treated as infinitely distant. I edited it to explicitly state that assumption. Also as far as the language goes, I'm afraid I'm not a native english speaker, and I didn't think the "seem absurd" would be inappropriate. I fixed that too.Jtsiomb 10:37, 24 January 2007 (UTC)

text: I don't see why it shouldn't be possible to calculate R per vertex and then interpolate it? --Kri (talk) 16:22, 21 April 2011 (UTC)
replies: text: Since H doesn't depend on the surface normal, it's very simple.  If you want to simulate a textured surface, where the surface normal varies per pixel, you can combine with variable N with interpolated H easily in H•N.  But with Phong, if you interpolate R across a triangle, you'll get a smooth surface; if you want a fluctuating N, you need to recalulate R at each pixel.  So Phong is efficient for smooth surfaces, but not for textured, if I understand this stuff correctly.  Dicklyon (talk) 06:31, 22 April 2011 (UTC)

text: What kind of artifacts? Did you compute the (unit-length) halfvector from the normalized view and light vectors? --Martin Kraus (talk) 17:43, 8 June 2011 (UTC)
thread_title:  Efficiency explanation 

message: I don't really know much about rendering, so perhaps this is an obvious question, but in the definition of the half-angle H, there is a reference to a vector N which never defined, and probably should be. 192.91.171.42 15:20, 27 April 2007 (UTC)
replies: text: Fixed a while back. Dicklyon 15:32, 28 August 2007 (UTC)
thread_title: Terminology definition

message: Pictures in this article are in linear color space, but they are usually viewed on sRGB monitor, so they look completely different from an actual Blinn-Phong/Phong Reflection Model rendering. 83.7.234.61 (talk) 19:15, 19 December 2009 (UTC)
thread_title:  Wrong pictures 

message: Given that blinn-phong shading is a basic effect used often in HLSL I shall add a small piece of HLSL code which performs the function.
--ChristosIET (talk) 15:05, 26 February 2010 (UTC)
replies: text: I don't think this should be part of a Wikipedia article because it represents original material that cannot be attributed to a source; see Wikipedia:NOR. But if you have a published source for this shader, it would be better to cite the source. --Martin Kraus (talk) 09:19, 9 June 2011 (UTC)
thread_title:  HLSL Code Sample 

message: In the image illustrating three different renderings, it says under the rightmost picture that it uses a lower exponent. This is incorrect; to get smaller (sharper) reflections a higher exponent has to be used. --Kri (talk) 23:11, 6 February 2011 (UTC)
replies: text: Good catch.  I corrected the image.  Dicklyon (talk) 23:56, 6 February 2011 (UTC)
thread_title:  Incorrect information in picture 

message: I've read Blinn's paper several times and the model described in his original paper is not what is described in this article. If you read Blinn's paper you can see that the model is a modification of the Torrance-Sparrow model, not of the Phong model. He only briefly talks about a reformulation of the Phong model in the beginning of the paper. He then reformulates the Torrance-Sparrow model in terms of the half angle H. Later in the paper, he compares the two models showing how the modified Torrance-Sparrow model performs better than the modified Phong model in both accuracy and speed. In addition, his proposed microfacet distribution D_3 is not mentioned in the article. This is all clear in the concluding paragraph:
"The Torrance-Sparrow reflection model differs
from the Phong model in the inclusion of the G, F
and l/(N*E) terms. This has a noticable effect
primarily for non-metallic and edge lit objects.
The use of the D3 micro facet distribution
function provides a better match to experimental
data and is, happily, easier to compute than D1
or D2. This savings effectively offsets the
extra computation time for G and F yielding a
hilight generation function having a high degree
of realism for no increase in computation time."
What's the deal?  — Preceding unsigned comment added by 129.25.18.12 (talk) 19:08, 18 August 2011 (UTC)
replies: text: The article describes what is known as Blinn–Phong, which is Blinn's adaptation of Phong's cosine specularity model.  We should also have a good article on the Torrance–Sparrow model, including how Blinn adapted it.  Maybe you can create that?  Dicklyon (talk) 19:39, 18 August 2011 (UTC)
replies: text:  Hmm, I will see if I can make some time for that, thanks  — Preceding unsigned comment added by 129.25.18.12 (talk) 19:47, 18 August 2011 (UTC)
thread_title:  Article Incorrectly Describes Blinn-Phong?