lottie 动画_使用After Effects和Lottie制作网络动画而不会损失质量

lottie 动画

A quick getting started guide

快速入门指南

I recently took on a project where the team wanted to add some animated icons and a logo. Besides UX & UI design I am also a motion graphic designer so I took on the challenge of doing it with after Effects & Lottie to preserve the vector quality, here is how I did it.

我最近接受了 项目所在的球队想添加一些动画图标和徽标 。 除了UX和UI设计之外,我还是运动图形设计师,因此我接受了用After Effects&Lottie 来保持矢量质量的挑战这就是我的方法。

动画与网络 (Animation & web)

In the early 2000s when flash was the king of animation on the web and every designer let loose of their creativity it was very common to find crazy websites where if you had flash player installed, you could navigate through. Some of them looked more like games, there were no rules like there are now, and you could tell by looking at them. If we were to analyze them now, they probably wouldn't have passed one heuristic rule of UX. With the disappearance of flash and the use of HTML as a standard and the use of UX, those webs disappeared and now most of the webs we navigate are easy to use, read well….but they also look alike. The effort and work that came in creating an animation for the web were far too high, the designer would give their animation to developers that had very limited options for implementation. Creating the animation in code from scratch apart from being super expensive and tedious would end up with a result far from what was first designed. Until Lottie.

2000年代初期,Flash是网络上的动画之王,每位设计师都放开了他们的创造力,这是很常见的发现疯狂的网站的地方,如果您安装了Flash Player,就可以浏览。 其中一些看起来更像是游戏,没有像现在这样的规则,您可以通过观察它们来判断。 如果我们现在分析它们,它们可能不会通过UX的启发式规则 。 随着Flash消失,HTML作为标准的使用以及UX的使用, 这些网站消失了 ,现在我们浏览的大多数网站都易于使用,易于阅读……但是它们看起来也很相似。 为网络创建动画付出的努力和工作 实在太多了 ,设计人员会将其动画提供给实施方式非常有限的开发人员。 从头开始用代码创建动画不仅要花费大量的精力和繁琐 ,最终的结果会与最初设计的结果相去甚远 。 直到洛蒂。

Image for post
Lottie’s name
乐蒂的名字

洛蒂 (Lottie)

In 2015 Hernan Torrisi conceived the idea of exporting an animation created in After Effects, with the use of the plugin he created called Bodymovin, on to a JSON format description of the animation.

2015年, Hernan Torrisi想到了将After Effects中创建的动画导出的想法,并使用他创建的名为Bodymovin插件 导出该动画JSON格式描述中。

He also released the first-ever renderer for the format with a Javascript-based player for the browser.

他还发布了该格式的首个渲染器 ,并为浏览器提供了基于Java的播放器。

In 2017 the engineers at Airbnb saw the potential of the JSON based animations and together with the lead of animation, created IOS and Android libraries that could render the JSON files, they called them “Lottie”.

2017年 ,Airbnb工程师们看到了基于JSON的动画的潜力 ,并与动画的领导者一起,创建了可以渲染JSON文件的 IOS和Android库 ,他们将它们称为“ Lottie”。

You can read more about the history here.

您可以在此处阅读有关历史的更多信息

The developers at Airbnb made this an open-source as the claim on their web not only to release it free but to create a community. They created a GitHub to communicate to designers and engineers, it is so new and evolving so fast it's a good idea to keep up to date.

Airbnb的开发人员将此开源作为其网络上的声明 不仅可以免费发布它,还可以创建一个社区。 他们创建了一个GitHub以与设计师和工程师进行交流,它是如此新,并且发展得如此之快,因此保持最新是一个好主意。

LottieFiles (LottieFiles)

LottieFiles is an independent platform from Airbnb on which designers can upload, test, buy and download animations, to start you only need to create a free account.

LottieFiles是Airbnb的一个独立平台,设计人员可以在该平台上上传,测试,购买和下载动画 ,开始时您只需要创建一个免费帐户即可。

They are also the creators of the LottieFiles, a plugin for After Effects, that works similar to Bodymoving and allows us to preview the animation, upload it to the LottieFiles platform, save it on our computer, etc.

他们也是LottieFiles( After Effects的插件,其工作原理类似于Bodymoving,并允许我们预览动画, 上传LottieFiles平台将其保存在我们的计算机上等。

入门 (Getting started)

To start with, you need to have the plugin installed, you can install Bodymovin or LottieFile.

首先,您需要安装插件 ,可以安装Bodymovin或 LottieFile

I was in the middle of a project when I needed to make these animations and didn't have much time to research it, so I did what I always do … instead of reading the instructions, I tried to work it out on my own…I created a simple animation for my logo that would appear on the top menu of the website. It was a drone that had helix rotating so I imported in layers the Illustrator files, made the helix 3D layers and rotated them.

当我需要制作这些动画并且没有太多时间研究它时 ,我正处于一个项目的中间,所以我做了我经常做的事情……而不是阅读说明, 而是尝试自己动手制作 ……我为徽标创建了一个简单的动画,该动画将出现在网站的顶部菜单上。 那是一架螺旋旋转的无人机,所以我将Illustrator文件分层导入,制作了螺旋3D图层并对其进行了旋转。

Image for post
Gif animation of the Logo
徽标的Gif动画

When I tried to export it, the window gave me so many errors. I then found out that not all the effects are supported by these file formats.As for today, 3D layers are not supported. So before doing your animation is worth checking out what is supported and what not on their web. It can sometimes work for the web but not for IOs or Android.

我尝试导出它时,窗口给了我很多错误。 然后我发现这些文件格式 并不支持 所有效果 。就目前而言, 不支持3D图层。 因此,在制作动画之前,值得一看的是在网络上支持哪些内容以及不支持哪些内容 有时它可以在网络上运行,但不适用于IO或Android。

Image for post
Supported in Lottie
在Lottie中受支持

该做什么和不该做什么 (Do’s and don’ts)

Creating animations for the web is not as creating them for a traditional Video, we need to take into consideration several setup and format options that we never had to think about before.

为网络创建动画不同于为传统视频创建动画,我们需要考虑一些以前从未考虑过的设置和格式选项

Here is a list of suggestions Lottie creators give:

这是Lottie创作者提供建议列表

  • Keep it simple: JSON files should be as compact and small as possible for mobile products.

    保持简单: JSON文件应尽可能 ,并且对于移动产品而言应尽可能

  • Use your After Effect skills to avoid extra keyframes by for example parenting instead of adding a keyframe on each layer.

    使用After Effects技能来避免多余的关键帧 ,例如通过育儿而不是在每个图层上添加关键帧。

  • Avoid using path keyframes as they create a very large document from converting all the vertex from the path.

    避免使用路径关键帧,因为它们会转换路径中的所有顶点而创建非常大的文档。

  • Wiggle, Autotrace and similar techniques that produce a large number of keyframes are best to be avoided, creating such a large file may make the JSON file very large and could impact negatively on the performance.

    最好避免 使用会产生大量关键帧的摆动,自动跟踪和类似技术 创建如此大的文件可能会使JSON文件变得非常大,并可能性能产生负面影响

  • Convert any Illustrator, EPS, SVG or PDF layer on to shape layers in After Effects, otherwise, it would generate an error.

    在After Effects中将任何Illustrator,EPS,SVG或PDF图层转换形状图层 ,否则会产生错误。

  • Export at 1X when exporting the file every pixel on the artwork will be translated on to points for IOS and DPS for Android. here is a collection of device metrics in DPS that Google has put together.

    导出文件时, 以1倍速导出,图稿上的每个像素都将转换为IOSAndroid的DPS 这是一个集合 Google汇总的DPS中的设备指标。

  • No expressions or effects are yet supported by Lottie.

    Lottie尚不支持任何表达式或效果

  • Matte and alpha inverted mattes should be as small as possible, their size will impact the performance of the Lottie, so best to avoid them or keep them to the minimum.

    雾面和Alpha反面雾面尽可能小 ,它们的大小会影响Lottie的性能,因此最好避免使用它们或将它们保持在最低水平。

  • Blending modes such as Multiply, Screen or Add, aren’t yet supported nor are Luma mattes.

    尚不支持 混合模式,例如“ 乘”,“屏幕”或“加” ,“ 亮度”遮罩不受支持

  • Layer styles (drop shadow, overlay, stroke…)are not yet supported.

    尚不支持 图层样式 (阴影,叠加,笔触...)

  • Nulls can be used but in order for them to work, we need to turn the visibility on and change the opacity to 0%.

    可以使用Null,但是为了使它们起作用,我们需要打开可见性并将不透明度更改为0%。

我们开始做吧 (Let’s do it)

So now that we know what I should have before creating the Logo in AE, Ill show you how I should have done it from for it to be right:

因此,既然我们知道在AE中创建徽标之前应该拥有的内容 ,下面向您介绍如何正确完成徽标:

Import layers, open composition, select all layers, right-click and select: Create / create shape from vector layers.

导入图层 ,打开合成,选择所有图层,单击鼠标右键,然后选择: 从矢量图层创建/创建形状。

This will create vector layers that won't give us trouble when exporting for Lottie.

这将创建矢量层,在导出Lottie时不会给我们带来麻烦。

Image for post
Converting layers
转换图层

We need to delete the AI files and work only with the vector layers.

我们需要删除AI文件,并且仅使用矢量层。

Image for post
Vector layers
矢量层

I wanted to animate in 3D the helix form the Logo, as it is not supported, I had to do it “the traditional way” and so I faked the rotation by animating the size in X. (width).

我想以3D形式对徽标的螺旋线进行动画处理,因为它不受支持,因此我不得不以“传统方式”进行操作,因此我通过将X大小(宽度)设置为动画来伪造旋转

Image for post
Scale animation in X
在X中缩放动画

After I got it rotating the speed I wanted, I created a null object to move the entire logo and make it “take off” and “ land”. I used the vectors in the position to make the movement smoother.

在以所需的速度旋转后,我创建了一个空对象来移动整个徽标,并使其“起飞”和“着陆”。 我在位置上使用矢量使运动更平滑。

Image for post
Null object position vectors
空对象位置向量

As we read before null objects need to be turned to visible and 0% transparency in order to work.

正如我们之前所读过的那样, 空对象需要变为可见且透明度0%才能起作用。

Once I had the animation as I wanted it, I opened the Lottie extension

有了所需的动画后,便打开了Lottie扩展程序

Image for post
Opening Lottie Extension
开张彩票扩展

A window opens where you can view the animation, upload it to Lottie-files and save it on your pc. In order to do that you already need to have an account in Lottie-files.

将打开一个窗口,您可以在其中查看动画,将其上传到Lottie-files并将其保存在您的pc上 。 为此,您已经需要在Lottie文件中拥有一个帐户。

Image for post
Lottie Extension
乐蒂扩展

结论 (Conclusions)

This way of creating animations for the web is really exciting as it preserves the great quality, is easy to implement and allows us to create digital products that stand out.

这种为网络创建动画的方式确实令人兴奋,因为它保持了高质量, 易于实现,并且使我们能够创造出众的 数字产品。

Bus as we are animating for the web and not Video format we need to adapt and understand the new medium for which we are designing and its limitations.

在为网络动画而不是视频格式动画时, 我们需要适应和理解我们正在设计的新媒体 及其局限性。

I'm sure in the future we will be able to add so many more features to our animations but as for now, it is best to keep it simple, in this case, as in many others, Less is more.

我敢肯定,将来我们可以在动画中添加更多的功能 ,但是就目前而言, 最好保持简单 ,在这种情况下,就像在许多其他情况中一样, Less is more。

翻译自: https://uxplanet.org/animations-for-the-web-with-after-effects-lottie-without-losing-quality-9f597b1fcfec

lottie 动画

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/274487.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

最优秀的技术能力,是技术领导力!

最近和几个刚晋升为技术经理的朋友们约饭,席间互相吐槽职场中的喜怒哀乐: “开始带团队,既担心自己长时间不写代码技术功底退化,又怕手下人干不好,该怎么办?”“我都想回去敲代码了,拼命熬到管理…

模式匹配 怎么匹配减号_如何使您的应用导航与用户的思维模式匹配

模式匹配 怎么匹配减号One of the most interesting things about complex apps is that the navigation itself can be designed to support users’ mental model of the entire experience, thereby increasing engagement and decreasing potential user frustration.复杂应…

ux的重要性_颜色在UX中的重要性

ux的重要性When coming up with a new digital solution (desktop, mobile, app, whatever it may be) or any design concept, choosing the right colour palette is a crucial step that affects its success and outcome. The content, animations, copy and features may …

都2022 年了,你总不能还只会 npm i 吧?

大家好,我是若川。我持续组织了近一年的源码共读活动,感兴趣的可以 点此扫码加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试…

matlab学习:图像频域分析之Gabor滤波

很多同学需要源文档,所以添加了下载链接,方便大家共同学习进步~ 本文下载链接:http://files.cnblogs.com/yingying0907/Gabor%E7%AC%94%E8%AE%B0.zip Gabor变换是D.Gabor 1946年提出的。为了由信号的Fourier变换提取局部信息,引入…

云谦:前端框架的趋势与实践

大家好,我是若川。我持续组织了近一年的源码共读活动,感兴趣的可以 点此扫码加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试…

element-ui表单_每日UI挑战强加-登录表单(分步教程)

element-ui表单A step by step journey to create a good design from the daily UI challenge一步步走,从日常的UI挑战中创建出色的设计 内容 (Content) Introduction 介绍 Result demo 结果演示 Prerequisite 先决条件 Step by step guide 逐步指南 Conclusion 结…

GitHub 搜索技巧:如何更有效地搜索 issue、repo 和更多信息

大家好,我是若川。我持续组织了近一年的源码共读活动,感兴趣的可以 点此扫码加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试…

js 绘画js 绘画路径_绘画是一种技能,而不是才能

js 绘画js 绘画路径重点 (Top highlight)November 2019… some decided to start rocking a moustache, others were obsessed with baby Yoda. I decided to commit to drawing something every single day. As a way to keep myself accountable I started posting daily on …

点击页面元素跳转IDE对应代码,试试这几个工具!

大家好,我是若川。我持续组织了近一年的源码共读活动,感兴趣的可以 点此扫码加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试…

shields 徽标_徽标不够用时如何设计应用程序图标

shields 徽标What’s the first thing that comes to mind when you think about a particular app? Chances are, it’s the icon. And it’s certainly the first thing a user notices when deciding what app to install — similar to studying the supermarket shelves.…

基于Sentry高效治理前端异常

大家好,我是若川。我持续组织了近一年的源码共读活动,感兴趣的可以 点此扫码加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试…

zoom 用户被锁定_重新考虑Zoom的用户体验

zoom 用户被锁定Zoom is a household name now. It’s weird, but a new reality for 2020. I’ve been able to reliably stay in touch with so many people and even throw surprise birthday parties! It has been one of the products that has kept me busy through this…

或许是我们学错了方向?

大家好,我是若川。最近来了一些新朋友,感谢大家关注~相比于原生 JS 等源码。我们或许更应该学习正在使用的组件库的源码(如:element、antd、vant、semi、arco、tdesign 等),先从简单的看起,Butt…

Android 默认Tab标签大小及间距修改

一般来说,我都是用Android默认的Tab,但此时Android会根据你增加的Tab页面平均分配Tab标签,假如你只有两个Tab,那么长度将会很长,并且其高度略微过高,并不好看,网上解决这个问题有些是自定义Tab。…

ui设计看的书_5本关于UI设计的书

ui设计看的书Want to develop a better eye and vocabulary for judging layouts, type choices and imagery?是否想开发一种更好的眼神和词汇来判断布局,类型选择和图像? According to performance experts, the best way to learn is to gain lots o…

GitHub 这8大超实用小技巧,99.9%的人都不知道!

大家好,我是若川。我持续组织了近一年的源码共读活动,感兴趣的可以 点此扫码加我微信 ruochuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试…

案例研究设计与方法-罗伯_旭进口重新设计-用户体验案例研究

案例研究设计与方法-罗伯Asahi Imports is a Japanese grocery store located in central Austin, Texas. It has a passionate following, over fifty years’ history, and strong business growth. But its website is showing its age, and not hitting its full potential…

Taro v3.6 代号为「Reach」,已发布 canary 版本

大家好,我是若川。我持续组织了近一年的源码共读活动,感兴趣的可以 点此扫码加我微信 lxchuan12 参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》 包含20余篇源码文章。历史面试…

axure rp 创建弹框_如何在Axure RP 9中创建交换机

axure rp 创建弹框Axure is a well-known prototyping tool with a lot of history, it has been around for years. You can create almost any kind of prototypes from simple ones to more complex ones with variables and logic without writing a single line of code (…