250 likes | 324 Views
CS 395: Adv. Computer Graphics. Overview Surface Detail Maps Watt: Chapter 8 + readings Due Date Reminders: Feb 4 - project proposal, or Feb 4 - reference list for survey paper Jack Tumblin jet@cs.northwestern.edu. Basic Problem. Big problem: even ‘simple’ objects are not.
E N D
CS 395: Adv. Computer Graphics Overview Surface Detail Maps Watt: Chapter 8 + readings Due Date Reminders:Feb 4 - project proposal, orFeb 4 - reference list for survey paper Jack Tumblin jet@cs.northwestern.edu
Basic Problem • Big problem: even ‘simple’ objects are not... Image Credit: Pixar/Renderman 1984
Basic Problem • Big problem: even ‘simple’ objects are not... • Practical ways to add accurate local details? Image Credit: Pixar/Renderman 1984
Surface Detail Mapping • Basic Idea: • Simple polygons for primary 3D shape info • ‘Texture’ image: secondary 2D/3D details stored in 2D • Quickly ‘paint’ 2D details onto simple polygons • Hardware support now commonplace • Texture • Mapping...
‘Digital’ Image: a 2D Grid of Numbers • NO intrinsic meaning—use it for anything: reflectance, transparency, illumination, normal direction, material, velocity... v v u u
Texture Map: Bilinear Interpolation v Image Credit: Nate Robins u Basic ideas Inverse mapping: for each image pixel (x,y) find texture address (u,v) get value (may skip texels!) Forward mapping: for each texel (u,v), find image address (x,y) put value (may skip pixels!) x v u y
Bilinear Interpolation: 2 Problems... Image Credit: Nate Robins Aliasing Errors (1 pixel maps to > 1 texel) (can be much worse!)
Bilinear Interpolation: 2 Problems... Image Credit: Nate Robins Aliasing Errors (1 pixel maps to > 1 texel) (can be much worse!) Blurring (1 pixel maps to < 1 texel)
MIP-map Filter (L.Williams, 1983) • Inverse sampling: find texture address from x,y • Sample texture from a ‘pyramid’ of images, each one ¼ size of the previous. • Match transformed pixel spacing to texel spacing • Good, but blurry; nondirectional Image Credit: Nate Robins
Bump Mapping (Blinn 1978) • Texture maps ~ diffuse reflectance: no lighting or viewing dependence • ‘Flat’ appearance; can we suggest shape? • Bump map: texel value surface normal changes • Make bump map: • make a 2D height field in u,v space • find, store surface normal vec. at each u,v texel • Use bump map: • surface normal (phong shading, etc) = polygon normal + bump map normal • variants: use for lighting normal, ‘embossing’, EMBM, visibility & self-shadowing(Nelson Max, 1999)., etc.
Bump Mapping • Texels displace Surface Normals • Many clever, simpler (cheaper) variants... Image Credit: NVidia Corp: GeForce 3 Demo
Bump Mapping (Blinn 1978) • Works well everywhere except silhouettes • No self-shadowing (but see Nelson Max99) • Complex hardware req’d forced many early approximations (Embossing, EMBM, etc.) Displacement Maps: ‘True’ geometry mods • Requires micropoly shaders(Renderman) • VERY powerful high-end modeling tool (lighbulb filament and screw base)
Displacement Maps, Shading Languages • Famous early Pixar resultREYESRenderman • photo-based environment map • dicing,micropolygons • shader language • displacement maps • Stochasticantialiasing (with motion blur) Mental Ray displacement shader 1998
Environment Maps How can I use texture maps for shiny things that move in real time? Answer: make a texture map for the the incoming light, not the surface itself
Environment Maps • ‘World-in-a-box’: texel == light src. at infinity • Fast, simple, looks good on flying chrome logos • Complex lighting environments in real time... • Limits: bad on flat surfaces, no interreflections, no self-shadowing
Environment Map A ‘Box’ of images • Can use Photos or ray-tracing • all 6 images use the same Center-of-Projection point • one texel == light from one direction
Environment Maps Result: • Curved surfaces are best • Flat surfaces:same normalsame color
OpenGL: Spherical Environ. Maps • More Efficient than cube maps • texture map == image of perfect sphere reflectorseen from infinity (orthographic)
OpenGL: Spherical Environ. Maps • Example “Mirror Ball”-like image Env. Mapped result
Light Maps • ‘Multi-texturing’ idea: arbitrary texel-by-texel shading calc’d from multiple texture maps ReflectanceTexture Light Map (Illumination Texture) = Display texture
Light Maps • ‘Multi-texturing’ idea: pre-render special lighting effects ReflectanceTexture Light Map (Illumination Texture) = Display texture
Advanced Topics • Continuum: ‘geometry’ vs ‘texture, material’ • microstructure of surface, self-shadowing, etc determines surface appearance • “Surface” is scale-defined: carpet?yarn?fiber? • Surface Mappings for volumes: • Lengyel 2000: approximating fur, hair,... • BTF synthesis, volumetric textures • Generalized Surface Mapping • Hypertextures, turbulence functions(Perlin85+) • Texture Synthesis on Surfaces (Turk2001,...)
Turk: Diffusion, Texture Synthesis • Diffuse outwards from seed vectors to build a smooth (u,v) map • Works on any shape (any topology) Greg Turk, Ga Tech
Lengyel: Texture-based Fur, Hair • Semi-transparent layers of hair images • ‘Fins’ for silhouette hairs • Real-Time Display, movement Jed Lengyel, MS Research SIGGRAPH2000
Merging with Other Areas • Image-Based Modeling and Rendering • Real-time Visibility (billboards—see book) • Texture Synthesis • Procedural Modeling Even the image/geometry line is blurring: • if we put a vertex at each texel, is it still a texture map? • if an image holds positions of a mesh?