Unity3DAnimation外文文献.docx

上传人:b****6 文档编号:7105398 上传时间:2023-01-17 格式:DOCX 页数:18 大小:516.38KB
下载 相关 举报
Unity3DAnimation外文文献.docx_第1页
第1页 / 共18页
Unity3DAnimation外文文献.docx_第2页
第2页 / 共18页
Unity3DAnimation外文文献.docx_第3页
第3页 / 共18页
Unity3DAnimation外文文献.docx_第4页
第4页 / 共18页
Unity3DAnimation外文文献.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

Unity3DAnimation外文文献.docx

《Unity3DAnimation外文文献.docx》由会员分享,可在线阅读,更多相关《Unity3DAnimation外文文献.docx(18页珍藏版)》请在冰豆网上搜索。

Unity3DAnimation外文文献.docx

Unity3DAnimation外文文献外文文献Untiy3DAnimationUnitysAnimationfeaturesincludeRetargetableanimations,Fullcontrolofanimationweightsatruntime,Eventcallingfromwithintheanimationplayback,SophisticatedStateMachinehierarchiesandtransitions,Blendshapesforfacialanimations,andmore.Readthissectiontofindouthowtoimportandworkwithimportedanimationandhowtoanimateobjects,colours,andanyotherparameterswithinUnityitself.AnimationSystemOverviewUnityhasarichandsophisticatedanimationsystem(sometimesreferredtoasMecanim).Itprovides:

EasyworkflowandsetupofanimationsforallelementsofUnityincludingobjects,characters,andproperties.SupportforimportedanimationclipsandanimationcreatedwithinUnityHumanoidanimationretargeting-theabilitytoapplyanimationsfromonecharactermodelontoanother.Simplifiedworkflowforaligninganimationclips.Convenientpreviewofanimationclips,transitionsandinteractionsbetweenthem.Thisallowsanimatorstoworkmoreindependentlyofprogrammers,prototypeandpreviewtheiranimationsbeforegameplaycodeishookedin.Managementofcomplexinteractionsbetweenanimationswithavisualprogrammingtool.Animatingdifferentbodypartswithdifferentlogic.LayeringandmaskingfeaturesAnimationworkflowUnitysanimationsystemisbasedontheconceptofAnimationClips,whichcontaininformationabouthowcertainobjectsshouldchangetheirposition,rotation,orotherpropertiesovertime.Eachclipcanbethoughtofasasinglelinearrecording.Animationclipsfromexternalsourcesarecreatedbyartistsoranimatorswith3rdpartytoolssuchasMaxorMaya,orcomefrommotioncapturestudiosorothersources.AnimationClipsarethenorganisedintoastructuredflowchart-likesystemcalledanAnimatorController.TheAnimatorControlleractsasa“StateMachine”whichkeepstrackofwhichclipshouldcurrentlybeplaying,andwhentheanimationsshouldchangeorblendtogether.AverysimpleAnimatorControllermightonlycontainoneortwoclips,forexampletocontrolapowerupspinningandbouncing,ortoanimateadooropeningandclosingatthecorrecttime.AmoreadvancedAnimatorControllermightcontaindozensofhumanoidanimationsforallthemaincharactersactions,andmightblendbetweenmultipleclipsatthesametimetoprovideafluidmotionastheplayermovesaroundthescene.UnitysAnimationsystemalsohasnumerousspecialfeaturesforhandlinghumanoidcharacterswhichgiveyoutheabilitytoretargethumanoidanimationfromanysource(Eg.motioncapture,theassetstore,orsomeotherthird-partyanimationlibrary)toyourowncharactermodel,aswellasadjustingmuscledefinitions.ThesespecialfeaturesareenabledbyUnitysAvatarsystem,wherehumanoidcharactersaremappedtoacommoninternalformat.Eachofthesepieces-theAnimationClips,theAnimatorController,andtheAvatar,arebroughttogetheronaGameObjectviatheAnimatorComponent.ThiscomponenthasareferencetoanAnimatorController,and(ifrequired)theAvatarforthismodel.TheAnimatorController,inturn,containsthereferencestotheAnimationClipsituses.Theabovediagramshowsthefollowing:

AnimationclipsareimportedfromanexternalsourceorcreatedwithinUnity.Inthisexample,theyareimportedmotioncapturedhumanoidanimations.TheanimationclipsareplacedandarrangedinanAnimatorController.ThisshowsaviewofanAnimatorControllerintheAnimatorwindow.TheStates(whichmayrepresentanimationsornestedsub-statemachines)appearasnodesconnectedbylines.ThisAnimatorControllerexistsasanassetintheProjectwindow.Theriggedcharactermodel(inthiscase,theastronaut“Astrella”)hasaspecificconfigurationofboneswhicharemappedtoUnityscommonAvatarformat.ThismappingisstoredasanAvatarassetaspartoftheimportedcharactermodel,andalsoappearsintheProjectwindowasshown.Whenanimatingthecharactermodel,ithasanAnimatorcomponentattached.IntheInspectorviewshownabove,youcanseetheAnimatorComponentwhichhasboththeAnimatorControllerandtheAvatarassigned.Theanimatorusesthesetogethertoanimatethemodel.TheAvatarreferenceisonlynecessarywhenanimatingahumanoidcharacter.Forothertypesofanimation,onlyanAnimatorControllerisrequired.Unitysanimationsystem(Knownas“Mecanim”)comeswithalotofconceptsandterminology.Ifatanypoint,youneedtofindoutwhatsomethingmeans,gotoourAnimationGlossary.LegacyanimationsystemWhileMecanimisrecommendedforuseinmostsituations,UnityhasretaineditslegacyanimationsystemwhichexistedbeforeUnity4.YoumayneedtousewhenworkingwitholdercontentcreatedbeforeUnity4.ForinformationontheLegacyanimationsystem,seethissectionUnityintendstophaseouttheLegacyanimationsystemovertimeforallcasesbymergingtheworkflowsintoMecanim.AnimationClipsAnimationClipsareoneofthecoreelementstoUnitysanimationsystem.Unitysupportsimportinganimationfromexternalsources,andofferstheabilitytocreateanimationclipsfromscratchwithintheeditorusingtheAnimationwindow.AnimationfromExternalSourcesAnimationclipsimportedfromexternalsourcescouldinclude:

HumanoidanimationscapturedatamotioncapturestudioAnimationscreatedfromscratchbyanartistinanexternal3Dapplication(suchas3DSMaxorMaya)Animationsetsfrom3rd-partylibraries(eg,fromUnitysassetstore)Multipleclipscutandslicedfromasingleimportedtimeline.AnimationCreatedandEditedWithinUnityUnitysAnimationWindowalsoallowsyoutocreateandeditanimationclips.Theseclipscananimate:

Theposition,rotationandscaleofGameObjectsComponentpropertiessuchasmaterialcolour,theintensityofalight,thevolumeofasoundPropertieswithinyourownscriptsincludingfloat,int,VectorandbooleanvariablesThetimingofcallingfunctionswithinyourownscriptsAnimationfromExternalSourcesOverviewofImportedAnimationAnimationfromexternalsourcesisimportedintoUnityinthesamewayasregular3Dfiles.Thesefiles,whethertheyregenericFBXfilesornativeformatsfrom3DsoftwaresuchasMaya,Cinema4D,3DStudioMax,cancontainanimationdataintheformofalinearrecordingofthemovementsofobjectswithinthefile.Insomesituationstheobjecttobeanimated(eg,acharacter)andtheanimationstogowithitcanbepresentinthesamefile.Inothercases,theanimationsmayexistinaseparatefiletothemodeltobeanimated.Itmaybethatanimationsarespecifictoaparticularmodel,andcannotbere-usedonothermodels.Forexample,agiantoctopusend-bossinyourgamemighthaveauniquearrangementoflimbsandbones,anditsownsetofanimations.Inothersituations,itmaybethatyouhavealibraryofanimationswhicharetobeusedonvariousdifferentmodelsinyourscene.Forexample,anumberofdifferenthumanoidcharactersmightallusethesamewalkandrunanimations.Inthesesituations,itscommontohaveasimpleplaceholdermodelinyouranimationfilesforthepurposesofpreviewingthem.Alternatively,itispossibletouseanimationfileseveniftheyhavenogeometryatall,justtheanimationdata.Whenimportingmultipleanimations,theanimationscaneachexistasseparatefileswithinyourprojectfolder,oryoucanextractmultipleanimationclipsfromasingleFBXfileifexportedastakesfromMotionbuilderorwithaplugin/scriptforMaya,Maxorother3Dpackages.Youmightwanttodothisifyourfilecontainsmultipleseparateanimationsarrangedonasingletimeline.Forexample,alongmotioncapturedtimelinemightcontaintheanimationforafewdifferentjumpmotions,andyoumaywanttocutoutcertainsectionsofthistouseasindividualclipsanddiscardtherest.Unityprovidesanimationcuttingtoolstoachievethiswhenyouimportallanimationsinonetimelinebyallowingyoutoselecttheframerangeforeachclip.ImportingAnimationFilesBeforeanyanimationcanbeusedinUnity,itmustfirstbeimportedintoyourproject.UnitycanimportnativeMaya(.mbor.ma),3DStudioMax(.max)andCinema4D(.c4d)files,andalsogenericFBXfileswhichcanbeexportedfrommostanimationpackages(seethispageforfurtherdetailsonexporting).Toimportananimation,simplydragthefiletotheAssetsfolderofyourproject.WhenyouselectthefileintheProjectViewyoucanedittheImportSettingsintheinspector.WorkingwithhumanoidanimationsTheMecanimAnimationSystemisparticularlywellsuitedforworkingwithanimationsforhumanoidskeletons.Sincehumanoidskeletonsareusedextensivelyingames,Unityprovidesaspecializedworkflow,andanextendedtoolsetforhumanoidanimations.Becauseofthesimilarityinbonestructure,itispossibletomapanimationsfromonehumanoidskeletontoanother,allowingretargetingandinversekinematics.Withrareexceptions,humanoidmodelscanbeexpectedtohavethesamebasicstructure,representingthemajorarticulatepartsofthebody,headandlimbs.TheMecanimsystemmakesgooduseofthisideatosimplifytheriggingandcontrolofanimations.AfundamentalstepincreatingaanimationistosetupamappingbetweenthesimplifiedhumanoidbonestructureunderstoodbyMecanimandtheactualbonespresentintheskeleton;inMecanimterminology,thismappingiscalledanAvatar.ThepagesinthissectionexplainhowtocreateanAvatarforyourmodel.CreatingtheAvatarAfteramodelfile(FBX,COLLADA,etc.)isimported,youcanspecifywhatkindofrigitisintheRigtaboftheModelImporteroptions.HumanoidanimationsForaHumanoidrig,selectHumanoidandclickApply.MecanimwillattempttomatchupyourexistingbonestructuretotheAvatarbonestructure.Inmanycases,itcandothisautomaticallybyanalysingtheconnectionsbetweenbonesintherig.Ifthematchhassucceeded,youwillseeacheckmarknexttotheCo

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1