1 / 20

ייצוג בעולם 3D

ייצוג בעולם 3D. ייצוג מצולעים (פוליגונים). צלע. משולש. V1. קודקוד. T1. e3. e0. T2. צלע e0 : {v1,v2}. T0. V0. משולש T2 :{v0,v1,v2}. T3. e1. e2. דוגמאות. כך זה נראה בגדול. נוסיף צבע לעולם. ועוד תאורה . נעדן את התאורה . עכשיו זה נראה בסדר. עם כל השיפורים.

triveni
Download Presentation

ייצוג בעולם 3D

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. ייצוג בעולם 3D • ייצוג מצולעים (פוליגונים) צלע משולש V1 קודקוד T1 e3 e0 T2 צלעe0 : {v1,v2} T0 V0 משולשT2 :{v0,v1,v2} T3 e1 e2

  2. דוגמאות

  3. כך זה נראה בגדול

  4. נוסיף צבע לעולם

  5. ועוד תאורה ...

  6. נעדן את התאורה ..

  7. עכשיו זה נראה בסדר

  8. עם כל השיפורים

  9. Illumination and Shading Reflection Specular Light in • How to shade a surface • Position (Light/Surface) • Orientation (Light/Surface) • Characteristics (Light/Surface) • Local Illumination Models • Individual point and • The light source/s Illuminate it • Global Illumination Models • The light source and • The interchange of light between all the surfaces Reflection (diffuse) Internal Reflection Transmitted Light emission

  10. I = k i Ambient Light • Non reflective • Self-luminous • Illumination equation • I is the resulting intensity • Ki is the object’s intrinsic intensity • An ambient illumination variable is associated with each point • Evaluating the ambient equation <==> Lighting the object.

  11. I = I k cos(q) p d Diffuse Reflection • Point light source • The brightness depends on the angle qbetween direction to the light L and the surface normal N • If the light bean • Has cross sectional deferential are dA • It intercepts an area dA/cos(q) of the surface. q N q N dA dA/cos(q ) S2 S1

  12. Combining Shading Models Series of pictures of sphere illuminated by diffuse reflection model only using different Kd values (0.4, 0.55, 0.7, 0.85,1.0). Series of pictures of sphere illuminated by ambient and diffuse reflection model. Ia = Ib = 1.0, Kd = 0.4 and Ka = {0.0, 0.15, 0.30, 0.45, 0.60}

  13. Light Source Attenuation

  14. Specular Reflection Phone Illumination N R L Developed by Phong Bui-Toung for nonperfect reflection. The model assumes that the maximum specular reflection occurs when  is zero and falls off sharply as  increases. The rapid falloff is approximated by cos () . V    n I = IaKa+ fatt Id [KdOd cos() +W()cos ()] n Od :Object diffuse factor. W():Factor of specular reflection light

  15. Specular Reflection

  16. Shading Models for Polygons Shading We can shade a surface by calculating the surface normal at each visible point and applying the desired model at that point. Constant Flat Shading Applies an illumination model one to determine a singles intensity value that is then used to shade the entire polygon. Interpolated Shading Shading information is linearly interpolated across triangle from illumination values determined at it vertices

  17. Polygon Mesh Shading Gouraud Shadingextends the concept of interpolated shading applied to individual polygons by interpolating polygon vertex illumination values that take into account the surface being approximated. A vertex intensity is computed by using the vertex normal with any desired shading model. Phong Shadinginterpolates the surface normal vector, rather than the intensity. Interpolation occurs across a polygon span on a scan line.

  18. Interpolated Shading Problems • Polygonal Silhouette • Perspective distortion • Orientation dependence • Problem at shared vertices • Inaccurate vertex normal

  19. Light & Material in OpenGL GLfloatlit_mbient[] = {0.2, 0.2, 0.2, 1.0}; GLfloatlit_diffuse[] = {1.0, 1.0, 1.0, 1.0}; GLfloatlit_specular[] = {1.0, 1.0, 1.0, 1.0}; GLfloatlit_position[] = {-2.0, 1.0, 3.0, 1.0}; GLfloatlit_spot_dir[] = {-1.0, -1.0, -1.0}; GLfloatlit_shine[] = {50.0}; glShadeModel(GL_SMOOTH); glEnable(GL_LIGTING); glEnable(GL_LIGHT0); glLightfv(GL_LIGHT0, GL_POSITION, lit_ position); glLightfv(GL_LIGHT0, GL_AMBIENT, lit_ ambient); glLightfv(GL_LIGHT0, GL_DIFFUSE, lit_diffuse); glLightfv(GL_LIGHT0, GL_SPECULAR, lit_specular); glLightfv(GL_LIGHT0, GL_SPECULAR, lit_specular); glLightfv(GL_LIGHT0, GL_SHININESS, lit_shine);

  20. Material

More Related