1 / 17

CS450: Computer Graphics

CS450: Computer Graphics. Surface Texture. Why Use Surface Texture?. The process of modeling an object by a set of geometric primitives, then rendering the primitives, is limited.

lenawalton
Download Presentation

CS450: Computer Graphics

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. CS450: Computer Graphics Surface Texture

  2. Why Use Surface Texture? The process of modeling an object by a set of geometric primitives, then rendering the primitives, is limited. Consider modeling an orange. We might start with a sphere, using material properties that match those of an orange. Unfortunately, this results in a rendering that is too regular to look like an orange. It looks too smooth.

  3. Why Use Surface Texture? We might attempt to create a more realistic rendering of the orange by adding more polygons to the model. But, even with hardware capable of rendering tens of millions of polygons per second, we can still overwhelm the graphics pipeline. An alternative is to retain the simple model, but add detail as a part of the rendering process.

  4. Surface Texture We can create complex surfaces by first creating a simple geometric shape and then mapping a texture or image onto that shape during the rendering process. This creates the ILLUSION of a more complex shape. • Texture map • Bump map • Environmental map (reflection maps)

  5. Texture Mapping TEXTURE MAPPING is the mapping of a function (a texture pattern) onto a surface in 3D. A small area of a pattern (texture) to help determine the color of a pixel on an object’s surface. The texture value may be used to either set or modify the pixel value. The source image (texture) is mapped onto a surface in 3D object space, which is then mapped into the destination image (screen) by the viewing projection.

  6. Texture Mapping texture space (u,v) object space (xo,yo,zo) screen space (x,y)

  7. Texture Mapping Texture patterns may be one, two, three or even four dimensional If two dimensional textures are mapped onto a curved surface, the shapes and distances in the texture will be distorted. Three dimensional color maps can be used to assign color values as if the object had been carved out of a solid three dimensional block of textured material.

  8. Texture Mapping In POVRay, the texture attribute is used to assign color values to the surface of an object: sphere {<0,0,0> 1 texture{pigment{Blue}} }

  9. Texture Mapping Two dimensional texture patterns are created in POV by wrapping a two dimensional image around an object. sphere { <0, 0, 0>, 1.5 texture{ pigment{ image_map { gif "cork.gif" map_type 1 } } } finish {ambient <1.0, 0.8, 0.2>} }

  10. scale 0.5 scale 1.0 Texture Mapping POV texture patterns are three dimensional and are specified on the unit cube. The may be scaled or distorted using various modifiers: box { <-1, -1, -1>, < 1,1,1> texture { pigment { checker color White color <1.0, 0.8, 0.2> scale 0.5}} finish {ambient 0.2} }

  11. Texture Mapping POV texture patterns are three dimensional and are specified on the unit cube. The may be scaled or distorted using various modifiers: cylinder { <0, -1, 0>, < 0, 1, 0>, 1.0 texture { pigment { checker color White color <1.0, 0.8, 0.2> scale 0.5} } finish {ambient 0.2} }

  12. Texture Mapping POV texture patterns are three dimensional and are specified on the unit cube. The may be scaled or distorted using various modifiers: sphere { <0, 0, 0>, 1.5 texture { pigment { checker color White color <1.0, 0.8, 0.2> scale 0.5} } finish {ambient 0.2} }

  13. Bump Mapping Bump maps simulate surface texture by artificially modifying or perturbing the unit normal In POV this can be done as follows: sphere { <0, 1, 2>, 2 texture { pigment { color Yellow } normal { bumps 0.4 scale 0.2 } finish { phong 1 } } }

  14. Texture map Bump map

  15. Image Mapping Images may also be mapped to the surface of an object to simulate texture. In POV this is done as follows: sphere { <0,0,0> 1 pigment { image_map {jpeg ”mypic.jpg"} scale 0.5 } }

  16. Environmental Mapping Spherical environment mapping (sometimes known as standard environment mapping) involves the use of a textured hollow sphere. A spherical texture is created, using a fisheye lens or via prerendering a preexisting virtual scene, and is mapped onto the sphere. Pixel colors in the final rendering pass are determined by calculating the reflection vectors from the points on the object to the texels (texture pixels) in the environment map.

  17. Environmental Mapping

More Related