DOC PREVIEW
UCSD CSE 167 - Shadows & Ray Tracing

This preview shows page 1-2-3-4-30-31-32-33-34-61-62-63-64 out of 64 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 64 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

#13: Shadows & Ray TracingOutline for todayWhere are we nowFancy Texture EffectsBump MappingBump mappingDisplacement MappingSlide 8Environment MappingSlide 10Slide 11Slide 12Reflection MappingSlide 14Slide 15Slide 16Other Texture EffectsMultipass renderingSlide 19ShadowsSlide 21Shadow MapSlide 23Slide 24Shadow MappingSlide 26Slide 27Slide 28Slide 29Slide 30Shadow Mapping NotesSlide 32Ray TracingClassic Ray TracingSlide 35What’s a Ray?First step: Ray CastingIntersection TestingRay IntersectionsRay IntersectionLightingShadow RaysSlide 43Reflection RaysReflectionsSlide 46RefractionComputing Refraction DirectionReflection and RefractionCombining Reflection and RefractionTotal Internal ReflectionRay treeSlide 53Ray-Object IntersectionRay-Sphere IntersectionSlide 56Slide 57Ray intersection notesRay-Plane IntersectionRay-Triangle IntersectionBarycentric CoordinatesSlide 62Ray-Patch IntersectionDone#13: Shadows & Ray TracingCSE167: Computer GraphicsInstructor: Ronen BarzelUCSD, Winter 20062Outline for todayFancy Texture EffectsShadow MappingRay Tracing3Where are we nowTexture mappingAssign texture coordinates to vertices•based on surface parameters•based on projection in object or world spaceInterpolate texture coordinates to pixels•look up color in texture file•to avoid magnification problems, use bilinear or bicubic filtering•to avoid minification problems, use mipmaps•precomputed hierarchy of scaled-down versions of the texture image•based on amount of minification, choose two nearest mipmaps•look up color in each, interpolate between them (trilinear interpolation)Procedural texturescompute patterns in procedural shader routineschoose details based on screen-space size of surface areaused especially for wood, marble, cloth, …4Fancy Texture EffectsWe can look up data at each pixel… What can we do with it?Given procedural shaders, can do most anything we want!Here are some common techniquesOften supported by renderer without procedural shadingSome supported directly by hardware5Bump MappingAn easy way to make a smooth surface bumpyUse a texture to represent the variation in surface heightWith Phong interpolation we have a normal for each pixelUse the texture value to perturb the normalThen use the perturbed normal for the per-pixel lightingTexture can be stored or proceduralUsed for rough surfacesUsed for “embossing”Modern hardware supports bump mappingLimitation: bumps are fake silhouette edges betray smoothness6Bump mappingQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.7Displacement MappingLike bump mappingbut instead of faking by perturbing normals……actually move the surface pointGives proper silhouettes,Gives self-occlusionGives self-shadowing (once we have shadows…)Expensive and hard to do wellSupported by some software renderersSupported by some recent hardware8Displacement MappingQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.9Environment MappingA simple but technique to fake mirror-like reflections of an environmentPrecompute, photograph, or paint an environment map:A view of the distant environment (ground, sky, horizon, etc.) from the center of the sceneCan be stored in a single spherically-projected textureCan be stored in 6 faces of a cubeImagine that the scene is enclosed in a huge sphere or cube, textured with that mapFor each vertex or point to be shaded:compute the vector e from the point to the eyecompute the reflection vector Rfind out where R intersects the environment cube/sphere, and use that texture coordinate•(because the environment is huge, we don’t need to take into acount the position of the point)add the texture color to the point’s color, with some constant ke10Environment Mappingen r For a spherical environment with polar mapping:R =2re⋅rn( )rn−res =atan2 Rz,Rx( )+π2πt =asin Ry( )+π2π11Environment MappingQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.12Environment MappingQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.(www.sparse.org)13Reflection MappingEnvironment mapping often called Reflection MappingGenerally, environment maps:only reflect distant environment, not nearby objectsare static: don’t incorporate things that animateBut you can get animated local reflections…If you’re willing to take two steps14Reflection MappingFor Woody reflected in Buzz’s helmet…QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.15Reflection MappingFirst, render just Woody, using camera at Buzz’s headQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.16Reflection MappingQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.In main render, Buzz’s helmet procedural shader computes reflectionIf reflection hitsWoody texture mapuse its color, otherwiseuse the regular environment mapTwo renders to generate each frame!In practice, many renders to render each frame17Other Texture EffectsTextures can be used to map most any property onto a surfaceNot just colorBump or displacementDiffuse coefficient? Specular Coefficient?“combing” directions for anisotropic reflectivityParameters to procedural patternsMany texture maps can be used at onceDifferent layers of effecte.g. Base color, then smudges, scratches, dents, rust, etc.•each might affect color, bumps, displacment, lighting, reflectivity, …Hardware


View Full Document

UCSD CSE 167 - Shadows & Ray Tracing

Documents in this Course
Lighting

Lighting

38 pages

Review

Review

59 pages

Surfaces

Surfaces

22 pages

Review

Review

110 pages

Midterm

Midterm

4 pages

Lighting

Lighting

38 pages

Lighting

Lighting

71 pages

Review

Review

110 pages

Lighting

Lighting

71 pages

Load more
Download Shadows & Ray Tracing
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Shadows & Ray Tracing and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Shadows & Ray Tracing 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?