




已阅读5页,还剩16页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Unity game engine animationMost 3d animators tend to swear by their preferred tools of the trade. Be it 3ds Max, Maya or Blender, each package has its own group of dedicated followers. But when it comes to animating for games, an extra player is added to the mix: the game engine.大多数3 d动画师倾向于信赖首选的动画工具。3 ds Max,maya或blender,每个软件包都有自己的一群忠实的追随者。但当谈到动画游戏,一个额外的播放器被添加到混合组合:游戏引擎。Basic animation in an engine is not that different from a traditional 3d package, but like any program, it has its own quirks. So Ive tried to put together all the post-it notes that Ive gathered over time on my monitors. Id like to think of this post as a digital version of that colleague that walks up to your desk when hearing your frustrated cries and says Oh yeah. theres an easier way for that. The examples used in this post are from Jets - Papercraft Air-O-Batics, a mobile game we at Little Chicken Game Companymade in Unity3d and recently launched on behalf of KLM Royal Airlines. Hopefully with these pointers I can save you some time when you decide to animate directly in-engine!基本的动画引擎和“传统”3 d软件包并不相同,但就像任何程序,它都有自己的特性。所以我试图整理所有笔记帖,那些随着时间的推移收集在我的电脑上的。我想这篇电子版文章的同事走到你的办公桌当听到你沮丧的哭,说:“哦有一个更简单的方法。”在这篇文章中使用的例子是Jets - Papercraft Air-O-Batics,一款手机游戏,我们在小鸡肉游戏公司用Unity3d做的和最近推出了皇家荷兰航空公司的代表。我希望这些指针可以节省你一些时间,当你决定直接用引擎做动画!Why in-engine?(为什么用引擎)Speed (速度)Animating directly in the game engine can greatly improve your production speed, as you eliminate the extra step of continuously having to export from an external 3d package and importing it in the engine.直接在游戏引擎做动画可以大大提高您的生产速度,为您消除了持续地从外部3D包中导出和导入到发动机的额外步骤。WYSIWYG所见即所得It removes the risk of any translation errors where the animation you originally created gets displayed differently in the engine after importing.它消除了任何的翻译错误的风险,你最初创建的动画导入后在引擎中显示的不同。So why not always animate in the game engine? 那么,为什么不总是在游戏引擎中做动画?Because its simply not built for that. Even though the animation systems in engines are becoming increasingly more sophisticated, theyre still quite basic when compared to dedicated packages. We chose to animate (almost) everything in the game engine, because we were working on a vehicle based game. To be more specific: a 3D endless runner with a paper plane that needs to dodge traffic in different cities over the world. Because of the lack of any characters, there was no need for complex rigs. Therefore we could get away with basic position/rotation/scale animations on the game objects. 因为它根本就不是专为这一点。尽管引擎动画系统越来越复杂,他们仍然是很基本的与专用软件包相比。我们选择了 (几乎)给所有的做动画在游戏引擎中,因为我们在研究一个基于车辆的游戏。更具体:3 d无休止的跑步者的纸飞机需要避开交通在全世界不同的城市。由于缺乏任何字符,不需要复杂的钻井平台。因此,我们就知道了,基本立场/旋转/缩放动画游戏对象。“No bones? Go in-engine!”Another benefit of having an engine focused pipeline, is that we were able to automate the movement that brought the world to life. One of the teams developers Michiel Frankfort had made an editor that allowed us to quickly place vehicles in a game scene and with a few clicks create a path animation! To read more about Michiel and his ingenious ways check out his blog postDoubling viewing-distance without LOD-ing or performance drop“没有框架?用引擎!“具有引擎集中管道的另一个好处是,我们能够自动化运动给世界带来了生命。其中一个团队的开发人员米歇尔法兰克福做了一个编辑器,使我们能够快速地将车放置在一个游戏场景中,并点击几下创建路径动画!要了解更多关于米歇尔和他的巧妙方法,查看他的博客“没有LOD-ING或性能下降的双倍视野距离”The yellow plane indicates the position of the player-controlled airplane in relation to the pink donut car.黄色的平面表示玩家控制的飞机相对于粉红色甜甜圈汽车的位置。Legacy vs. MecanimEven though Mecanim is now the main animation system for Unity, back when we were in development it just got introduced and was mainly geared towards humanoid character animation. So for us the choice for Legacy was quite easy, as we werent working with any characters. But even now I can imagine teams opting for the Legacy system if theyre constrained on time. Mecanim does have a richer toolset, but also has a higher learning curve and quickly becomes overkill when you just want a basic animation clip that a developer can trigger when necessary. No need for any fancy blending, retargeting or muscle control. 传统与Mecanim尽管Mecanim现在是unity主要的动画系统,当我们在开发时它刚刚被推出,主要针对人形角色动画。因此,对于我们传统的选择是很容易的,因为我们我们没有使用任何人物。但即使是现在,如果他们的时间是有限制,我可以想像团队会选择传统系统。Mecanim确实有更丰富的工具,同时也具有较高的学习曲线,并迅速超过了应有的限度。当你只是想一个基本的动画片段,开发人员可以在必要时触发。无需任何特殊的混合,重定向或肌肉控制。Legacy animation system: tips & tricksSo here are some notes Ive collected during my journey as an in-engine animator. Take it from me that some of these points were relatively easy to figure out whilst some took real blood, sweat and tears, and the occasional $%! now I can start all over!传统动画系统:提示和技巧这是我收集的一些笔记关于作为发动机动画师的旅程。相信我的话,这些点是相对容易算出。而有些人采取了真正的血液,汗水和眼泪,偶尔“ $ %!现在我可以从头开始!”So to spare you that feeling, let me describe the different situations where I was left hanging with a big question mark over my head and their solutions:所以要让你感受一下,我来描述一下不同情况下我给我自己留下的一个大问题,以及他们的解决方案:Okay, I got Unity fired up, what do I do now? 好,我的unity如果不能用了,我应该怎么做?The core workflow is always the same: you add an Animation component (not Animator, thats Mecanim!) in the inspector on the object you want to animate. You open up the Animation Window (CTRL+6) where you create an Animation Clip. In the Animation Window you place your keys and adjust your curves, which get stored in the Animation Clip that a developer can trigger.其核心工作流程始终是相同的:你可以在想要做动画的物体上添加一个动画元件(不是Animator,是Mecanim!)在inspector上。你打开Animation窗口(Ctrl+6),创建一个动画片段。在动画窗口,你可以放好关键帧和调整曲线,并且保存成动画片段,这样开发者可以触发。Why are my keys greyed out? 为什么我的关键帧变灰呢?Imported animations are read-only in Unity. If you want to adjust the animation, you have to do this in the package you exported it from.导入的动画在unity中是只读的。如果你想调整动画,你必须从那个包里导出对应的animation。I got this big, beardy programmer coming up to my desk asking me why Im importing the same character a million times. What do I do? 我有位老的,大胡子的程序员同事走到我的办公桌上问我为什么我输入一百万次相同的字符。我怎么办?Shave him! Or instead of animating every individual action of the character in a separate scene file in your external 3d package, you could animate all its actions on one timeline. When imported, Unity offers you the option to create multiple animation clips by selecting the start & end frame.剃掉他!而不是在你的外部三维动画包装一个单独的场景文件包括角色所有单个动作的动画,你可以在一个时间轴激活它所有的行为。导入时,unity给你提供选项通过选择开始和结束帧。创建多个动画剪辑EDIT: I received a helpful suggestion for an alternative approach, where you export your animations separately from the mesh + bones in your external 3d package. Unity is able to link the animation data to the separately imported model. This way, theres no need to animate all the animations on one timeline in your external 3d package, which results in a cleaner workflow. Thanks for the tipDaan Boon!编辑:我收到了关于另一种方法的有用建议,让你分开从外部3 d包导出动画网格+骨头。unity能够链接动画数据分别导入模型。这种方式,不需要动画中的所有动画在一个外部3 d包的时间轴,从而形成一个更干净的工作流。谢谢你的提示大安文!Create multiple animation clips from one imported fbx.Damn son, Im on fire! Look at all that fanciness: modifiers/deformers all over the place. I just need to import my animation in the engine.wait.WHAT?! 该死的儿子,我着火了!看那些花俏:修饰符/造型工具的地方。我只需要导入动画到引擎中.等待.什么? ! ! !Computer says no. Unity can only import bone based animation, vertex based animation wont work. There are some plugins in the Asset Store that claim to fix this, but I have no experience with these.电脑说不。unity只能导入基于骨骼动画,基于顶点动画不能工作。有一些插件的资源商店要求解决这个问题,但我没有经验。I have imported a completely bone based animation, but it still isnt displayed the same in-engine as in my 3d package. 我已经导入了一个完全基于骨骼的动画,但它在引擎中显示和在我的3D包中显示仍然不同Bake your animation in your 3d package, and in Unity check the import settings for the correct animation type (Legacy) and turn off Keyframe Reduction. 在你的3D包中烘焙动画,并在unity中检查导入设置是不是正确的动画类型(传统)和关闭关键帧还原。Is this an engine for ants? Whats up with that tiny Camera Preview window in my Unity scene? 这是很小的引擎吗?在我的unity场景中,小相机预览窗口有什么用?Size doesnt matter.said nobody ever! I hope you have a second monitor, because you should display your Game Window there in order to see your animation in its full glory.大小没有关系,没有人曾经说!我希望你有第二个显示器,因为你应该展示你的游戏窗口,以看到你全部的完整动画。Is there a faster way to layout my camera? 是否有一个更快的方式来布局我的相机?Head on over to the menu bar -GameObject. There you will find three handy align functions: Move to View, Align with View & View to Selected. 头部到菜单栏-游戏对象。在那里,你会发现三个方便的对齐功能:移动到视图,结合视图和视图来选择。Dumdumdumdum a keyframe here, a keyframe there, life has never been better! Ok, lets preview what Ive got so far. Huh? Why does my preview only show the animation of the selected object? I want to preview the animation of all the objects in my scene at once! Silly you for expecting this to work like EVERY other animation system out there. I pity the fool who now has to start over. What you should have done before animating anything is to create an empty GameObject that acts as a parent for all your animated objects. So instead of placing an Animation Component on all the individual objects, you place one Animation Component on the parent GameObject. Previewing this way ensures that youll see the animation on all the objects. 这里一个关键帧,关键帧也是如此,生活从来没有这么好过!好吧,让我们来预览什么,我已经得到了这么远。咦?为什么我的预览只显示所选对象的动画?我想预览一次我场景中所有对象的动画!傻的你希望这个工作像其他的动画系统。我怜悯有傻瓜现在重新开始。你应该在做任何东西的动画之前创建一个空的游戏对象,作为你所有动画对象父级。而不是对所有的个人对象放置一个动画元件,因此,您将一个动画组件放置在父级游戏对象上。这样预览保证你会看到所有对象的动画。What are all these mystery properties doing in my Animation Window? Ive never animated those. 在我的动画窗口中的所有的秘密属性有什么用?我从来没有动画他们。Theres a silent killer on the loose in your workspace. And no, its not the new intern with that strange look on his face. Its the Autokey function in Unity. When scrubbing through your animation in the Animation Window, the Autokey function gets automagically activated. This is indicated by the Record button in the top left of your Animation Window. When this is activated and you move anything in the scene or adjust a value in the inspector, this change gets added as a property in the Animation Window. 在工作区中,有一个无声的杀手。不,这不是新的实习生,在他的脸上有奇怪的表情。在unity中它是有自动键功能。在动画窗口当洗涤通过你的动画,自动密钥的功能会自动激活。这是由你顶部左边的动画窗口的记录按钮表示。当这被激活时,你在场景中移动任何一个动作或调整一个值,这个变化会被添加到动画窗口中的属性中。Im sure nothing can go wrong when I just set two keys with the same value. 我确定没有什么可以出错的,当我只设置了两个键是相同的值WRONG! The default tangents for your keys are set to Auto in Unity, which actually means they are set to Spline. This means that you almost always can count on an overshoot when setting keys. Just right-click on the offending keys and set them to Flat in the Animation Window to get rid of any overshoot. In most 3d packages the Auto and Spline mode are different modes, where Auto mode handles interpolation in a way to prevent extreme overshoots. Not in Unity. 错误!在unity中你关键值的默认切线设置为自动,这实际上意味着他们被设置成样条曲线。这意味着,当设置键时,你几乎总是可以计算一个界限。只需右键点击违规的按键,并将它们设置为平的在动画窗口中,以摆脱任何界限。在大多数3D软件的汽车和样条模式是不同的模式,其中自动模式处理插值方法来避免极端的极限。不是在unity中。My game needs explosions, because explosions. But why doesnt the particle GameObject gets activated on the keyframe I animated it to be active?我的游戏需要爆炸,因为爆炸。但粒子GameObject为什么不被激活,其关键帧动画是活动的?I have to admit I havent delved that deep into particles in Unity yet, so my solution is probably a bit unconventional. I have found that Unity is a bit like you when your girlfriend asks you to put out the trash: youll probably need a gentle reminder. Basically when I key the particles to be active on a certain frame, I make sure to set a second key later in time (usually the end of the animation) where the particles are set to active again. Suddenly the particles do get activated on the first key! There must be a better way and I dont know why this works, but Ive just come to accept it. Unity works in mysterious ways.我不得不承认我还没有深入研究unity的粒子,所以我的解决方案可能是非常规。我发现当你的女朋友要你把垃圾倒出去的时候,unity是有点像你一样,你可能需要一个温柔的提醒。基本上,当我把粒子放在某一帧上的时候,我一定要设置第个二键(通常是动画的结尾),在那里,粒子被设置为主动。突然,粒子在第一个键上被激活!有一个更好的方式,我不知道为什么这个有效,但我只是来接受它。unity以神秘的方式运行Add that second magical key to truly activate your particles.添加另一个神奇的关键,真正激活你的粒子。I want to add some 2d elements to my 3d animation. 我想在我的三维动画中添加一些二维元素。You could create a quad GameObject (GameObject - 3D Object - Quad). Drag the 2D texture on top of the quad and voila! Well not quite yet, its probably looking a bit jagged. In the inspector set the shader of the quad to Unlit - Transparent Cutout. To make sure the quad is always facing correct towards the camera simply parent it to the camera and set its scale to zero and scale it in the moment you need
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 记一次志愿活动作文4篇范文
- 能源与动力工程系统知识要点
- 《如何掌握数学建模与应用技巧》
- 供暖设备高效低碳化改造工程项目可行性研究报告(参考模板)
- 教育与培训如何有效提高师生的反欺凌意识
- 高校学生实习成果证明(7篇)
- 我最尊敬的人伟大的园丁写人作文14篇
- 公司股东合作协议书
- 家乡的景色让我感动写景抒情作文(7篇)
- 构建多元协同的学校治理结构与治理路径
- 19S406建筑排水管道安装-塑料管道
- iso-7010-safety-signpdf原版标准文件
- CB/T 3766-1996排气管钢法兰及垫片
- 灌砂法压实度检测记录表(自动计算表)
- 江苏省泰州市2022年中考生物试题真题(含答案+解析)
- 中国慢性髓性白血病诊疗指南更新
- 《民法典》合同编实务培训课件
- 2022版《语文课程标准》
- 第7章食品原料的采购与贮存管理ppt课件
- 湘教版高中美术选修:美术鉴赏 第一单元 第二课 图像与眼睛 (教案)
- 《政治学原理(二)》课程教学大纲
评论
0/150
提交评论