Questions tagged [shading]

75 questions
13
votes
3 answers

Is a Lambertian reflector illuminated by a smaller fraction of the incident radiation when it's tilted?

In reading about Lambertian reflectance on Wikipedia I found the following phrase (in bold) which doesn't sound right to me: In computer graphics, Lambertian reflection is often used as a model for diffuse reflection. This technique causes all…
4
votes
1 answer

What's the justification of multiplying colors together?

In Phong shading model (and other shading models as well), the light color is multiplied together with the surface color component-wise. I want to know the justification for this. Is this some what related to the physics of light?
Rui Liu
  • 141
  • 1
3
votes
1 answer

Smooth shading on sphere approximation

In what way is a "cheat" when using smooth shading on a sphere approximation? I'm not understanding how it's a cheat to use smooth shading on this? Other questions that are lead after this may be: Why does it look better than the Gouraud Shaded…
user9778
  • 191
  • 3
  • 7
2
votes
2 answers

Lambertian Shading of a cube

In theory I can't use a lambertian shader on a cube, because there aren't surface normals on the edges. Is this correct ? Why is this always possible in software applications ?
Valerio
  • 433
  • 2
  • 5
2
votes
1 answer

How exactly does Gouraud shading apply color across a polygon? Does it do it by pixel or is it some other method?

I'm a super beginner to GFX. So far I've learned about 3 shading models when rendering meshes The first is Flat Shading. I seem to understand this, from my understanding, you take the normal of the face/polygon, apply your lighting model based on…
Hash
  • 157
  • 5
1
vote
3 answers

What is the algorithm used for phong shading normal interpolation?

Let's suppose we have an object consisting of only 3d points, and triangle faces that each take a subset of these 3d points. How can I interpolate the normal vectors to get that Phong smooth shading? The actual algorithm seems impossible to find yet…
AnnoyinC
  • 312
  • 1
  • 11
0
votes
1 answer

How are normals assigned to vertices in different types of shading?

I'm new to this forum and topic but wanted to figure out specifically how are normals assigned to vertices in flat shading, gouraud shading, and phong shading? Is there a difference between any?
user9778
  • 191
  • 3
  • 7
0
votes
2 answers

Gouraud Shading interpolates color across a triangle using vertex normals. Phong Shading interpolates normals. How are their end-results different?

I am struggling to understand as to why fundamentally triangles shaded through Gouraud shading and ones shaded through Phong shading look different. From my understanding, Gouraud Shading, takes the vertices of a triangle. It calculates the color at…
Hash
  • 157
  • 5
0
votes
2 answers

Lambertian shading illuminates all the front of a sphere

I've sucessfully implemented a ray tracer from scratch in C and it's marvelous: The surface normal on this sphere is taken by computing the intersection point, A, and treating this as a euclidean vector with origin, B, the center of the sphere. To…
Spade 000
  • 43
  • 4
0
votes
1 answer

Phong model: why no multiplication by N dot L in specular term?

Classical Phong reflection model, as described on wikipedia, computes diffuse and specular light as follows: vec3 diffuse = kd * dot(n, l) * i; vec3 specular = ks * pow(dot(r, v), a) * i; Where n, l, r, v are the normal, light, reflection and view…
Kuba
  • 3
  • 2