Unity3DAnimation外文文献

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Untiy3DAnimationUnity’sAnimationfeaturesincludeRetargetableanimations,Fullcontrolofanimationweightsatruntime,Eventcallingfromwithintheanimationplayback,SophisticatedStateMachinehierarchiesandtransitions,Blendshapesforfacialanimations,andmore.Readthissectiontofindouthowtoimportandworkwithimportedanimationandhowtoanimateobjects,colours,andanyotherparameterswithinUnityitself.AnimationSystemOverviewUnityhasarichandsophisticatedanimationsystem(sometimesreferredtoas‘Mecanim’).Itprovides:EasyworkflowandsetupofanimationsforallelementsofUnityincludingobjects,characters,andproperties.SupportforimportedanimationclipsandanimationcreatedwithinUnityHumanoidanimationretargeting-theabilitytoapplyanimationsfromonecharactermodelontoanother.Simplifiedworkflowforaligninganimationclips.Convenientpreviewofanimationclips,transitionsandinteractionsbetweenthem.Thisallowsanimatorstoworkmoreindependentlyofprogrammers,prototypeandpreviewtheiranimationsbeforegameplaycodeishookedin.Managementofcomplexinteractionsbetweenanimationswithavisualprogrammingtool.Animatingdifferentbodypartswithdifferentlogic.LayeringandmaskingfeaturesAnimationworkflowUnity’sanimationsystemisbasedontheconceptofAnimationClips,whichcontaininformationabouthowcertainobjectsshouldchangetheirposition,rotation,orotherpropertiesovertime.Eachclipcanbethoughtofasasinglelinearrecording.Animationclipsfromexternalsourcesarecreatedbyartistsoranimatorswith3rdpartytoolssuchasMaxorMaya,orcomefrommotioncapturestudiosorothersources.AnimationClipsarethenorganisedintoastructuredflowchart-likesystemcalledanAnimatorController.TheAnimatorControlleractsasa“StateMachine”whichkeepstrackofwhichclipshouldcurrentlybeplaying,andwhentheanimationsshouldchangeorblendtogether.AverysimpleAnimatorControllermightonlycontainoneortwoclips,forexampletocontrolapowerupspinningandbouncing,ortoanimateadooropeningandclosingatthecorrecttime.AmoreadvancedAnimatorControllermightcontaindozensofhumanoidanimationsforallthemaincharacter’sactions,andmightblendbetweenmultipleclipsatthesametimetoprovideafluidmotionastheplayermovesaroundthescene.Unity’sAnimationsystemalsohasnumerousspecialfeaturesforhandlinghumanoidcharacterswhichgiveyoutheabilitytoretargethumanoidanimationfromanysource(Eg.motioncapture,theassetstore,orsomeotherthird-partyanimationlibrary)toyourowncharactermodel,aswellasadjustingmuscledefinitions.ThesespecialfeaturesareenabledbyUnity’sAvatarsystem,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”)hasaspecificconfigurationofboneswhicharemappedtoUnity’scommonAvatarformat.ThismappingisstoredasanAvatarassetaspartoftheimportedcharactermodel,andalsoappearsintheProjectwindowasshown.Whenanimatingthecharactermodel,ithasanAnimatorcomponentattached.IntheInspectorviewshownabove,youcanseetheAnimatorComponentwhichhasboththeAnimatorControllerandtheAvatarassigned.Theanimatorusesthesetogethertoanimatethemodel.TheAvatarreferenceisonlynecessarywhenanimatingahumanoidcharacter.Forothertypesofanimation,onlyanAnimatorControllerisrequired.Unity’sanimationsystem(Knownas“Mecanim”)comeswithalotofconceptsandterminology.Ifatanypoint,youneedtofindoutwhatsomethingmeans,gotoourAnimationGlossary.LegacyanimationsystemWhileMecanimisrecommendedforuseinmostsituations,UnityhasretaineditslegacyanimationsystemwhichexistedbeforeUnity4.YoumayneedtousewhenworkingwitholdercontentcreatedbeforeUnity4.ForinformationontheLegacyanimationsystem,seethissectionUnityintendstophaseouttheLegacyanimationsystemovertimeforallcasesbymergingtheworkflowsintoMecanim.AnimationClipsAnimationClipsareoneofthecoreelementstoUnity’sanimationsystem.Unitysupportsimportinganimationfromexternalsources,andofferstheabilitytocreateanimationclipsfromscratchwithintheeditorusingtheAnimationwindow.AnimationfromExternalSourcesAnimationclipsimportedfromexternalsourcescouldinclude:HumanoidanimationscapturedatamotioncapturestudioAnimationscreatedfromscratchbyanartistinanexternal3Dapplication(suchas3DSMaxorMaya)Animationsetsfrom3rd-partylibraries(eg,fromUnity’sassetstore)Multipleclipscutandslicedfromasingleimportedtimeline.AnimationCreatedandEditedWithinUnityUnity’sAnimationWindowalsoallowsyoutocreateandeditanimationclips.Theseclipscananimate:Theposition,rotationandscaleofGameObjectsComponentpropertiessuchasmaterialcolour

1 / 21
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功