Papervisi o n+3DOctober+23,+2008Luis+HierroStuart+MentenRansom+ChristoffersonSwamy+AnanthanarayanPapervisi o n+3D• Develo ped+to+ena ble+3D+grap hics+with+ Flash• Uses+AcHon Script+ a s + t he+language• Develo ped+by+a+core+team+an d+released+ t opubli c + i n+2007,+has+s i nce+become + open+sou r c e• Report / presentaHo n+is+based+ on+1.5+bu t + 2 . 0 + i sin+pu blic+betaAbiliH es• Papervi s i on+all ows+you+to+make+3D+objects,and+m a nipulate+them.• Works+ by+making+a + s c e ne,+having+a + c a meraobject + a nd+then+adding+any+ other+neededobject s + t o+the+scene .• Demo+ t e a s eDemoFlash+& + P a p ervi s i o n• Papervi s i on+tak e s + c a r e + of+all+calcu l a Hons+andkeeps+t r a c k + of+all+obje c t s + i n+the+scene• Flash+ presents+Paper v i s on’s+obje c t s + a ndcalcula Hons• Flash+ handles+an y + I / OFlashDispObjContainer3DDispObj3DMaterialsCameraSceneMeshShapesDispla yO b j ec t 3 D• Directl y + below+flash+in+our+Hierarchy+i s + t heDispla y ObjectCon t a i ner3D+(abst r a c t + c l a s s )– Is+the+base+class+for+anything+that+can+contain+3Dobjects+(scenes,+shapes,+etc...)• Its+chi l dren+are+di s playObject3 D+andsceneO bject3D+wh i c h+are+the+b a s e + f or+theobject s + needed+to+ c r e a t e + a +“ movie”Displa yO b j ec t 3 D +S ervi c es• A+disp l a y ObjectCon t a i ner3D+is+a+c ontainerclass+for+displayobject3Ds– Think+of+the+space+where+all+the+3D+objects+“live”(this+includes+the+camera+and+any+shapes+youmight+want)– Anything+and+everything+that+you+see+in+aPapervision+movie+is+a+displayobject3DFlashDispObjContainer3DDispObj3DMaterialsCameraSceneMeshShapesMateria l s• Materia l s + c ollects+data + a bout+how + objectsappear + when+rend e r e d.• Materia l s + g e t + a s s i g ned+to+enHre+objects + orfaces+o f + a n+object.• The+m a t e r i a l s + package+pro v i des+different+waysto+crea t e + a nd+manage+ materials• Ex.+Bit map,+color,+ movie,+etc.FlashDispObjContainer3DDispObj3DMaterialsCameraSceneMeshShapesScenes• A+scene+is+the+place+where+objects+are+placed,+itcontains+the+3D+environment.• MovieScene3D+lets+you+create+a+scene+where+eachobject+is+rendered+in+its+own+container.• +Scene3D+lets+you+create+a+scene+where+all+objectsare+rendered+in+the+same+container.– Contains+mulHple+display+objects+(shapes)Cameras+( p a s s ed +i n t o +s c en e)• A+camera+defines+the+view+from+which+a+scene+willbe+rendered.+Different+camera+se_ngs+wouldpresent+a+scene+from+different+points+of+view.• The+Camera3D+class+creates+a+camera+that+views+thearea+around+a+target+object.• The+FreeCamera3D+class+creates+a+camera+that+viewsthe+area+in+the+direcHon+the+camera+is+aimed.FlashDispObjContainer3DDispObj3DMaterialsCameraSceneMeshShapesMesh3DServices+Ex p o rt ed +b y+Mesh3D• Project + t he+object+f r om+3D+to+2 D• Move+t he+object+i n+space• Add/re move+objec t s + c omposing+ t he+3D+shape• Render + t he+object+onto+a+sceneFlashDispObjContainer3DDispObj3DMaterialsCameraSceneMeshShapesShapes• All+sha pes+inherit + f r om+Mesh3D• The+shape+classes + a l l ow+you+to + e a s i l yconstr uct+commo n+objects• Cylinder• Cone• Cube• Plane• Sphere• Paper+Plane• Collada• AseShapes• The+shape+const r uctors+allo w+you+to+ definesegmen t a HonRenderingGe_ng+ Papervisi o n+to+Work• #inclu de+papervision+so urce+code• Create+ a + Scene• Create+ a + Camera• Create+ s hapes+&+ad d+them+as+c hildren+to+theScene• On+eve r y + f r a me,+call+scen e 's + 'r e nder'+methodand+p a s s + i t + t he+Camera+objectDemoCriHque• Kick+ass + documenta Hon• Excelle nt+use+of+i nheritance+ a ndpolym orphism• Easier+ t o+use+than + OpenGL• Has+th e + a dvantages+and+disadva ntages+ofFlash• Easy+to+create/exte nd+frameworkWhy+use+Papervi s i o n?• Open+ s ource+with + a + l a r g e + c ommunity• Well+m a i ntained•
View Full Document