DOC PREVIEW
MIT 6 837 - Shadows

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:

MIT EECS 6.837, Teller and Durand1ShadowsMIT EECS 6.837, Teller and Durand2ShadowsMIT EECS 6.837Frédo Durand and Seth TellerMIT EECS 6.837, Teller and Durand3Final projects• Presentations next week• Tentative schedule (web form soon)– Wednesday 10-12 and 2-4– Thursday 10-12 and 1-2– Friday 10-12 and 2-4• 20 minutes presentation + 5 minutes Q&A• Final report due on Friday Dec 6MIT EECS 6.837, Teller and Durand4• Today: Shadows• Tuesday Dec 3:Graphics hardware• Thursday Dec. 5: Image-based modeling & renderingSpecial topicsMIT EECS 6.837, Teller and Durand5Shadows• Realism• Depth cueMIT EECS 6.837, Teller and Durand6Shadows as depth cueMIT EECS 6.837, Teller and Durand7Shadows and art• Only in Western pictures (here Caravaggio)MIT EECS 6.837, Teller and Durand8Shadows and art• Only in Western pictures• Crazy geometrical constructionsMIT EECS 6.837, Teller and Durand9Shadows and art• Shadows as the origin of paintingMIT EECS 6.837, Teller and Durand10Duality shadow-view• A point is lit if it is visible from the light source• Shadow computation very similar to view computationMIT EECS 6.837, Teller and Durand11Shadow ray• Ray from visible point to light source• If blocked, discard light contribution• One shadow ray per light• Optimization?– Stop after first intersection(don’t worry about tmin)– Test latest obstacle firstMIT EECS 6.837, Teller and Durand12Ray-casting shadowsMIT EECS 6.837, Teller and Durand13Overview• Shadow map– Image-precision, texture mapping• Shadow volume– Object space• Soft shadows and Monte-Carlo ray tracingMIT EECS 6.837, Teller and Durand14Questions?MIT EECS 6.837, Teller and Durand15Fake shadows using textures• Separate obstacle and receiver• Compute b/w image of obstacle from light• Use projective texturesImage from light source BW image of obstacle Final imageFigure from Moller & haines “Real Time Rendering”MIT EECS 6.837, Teller and Durand16Fake shadows using textures• Limitations?Image from light source BW image of obstacle Final imageFigure from Moller & haines “Real Time Rendering”MIT EECS 6.837, Teller and Durand17Shadow maps• Use texture mapping but using depth• 2 passes (at least)– Compute shadow map from light source• Store depth buffer(shadow map)– Compute final image• Look up the shadow map to know if points are in shadow Figure from Foley et al. “Computer Graphics Principles and Practice”MIT EECS 6.837, Teller and Durand18Shadow map look up• We have a 3D point x,y,z• How do we look up the shadow map?Figure from Foley et al. “Computer Graphics Principles and Practice”(x,y,z)MIT EECS 6.837, Teller and Durand19Shadow map look up• We have a 3D point x,y,z• How do we look up the shadow map?• Use the 4x4 camera matrix from the light source• We get (x’,y’,z’)• Test: ShadowMap(x’,y’)<z’Figure from Foley et al. “Computer Graphics Principles and Practice”(x,y,z)(x’,y’,z’)MIT EECS 6.837, Teller and Durand20Shadow maps• In Renderman– (High-end production software)MIT EECS 6.837, Teller and Durand21Shadow maps• Can be done in hardware• Using hardware texture mapping– Texture coordinates u,v,w generated using 4x4 matrix– Modern hardware permits tests on texture valuesMIT EECS 6.837, Teller and Durand22Problems with shadow maps?• Field of view•Bias• AliasingMIT EECS 6.837, Teller and Durand23Field of view problem• What if point to shadow is outside field of view of shadow map?• Use cubical shadow map• Use only spot lights!MIT EECS 6.837, Teller and Durand24The bias nightmare• For a point visible from the light sourceShadowMap(x’,y’)≈z’• Avoid erroneous self shadowing• Remember the ray-tracing shadows in assignment 6MIT EECS 6.837, Teller and Durand25The bias nightmare• Remember shadow ray casting– We started the ray at hit+light*epsilon– We added bias to avoid degeneracy– Yet another instance of geometric robustnesshithit+epsilon*lightMIT EECS 6.837, Teller and Durand26Bias for shadow mapsShadowMap(x’,y’)+bias < z’Choosing the good bias value can be very trickyCorrect image Not enough bias Too much bias biasMIT EECS 6.837, Teller and Durand27Shadow map aliasing• Undersampling of shadow map• Reprojection aliasingMIT EECS 6.837, Teller and Durand28Shadow map filtering• Does not work!• Filtering depth is not meaningfullMIT EECS 6.837, Teller and Durand29Percentage closer filtering• Filter the result of the test• But makes the bias issue more trickyMIT EECS 6.837, Teller and Durand30Percentage closer filtering• 5x5 samples• Nice antialiased shadow• Using a bigger filter produces fake soft shadows• But makes the bias issue more trickyMIT EECS 6.837, Teller and Durand31Shadows in production•Often use shadow maps• Ray casting as fallback in case of robustness issuesMIT EECS 6.837, Teller and Durand32Questions?MIT EECS 6.837, Teller and Durand33Overview• Shadow map– Image-precision, texture mapping• Shadow volume– Object space• Soft shadows and Monte-Carlo ray tracingMIT EECS 6.837, Teller and Durand34Shadow volumes• Explicitly represent the volume of space in shadow• For each polygon– Pyramid with point light as apex– Include polygon to cap• Shadow test similar to clippingMIT EECS 6.837, Teller and Durand35Shadow volumes naïve rendering • Pick your favorite rendering algorithm• For each visible point– For each light• For each shadow volume– If point inside volume » Point is in shadowGreat but costly(#poly * #light tests for each visible point)MIT EECS 6.837, Teller and Durand36Shadow volumes smarter rendering • New way to define inside/outside• Consider ray from eye to visible point• Increment or decrement a counter each time we intersect a shadow volume polygon• Points lit: counter =0+1-1MIT EECS 6.837, Teller and Durand37Hardware shadow volumes • Add counter buffer• Draw scene with no shading• Turn off buffer update• Draw frontfacing shadow polygons– If z-pass– Increment counter• Draw backfacingshadow polygons– If z-pass– Decrement counter• Compute shading– Lit Points have counter=0+1+1-1MIT EECS 6.837, Teller and Durand38Optimizing shadow volumes• Use silhouette edges onlyLAMIT EECS 6.837, Teller and Durand39Problem if eye inside shadow• Then a counter of 0 does not necessarily mean lit• Three solutions– Explicitly test eye point wrt all volumes– Clip the shadow volumes and include


View Full Document

MIT 6 837 - Shadows

Documents in this Course
Animation

Animation

37 pages

Radiosity

Radiosity

25 pages

Color

Color

86 pages

InterArch

InterArch

14 pages

Color

Color

15 pages

Animation

Animation

61 pages

Luxo Jr

Luxo Jr

14 pages

Animation

Animation

52 pages

Radiosity

Radiosity

37 pages

Load more
Download Shadows
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 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 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?