#16: Computer Cinematography: The Toy Story Lighting ModelFilm CinematographyReal-World Film LightingReal-World Film Lighting TrickeryComputer Graphics TrickeryLighting ModelBasic setupOne key lightSelectionShapeGeneralized cone/pyramid2D SuperellipseAside: 3D SuperellipsoidReturning to lighting…Shape: Rounded RectangleShape: Sheared Barn DoorSoft EdgesShape: Hard EdgeShape: Soft EdgesStep TransitionsLinear Step“SmoothStep”Shape: CutoffShape: CutonShadowingBasic ShadowsShadow SelectionShadow DirectionShadow SharingFake shadowsShape TrimmingShadow SofteningTextureTexture filesCookie changing light shapeCookie breaking up lightProjecting a color slideIntensity distributionUniform IntensityBeam DistributionDistance FalloffLight Ray DirectionLight PropertiesExample 1Example 1 notesExample 2Example 2 notesExample 3Example 3 notesExample 4Example 4 notesExample 5Example 5 notesExample 6Example 6 notesFog in computer graphicsAtmospheric effectsReal-time cloudsDone#16: Computer Cinematography:The Toy Story Lighting ModelCSE167: Computer GraphicsInstructor: Ronen BarzelUCSD, Winter 20062Film CinematographyWhat makes film look different from home movie?CameraLightingNot trying for “photorealism”Lighting in cinematographyContribute to storytellingSet moodCompose imageDirect viewer’s eye3Real-World Film LightingPractical lights:lights that are visible onscreene.g. desk lamps, ceiling lamps, flashlights, fires, …rarely major contributors to illuminationMain lights and spotlights placed off-cameraTo create desired illumination effectStandard three-point lighting setup:Key light -- provides major source of illumination & shadowFill Light -- fills in dark areas & shadows made by keyBack light -- creates subtle highlights around edges•helps give sense of 3D depth•separates subject from background4Real-World Film Lighting TrickeryCheat as necessary:Suspend sheet in front of light to soften shadowsPosition opaque cards or graded filters to shape lightFocus narrow “tickler” lights to get extra highlightsHide “kicker” light under a desk to fill dark areas under character’s chinetc…5Computer Graphics TrickeryWe’re not looking for realismreal-world lighting is constrained by reality, CG isn’tThings that can’t be done in real lifelights coming out of nowherelights that act on only certain objectsdecoupling lights and shadowsetc.Real life does some things easier than standard CG:soft shadowssoft area lightsglobal illumination techniques help this6Lighting ModelSeveral independent aspectsselectionshapeshadowingtexturedropoffdirectionproperties7Basic setuponly fill lights8One key light(will talk about the beam-of-light effect later)(will talk about the beam of light effect later)9Selectiontorus unaffected by key light10ShapeRegion of space affected by lightReal-world commonly use spotlights, barn door lightsCG model:Generalized cone/pyramidSoft edgesCuton and cutoff11Generalized cone/pyramidA “superellipse” shape swept into a pyramidsuperellipse varies between circle and rectanglepyramid may be truncated or sheared122-dimensional superellipse:n=1 is ordinary ellipse or circleneed to handle 4 quadrants carefully: •avoid exponentiation of negative numbers•use 2D Superellipsexy⎡⎣⎢⎤⎦⎥=acosn(θ)bsinn(θ)⎡⎣⎢⎤⎦⎥,where 0 ≤ θ ≤ 2π and 0 ≤ n < ∞xa⎛⎝⎜⎞⎠⎟2 n+yb⎛⎝⎜⎞⎠⎟2 n= 1y = b 1−xa⎛⎝⎜⎞⎠⎟2 n⎛⎝⎜⎞⎠⎟n 2xn=−xnif x < 013Aside: 3D Superellipsoidxyz⎡⎣⎢⎢⎢⎤⎦⎥⎥⎥=acosn1(φ)cosn2(θ)bcosn1(φ)sinn2(θ)csinn1(φ)⎡⎣⎢⎢⎢⎤⎦⎥⎥⎥where 0 ≤ θ ≤ 2π and -π2≤ φ≤π2 and 0 ≤ n < ∞14Returning to lighting…A 2D superellipse swept into a pyramidpyramid may be truncated or sheared15Shape: Rounded Rectangle16Shape: Sheared Barn Door17Soft EdgesFull intensity in central pyramidNo effect (zero intensity) outside outer pyramidSmooth falloff between them18Shape: Hard Edge19Shape: Soft Edges20Step TransitionsWant to transition between two valuesE.g. in a shader, transition between two colors on surfaceE.g. inside/outside light shapeWant function to provide control value between 0 to 1:• Function step(s,a,b) for a < b• Should return 0 for s ≤ a• Should return 1 for s ≥ b• Should vary smoothly between them• Can use, e.g., to trans ition between two colors:Lerp(step(s,a,b),Color1,Color2)21Linear StepVary linearly between a and b:Simple, quickNot C1-continuous•Abrupt•Can cause Mach bandinglinearstep(s,a,b) =0, s ≤as−ab−a, a ≤s ≤b1 b≤s⎧⎨⎪⎪⎩⎪⎪s01a b22“SmoothStep”Cubic curve:Tangent is horizontal at start and end•C1-continuousSpecial-case of a Hermite Spline:•Cubic spline defined by two interpolating points and two tangentsIn RenderMan shading language librarysmoothstep(s,a,b) =0, s ≤a−2s−ab−a⎛⎝⎜⎞⎠⎟3+3s−ab−a⎛⎝⎜⎞⎠⎟2, a ≤s≤b1 b≤s⎧⎨⎪⎪⎩⎪⎪s01a b23Shape: CutoffTruncate bottom of pyramidsmooth transition zone (fairly sharp in the example)24Shape: CutonTruncate top of pyramidsmooth transition zone (gradual in the example)25ShadowingShadows & shadow placement important for cinematographyCan control shadows for artistic effectThink of shadow as “volume of darkness”illumination inhibited inside the volumeControl:Shadow selectionShadow directionShadow sharingFake shadowsShape trimmingShadow softeningTechniques can be implemented using shadowmaps & procedural shading26Basic Shadows27Shadow SelectionCube casts no shadow28Shadow Directionmove shadowmap camera away from light position to control where shadows fallsurprisingly acceptable, especially for shadows cast on distant surface29Shadow Sharinguse one light’s shadowmap for other lightsprevent other lights from washing out important shadows30Fake shadowsPlace a virtual shadow-casting superellipse in space. known as a “blocker”(Real-world, place opaque cards in front of light)31Shape TrimmingMake large blocker, place it to trim the shape of the lightCan animate blocker for effects like door opening offscreen32Shadow SofteningEffect of shadow on light doesn’t need to
View Full Document