仿真动画创建 FlexSim仿真主打的是三维系统仿真,那么就会涉及到三维的动画效果,这样才会给我们展示的人员更加直观化的感受。所以我们今天主要介绍如何控制临时实体的动作动画。 FlexSimsimulationmainlyfocusesonthreedimensionalsystemsimulation,sothreedimensionalanimationeffectswillbeinvolved,soastogiveusamoreintuitiveexperience。Sotodaywemainlyintroducehowtocontrolthemotionanimationoftemporaryentities。 创建动画主要分为两种方式,动画创建器和运动学。首先我们先了解如何使用动画创建器,动画创建器工具需要通过,任意拖出一实体,右击从编辑下拉菜单中选择动画选项,这样就会打开实体动画创建器的窗口。 Therearetwomainwaystocreateanimation,animationcreatorandkinematics。Firstofall,wefirstunderstandhowtousetheanimationcreator,theanimationcreatortoolneedstobepassed,anyentitycanbedraggedout,rightclickandselecttheanimationoptionfromtheeditdropdownmenu,whichwillopenthewindowoftheentityanimationcreator。 最左侧便是动画创建器的实体库,它有自带的基本实体库,我们也可以选择原有实体库添加至动画实体库,中间主要的部分是动画的预览窗口,可以看见预览效果,由实体的三视图和三维动画编辑环境组成,也可通过小图标将任意视角放大进行观察和编辑,那么中间下半部分就是动画的主建列表以及时间轴,是动画编辑的必要部分。 Onthefarleftistheentitylibraryoftheanimationcreator。Ithasitsownbasicentitylibrary。Wecanalsochoosetheoriginalentitylibrarytoaddtotheanimationentitylibrary。Themainpartinthemiddleistheanimationpreviewwindow,whereyoucanseetheprevieweffect。Itconsistsofthreeviewsoftheentityandathreedimensionalanimationeditingenvironment。Itcanalsobeobservedandeditedbyzoominginanyangleofviewthroughsmallicons。Thenthelowerpartofthemiddleisthemainanimationlistandtimeline,whichisanecessarypartofanimationediting。 那么我们通过叉车来介绍一下相关部分,因为叉车是有执行动作的,因此会在主建列表上出现对应的相关部分,并显示各组分运动时间。 Thenweintroducetherelevantpartsthroughtheforklift,becausetheforkliftisexecuted,sothecorrespondingrelevantpartswillappearonthemainbuildinglist,andthemovementtimeofeachcomponentwillbedisplayed。 那么我们先运行观看一下叉车自带的动画过程。 Soletsrunandwatchtheanimationprocessthatcomeswiththeforkliftfirst。 动画创建器可以为临时实体,任务执行器,固定实体创建动画。今天我们就先了解关于临时实体的动画创建。首先我们需要了解几个关键词,部件,关键帧以及补间动画,部件也就是实体的各个组成部分,关键帧就是记录部件在某一时刻的属性,比如叉车的时间轴上就有两个关键帧,在两个关键帧播放就会形成动画,显示实体属性比如位置坐标,旋转坐标,尺寸大小,颜色以及外部的形态等等。正是由于关键帧之间的属性存在差别,那么在两个不同的关键帧之间形成的动画就叫做补间动画。 Theanimationcreatorcancreateanimationsfortemporaryentities,taskexecutors,andfixedentities。Todaywewillfirstunderstandtheanimationcreationoftemporaryentities。Firstofall,weneedtounderstandafewkeywords,parts,keyframesandtweenanimations。Partsarethevariouscomponentsoftheentity。Keyframesaretorecordtheattributesofthepartatacertainmoment。Forexample,therearetwokeysonthetimelineofaforklift。Frame,playingintwokeyframeswillformananimation,showingentityattributessuchaspositioncoordinates,rotationcoordinates,size,color,andexternalshape,etc。Itispreciselybecauseofthedifferenceinattributesbetweenkeyframesthattheanimationformedbetweentwodifferentkeyframesiscalledatweenanimation。 接下来为大家介绍一下补间动画,首先为实体添加部件,有两种方式,可以直接从实体库拉出来,也可以通过下方的添加键添加一默认部件,可以重新设置默认部件的颜色等等属性。 Next,Iwillintroduceyoutothetweenanimation。First,addpartstotheentity。Therearetwoways。Youcanpullitoutdirectlyfromtheentitylibrary,oryoucanaddadefaultpartthroughtheaddbuttonbelow,andyoucanresetthecolorofthedefaultpart,etc。Attributes。 那么Animation部分便是添加动画的窗格,按一次加号就会添加一个动画,也可以选择动画类型。 ThentheAnimationpartisthepaneforaddinganimation。Presstheplussignoncetoaddananimation。Youcanalsoselecttheanimationtype。 添加动画,首先需要添加一个空白的动画,然后添加部件。比如我们要模拟部件从处理器上边经过,我们首先就需要将部件放置处理器始端,这时便是一个关键的时间节点,我们应该记录一个关键帧,我们需要单击关键帧按钮,出现一个关键帧。 Toaddanimation,youfirstneedtoaddablankanimation,andthenaddparts。Forexample,ifwewanttosimulateacomponentpassingbytheprocessor,wefirstneedtoplacethecomponentatthebeginningoftheprocessor。Thisisakeytimenode。Weshouldrecordakeyframe。Weneedtoclickthekeyframebuttonandakeyappears。frame。 假如我们设定运行一次需要5秒时间,我们就在时间抽上找到第五秒,将部件放置处理器末端,添加另一个关键帧。那么此时我们将我们的动画归位播放的时候便会完成我们的所需简单动画 Ifwesetaruntimeof5seconds,wefindthefifthsecondinthetimedraw,placethepartattheendoftheprocessor,andaddanotherkeyframe。Thenwhenwereturnouranimationtoplay,wewillcompletethesimpleanimationweneed。 这个动画主要是针对部件的位置属性,关于其他属性我们只需要单击部件前面的小三角形,就会出现许多其他的属性内容,我们可以看见默认是没有颜色关键帧的,所以我们可以自主添加关键帧,这时就需要用到旁边的这个小按钮,进行添加 Thisanimationismainlyforthepositionattributeofthepart。Forotherattributes,weonlyneedtoclickthesmalltriangleinfrontofthepart,andmanyotherattributecontentswillappear。Wecanseethatthereisnocolorkeyframebydefault,sowecanaddthekeyindependently。Frame,thenyouneedtousethesmallbuttonnexttoittoadd 首先在第一个关键帧将颜色设置为白色,然后将部件放置尾部,将颜色设置为红色,添加第二个关键帧。此时我们在归位播放,就会发现在播放过程中部件由白色变成了红色。 Firstsetthecolortowhiteinthefirstkeyframe,thenplacethepartattheend,setthecolortored,andaddthesecondkeyframe。Atthistime,weareplayinginthehomeposition,andwewillfindthatthepartchangesfromwhitetoredduringtheplayback。 其他任何属性都可以进行相关关键帧的设置,实现相关变化,我就不多过于介绍了,希望今天的讲解对于大家是有用的。 Anyotherpropertiescanbesetforrelatedkeyframestoachieverelatedchanges。Iwillnotintroducethemtoomuch。Ihopethattodaysexplanationwillbeusefultoeveryone。 参考资料:腾讯课堂 英文翻译;Google翻译 本文由LearningYard学苑原创,若有侵权请联系删除。