1 / 12

Smooth Shading Gouraud Phong

Smooth Shading Gouraud Phong. Interpolate value(s) for point in face from values at vertices. http://www.blancmange.info/notes/maths/vectors/primitives/. For each vertex, v Nv = <0,0,0> For each face of vertex Compute face normal Nv += face normal Normalize Nv.

morey
Download Presentation

Smooth Shading Gouraud Phong

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Smooth ShadingGouraudPhong CSE 681

  2. Interpolate value(s) for point in face from values at vertices http://www.blancmange.info/notes/maths/vectors/primitives/ CSE 681

  3. For each vertex, v Nv = <0,0,0> For each face of vertex Compute face normal Nv += face normal Normalize Nv Compute normals at vertices For each vertex, v Nv = <0,0,0> For each face Compute face normal For each vertex of face Nv += face normal For each vertex, v Normalize Nv CSE 681

  4. Interpolate value(s) for point in face from values at vertices Gouraud smooth shading: Compute normals at vertices Compute color at vertices Interpolate interior color CSE 681

  5. Smoothly shaded objects Mach Band Effect Colors are continuous, but not derivatives Eye picks up on this and accentuates discontinuity CSE 681

  6. Interpolate value(s) for point in face from values at vertices Phong smooth shading: Compute normals at vertices Interpolate interior normal Compute color at point CSE 681

  7. Interpolate value(s) for point in face from values at vertices CSE 681

  8. Interpolate value(s) scanline algorithms Interpolate down edges, across scanline CSE 681

  9. Point sample Quadrilateralinverse binlinear map then use u,v values to interpolate CSE 681

  10. Point sample Triangle compute barycentric coordinates then use to interpolate Pc b P a c Pa Pb Normalized so that a+b+c=1 P=aPa+bPb+cPc CSE 681

  11. Area of a triangle - using vector algebra Pc Area = (1/2)h|Vab| h = |Vbc |sin(q) h Area = (1/2) |Vab| |Vbc |sin(q) Pa q |Vab x Vbc| = |Vab | |Vbc|sin(q) Pb Area = (1/2) |Vab x Vbc| CSE 681

  12. Examples of smooth shading See links off of course web site CSE 681

More Related