CS380: Introduction to Computer Graphics Geometric Modeling...
Transcript of CS380: Introduction to Computer Graphics Geometric Modeling...
18/06/11
1
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
CS380:IntroductiontoComputerGraphicsGeometricModeling
Chapter23
MinH.KimKAISTSchoolofComputing
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
SUMMARYLightTransport
2
18/06/11
2
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Radiantflux• Abunchofphotonsflyingthroughspaceinadirection.
• Wehaveasensor(W,X)outinspace– Wisawedgeofdirections– PassthroughthesurfaceX
• Eachphotoncarriesenergyinunitsofjoules
• Radiantflux:energymeasuredinseconds,measuredinwatts:
3
Φ(W ,X)
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Irradiance• Measuredradiantfluxbytheareaofthesensor(measuredinsquaremeters)
• SmallerandsmallerXaroundasinglepoint(undercontinuityassumptionsabout)àirradiance
• NoteEatadifferentnormalisdifferent
4
E(W ,X) := Φ(W ,X)X
xΦ
En (W , x)
′n
En (W , x) ≠ E′n (W , x)
18/06/11
3
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Radiance• In,shrinkWdowntoasinglevector,dividingoutby|W|,thesolidanglemeasureofW(unit:steradians)àradiance
5
En (W , x)
Ln (W , x) =
En (W , x)W
(thewedgeofalldirectioncovers4πsteradians)
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Pathtracing• Addingonemorebounce• Geometricpathoflighttransport:• Notasanestedintegralovertwohemispheres,butasanintegraloveranappropriatespaceofpathsàPathtracing
6
Le( x, v)+ L1( x, v)+ L2 ( x, v)
( x, ′x , ′′x )
light
18/06/11
4
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Renderingequation• ReflectionequationinshorthandwhereBisthebounceoperatoroflight.
• Recursivelighttransportis• Wecansay
• Therenderingequation(integralequation)is
7
L1 = BLe
Li+1 = BLi
Lt =Le +L1+L2+L3+ ... =Le +B(Le +L1+L2+L3+ ...) =Le +BLt
Lt( !x , "v)=Le( !x , "v)+ f !x ,"n(
"w , "v)Lt( "w , !x)cos(θ )dwH∫
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
ANIMATIONChapter23
8
18/06/11
5
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Skinning• Startwithcomplicatedmeshwewanttoanimate• Rigging:designageometrichierarchicalskeletalstructure
• Associateeachvertexwithone“bone”(RBTnode)
• Idea:expressthevertexinitsboneframe
• Manipulatetheskeleton• Verticesnowmovealongwiththebones
9
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Details• Insteadofactuallychangingthevertexcoordinates,• Arestaccumulatedmatrixrepresentstherelationshipbetweentheobjectandrestboneframe.
• Anewaccumulatedmatrixrepresentstherelationafterthebonehasbeenmoved.
• Usethesematrices,inthevertexshadertomovethevertex.
10
18/06/11
6
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Details• Inthiscontext,wecanassociateavectorofbone-weightsanddosoftskinning.– Weusetheweightstoblendtheupdates.
• Thisisusedextensivelyingamesandwouldmakeaniceproject
11
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Skinning(rigging)example
12
AlekaMcAdams,YongningZhu,AndrewSelle,MarkEmpey,RasmusTamstorf,JosephTeran,andEftychiosSifakis.2011.Efficientelasticityforcharacterskinningwithcontactandcollisions.InACMSIGGRAPH2011papers(SIGGRAPH'11),HuguesHoppe(Ed.).ACM,NewYork,NY,USA,,Article37,12pages.
18/06/11
7
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Physicalsimulation• Physicsusesequationstodescribephysicalprocesses.
• Wecantrytosimulatetheseprocessescomputationally.
• Techniques:physicsandcomputationalmathematics.
• Somemethodsareslowandonlyworkforofflineanimation.
• Somemethodscanbemadereal-time• Hardtocontroltheoutput
13
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Particlesimulationsystems• Simplestversionofphysics.• Alargebunchofnon-interactingparticles.• Ordinarydifferentialequation(ODE)forthetimeevaluationofapoint:
• Forcefmightbegravityorwind• Canmodelflowingfallofwaterparticles,orastreamofsmokeparticlesintheair
• Typicallyeachparticleisrenderedasasemitransparentlittlebloborsurface
14
f =ma=m !v =m!!x p=mv
18/06/11
8
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
ODEintegration• Startingfromaninitialcondition,wecandiscretizethisODEandmarchforwardintimeusingso-calledEulersteps:
• Stepsmustbesmall(oftenneedmanymorethan30/sec).
• ThereisawholeliteratureofmoresophisticatedwaystosolveanODE.
15
xt+h = xt + vthvt+h = vt + athat+h = f (xt+h ,t + h) /m
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Particlesimulationexample
16
TobiasPfaff,NilsThuerey,JonathanCohen,SarahTariq,andMarkusGross.2010.Scalablefluidsimulationusinganisotropicturbulenceparticles.InACMSIGGRAPHAsia2010papers(SIGGRAPHASIA'10).ACM,NewYork,NY,USA,,Article174,8pages.
18/06/11
9
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
RigidBodies• Upgradefromparticlestosolidhardfiniteobjects(dicerollingonatable)
• Needtodealwithrotationalissues• Withtodealwithinteraction:collisiondetection– Boundinghierarchies– Mustundointerpenetration– Musthavetheobjectbounce(thisrequireshackedphysicssincerealobjectsslightlydeformandundeform
• Mustdealwithobjectsrestingonobjectsandnotendlesslybouncing
17
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Cloth• Canbemodeledasagridofparticlesconnectedbysprings
• Canbemodeledasmeshofphysicaltriangularelements
• Needforcestoavoidstretchingandshearingandoscillation
18
18/06/11
10
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Cloth
19
ZhiliChen,RenguoFeng,andHuaminWang.2013.Modelingfrictionandaireffectsbetweenclothanddeformablebodies.ACMTrans.Graph.32,4,Article88(July2013),8pages.
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Hair• Hairmodelingisalsooftensimilarlydealtwithasamass-springmodel
20
AlekaMcAdams,AndrewSelle,KellyWard,EftychiosSifakis,andJosephTeran.2009.Detailpreservingcontinuumsimulationofstraighthair.InACMSIGGRAPH2009papers(SIGGRAPH'09),HuguesHoppe(Ed.).ACM,NewYork,NY,USA,,Article62,6pages.
18/06/11
11
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Deformablematerials• Realobjectsaredeformable• Canbemodeledasvolumetricobjects(meshof3Dtetrahedra)
21
ChrisWojtan,NilsThürey,MarkusGross,andGregTurk.2009.Deformingmeshesthatsplitandmerge.InACMSIGGRAPH2009papers(SIGGRAPH'09),HuguesHoppe(Ed.).ACM,NewYork,NY,USA,,Article76,10pages.
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Fireandwater• Specialphysicalequations• Modeledwithcombinationofequations
22
JeffreyN.ChadwickandDougL.James.2011.Animatingfirewithsound.InACMSIGGRAPH2011papers(SIGGRAPH'11),HuguesHoppe(Ed.).ACM,NewYork,NY,USA,,Article84,8pages.
18/06/11
12
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Humanlocomotion• Notpassiveobjects• Muchharderthanpreviouslydiscussedphenomenon
• Ideasareusedfromrobotics,control,andoptimization
• Nowadaysmotioncapturedataisreliedonheavily,andpossiblyalteredorusedaspartoftherocketscience.
23
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Humanlocomotion
24
JackM.Wang,DavidJ.Fleet,andAaronHertzmann.2010.Optimizingwalkingcontrollersforuncertaininputsandenvironments.InACMSIGGRAPH2010papers(SIGGRAPH'10),HuguesHoppe(Ed.).ACM,NewYork,NY,USA,,Article73,8pages.
18/06/11
13
MinH.Kim(KAIST) Foundationsof3DComputerGraphics,S.Gortler,MITPress,2012
Announcements• FinalExam:– Roughlyspeaking,afterthemid-termexam
• Thanksforthissemester!
25