unity alembic_ADAM:Unity中Alembic支持的演变

本文介绍了Unity中Alembic插件的发展,特别是Alembic Importer的升级,使其在Oats Studios的项目中实现高保真度的面部动捕和布料模拟。Unity团队增加了Timeline集成、顶点共享和插值功能,优化了实时渲染性能。Alembic的使用让艺术家能轻松地在Unity中处理复杂的模拟资产,为实时CG电影制作开辟了新的可能性。
摘要由CSDN通过智能技术生成

unity alembic

Read how ADAM’s facial mocap and cloth simulation got into Unity, producing highly realistic CG humans, all rendered at 30 FPS in real time. To accomplish this, Neill Blomkamp and Oats Studios made great use of our Alembic Importer, Timeline, vertex sharing, and other standard features.

了解ADAM的面部运动捕捉和布料模拟是如何进入Unity的,从而产生高度逼真的CG人,这些人均以30 FPS实时渲染。 为此,Neill Blomkamp和Oats Studios充分利用了我们的Alembic导入器,时间轴,顶点共享和其他标准功能。

I’m SerEn (Sean) Low, an Art Tools Engineer specialized in Tools and Pipeline on the Made with Unity team. Prior to joining Unity Technologies, I was at Disney Interactive, developing animation tools for their console games, which collaborated with Pixar, Marvel and Lucasfilm. For the ADAM films, I helped integrate tools such as Alembic and Timeline, making sure the animation pipeline is streamlined and easy to maintain.

我是SerEn(Sean)Low,是一位艺术工具工程师,专门研究Unity团队的工具和管道。 加入Unity Technologies之前,我曾在Disney Interactive工作,为他们的主机游戏开发动画工具,并与Pixar,Marvel和Lucasfilm合作。 对于ADAM电影,我帮助集成了Alembic和Timeline等工具,以确保动画制作流程简化并易于维护。

背景:Alembic在Unity中的诞生 (Background: The birth of Alembic in Unity)

About two years ago, the Unity R&D team initiated the Alembic Importer plugin. It was used in a short film named The Gift by Marza Animation Planet. In one of the most challenging shots in the film, there are millions of plastic balls that form an ocean wave, which is done by importing the Alembic data generated from a Houdini simulation into Unity. It was a solid proof point that Alembic could be integrated into Unity by allowing artists to bring their simulated data from various external applications. Alembic also allows artists to break through the limitations of joint-based mesh deformation in a real-time engine.

大约两年前,Unity研发团队启动了Alembic Importer插件。 它被用于 Marza Animation Planet 的短片《 The Gift 》中。 在影片中最具挑战性的镜头之一中,有成千上万个形成海浪的塑料球,这是通过将通过Houdini模拟生成的Alembic数据导入Unity来完成的。 通过允许艺术家从各种外部应用程序中获取模拟数据,可以将Alembic集成到Unity中,这是一个有力的证明。 Alembic还允许美术师突破实时引擎中基于关节的网格变形的局限性。

When Oats Studios decided to use our Alembic Importer in their pipeline, they also wanted additional functionality and optimization so that it could handle high visual fidelity for cloth simulation and real-life facial-performance capture. Since the requirement was vastly different from what the Alembic Importer was originally developed for, Unity’s Dev team put in a huge effort to upgrade this plugin.

当Oats Studios决定在其产品线中使用我们的Alembic Importer时,他们还需要其他功能和优化,以便它可以为布料模拟和真实的面部表情捕捉提供高视觉保真度。 由于要求与最初为Alembic Importer开发的要求有很大不同,因此Unity的开发团队付出了巨大的努力来升级此插件。

Alembic进口商的重大升级 (Major upgrades for the Alembic Importer)

The first major update of the Alembic Importer was Timeline Integration. This allows Alembic data to stream in and playback through Timeline during runtime. Simultaneously, during edit time, the user can scrub through Timeline while viewing the Alembic playback. To enable this integration, we added a custom PlayableBehavior (Alembic Stream Player), PlayableAsset (Alembic Shot Asset) and TrackAsset (Alembic Track) to the Alembic Importer package. (For details about the Playables API, check out the documentation.)

Alembic Importer的第一个主要更新是 Timeline Integration 。 这允许Alembic数据在运行时流进时间轴并通过时间轴回放。 同时,在编辑期间,用户可以在查看Alembic播放时浏览时间轴。 为了实现这种集成,我们向Alembic Importer包添加了自定义PlayableBehavior(Alembic流播放器),PlayableAsset(Alembic Shot资产)和TrackAsset(Alembic轨道)。 (有关Playables API的详细信息,请参阅 文档 。)

In Timeline, you can then add an Alembic Track, create an Alembic Shot Asset and associate it with the Alembic instance in-scene with an Alembic Stream Player component attached.

然后,在时间轴中,您可以添加一个Alembic音轨,创建一个Alembic Shot资产,并将其与附加了Alembic Stream Player组件的Alembic实例场景关联。

An Alembic Track and Alembic Shot Asset in Timeline

时间轴中的Alembic轨道和Alembic射击资产

An Alembic Stream Player component in scene object

场景对象中的Alembic Stream Player组件

The second significant update for the Importer was support for Vertex Sharing, which was important to optimize Alembic streaming performance for constant mesh topology assets. While typical Alembic data is used for dynamic simulation such as particles (where mesh topology is always changing), we wanted to merge shared vertices in order to optimize the playback performance. This is highly important since the mesh is reconstructed every frame based on the data streaming in real time. By merging the shared verts, other mesh properties such as edge, UV, normal and tangent are updated too, so the dynamic Alembic mesh now behaves like an FBX mesh. This ensures the mesh reacts according to assigned materials, shaders and lighting in a scene.

Importer的第二个重要更新是对 顶点共享的 支持 这对于为恒定网格拓扑资产优化Alembic流传输性能非常重要。 虽然典型的Alembic数据用于动态仿真,例如粒子(网格拓扑始终在变化),但我们希望合并共享顶点以优化播放性能。 这是非常重要的,因为网格是基于实时数据流在每个帧中重建的。 通过合并共享的顶点,其他网格属性(如边线,UV,法线和切线)也将更新,因此动态Alembic网格现在的行为类似于FBX网格。 这样可以确保网格根据场景中指定的材质,着色器和光照做出React。

Alembic mesh in Unity showing shared vertices

Unity中的Alembic网格显示共享顶点

For the third major update, we added Interpolation in Alembic vertex data. Since Alembic mesh is basically a new mesh constructed every frame, it doesn’t have the information about the delta of the previous and next vertex position. This is an issue when you try to apply motion blur onto Alembic mesh for rendering. With interpolation enabled, the Alembic asset in Unity is able to calculate the interpolation between positions and thus output the velocity that is necessary to calculate motion vectors. That means you can now have accurate motion vectors derived from the Alembic mesh to be used in shader computation or by the Post-Processing Stack. This enhances motion blur quality in final rendered images and it also improves performance because fewer samples are needed.

对于第三个主要更新,我们 在Alembic顶点数据中 添加了 插值 。 由于Alembic网格基本上是每帧构造的新网格,因此它没有有关上一个和下一个顶点位置的增量的信息。 当您尝试将运动模糊应用于Alembic网格进行渲染时,这是一个问题。 启用插值后,Unity中的Alembic资产能够计算位置之间的插值,从而输出计算运动矢量所需的速度。 这意味着您现在可以拥有派生自Alembic网格的准确运动矢量,以用于着色器计算或 后处理堆栈 。 这样可以提高最终渲染图像中的运动模糊质量,并且由于需要更少的样本,因此还可以提高性能。

Motion vector on Alembic mesh

Alembic网格上的运动矢量

Before motion blur applied

在应用运动模糊之前

After motion blur applied

应用运动模糊后

The motion vector buffer

运动向量缓冲区

Additionally, several other production-friendly features were implemented to enable a smooth production workflow, such as auto-activate on Alembic Playable Asset, which enables the activation of the Alembic Playable Asset without the need of an additional Activation Track in Timeline. The Time Scale property allows you to re-time the playback rate of Alembic data. The Turn Quad Edge property allows you to choose which orientation the mesh faces should triangulate in. There is also an option to cache all Alembic samples whenever the Alembic scene object is enabled, instead of having to cache the data during playback.

此外,还实现了其他一些易于生产的功能,以实现平稳的生产流程,例如在Alembic Playable Asset上自动激活,从而可以激活Alembic Playable Asset,而无需在时间轴中增加激活轨道。 时间标度属性允许您重新计时Alembic数据的播放速率。 “旋转四边线”属性使您可以选择网格面应以哪个方向进行三角剖分。还有一个选项可在启用Alembic场景对象时缓存所有Alembic样本,而不必在播放期间缓存数据。

Oats Studios生产中的Alembic (Alembic in production at Oats Studios)

“Alembic streaming was a very significant aspect of the project for us. Bringing simulated things over is difficult and the Alembic Importer in Unity is a game-changer,” said Oats Studios’ VFX Supervisor, Chris Harvey.

“对于我们来说,Alembic流是该项目非常重要的方面。 交付模拟的东西很困难,Unity中的Alembic Importer会改变游戏规则,” Oats Studios的VFX主管Chris Harvey说。

Assembling multiple Alembic assets in Timeline editor

Assembl荷兰国际集团多次蒸馏器资产时间轴编辑器

Based on real wardrobes, all the clothing in Oats’ ADAM films was captured by photogrammetry and then recreated and simulated in Marvelous Designer, where digital tailor Sean Frandsen applied real physical attributes and animation to the different fabrics (wool, cotton, leather, etc.).

在真实衣橱的基础上,通过摄影测量法捕获了燕麦ADAM电影中的所有服装,然后在Marvelous Designer中对其进行了重新创建和模拟,其中数字裁缝Sean Frandsen将真实的物理属性和动画应用于不同的织物(羊毛,棉,皮革等)。 )。

Meanwhile, facial performance was captured and converted into a series of static meshes for Alembic playback. (For more information about facial capture, watch the ADAM: Behind the Scenes video.)

同时,面部表情被捕获并转换为一系列静态网格物体以进行Alembic播放。 (有关面部捕捉的更多信息,请观看“ ADAM:幕后花絮”视频 。)

In ADAM, Alembic is mainly used for two types of assets: Cloth and faces

在ADAM中,Alembic主要用于两种类型的资产:布料和面

The data was then imported into Autodesk Maya for further cleanup and tweaking before being exported out as an Alembic file. Here’s a schematic of their pipeline.

然后将数据导入到Autodesk Maya中进行进一步的清理和调整,然后再作为Alembic文件导出。 这是他们的管道的示意图。

The Alembic and FBX assets pipeline into Unity

将Alembic和FBX资产管道传输到Unity

组装时空模拟资产 (Assembling simulated assets in space and time)

At this stage in Unity, Oats used Timeline as an assembly tool, combining Alembic assets and choreographing them in scene space along with other assets. For example, in order to fully assemble a full character performance, they used two Alembic tracks, one each for facial and cloth, on top of an Animation track, which contains body performance in FBX format as shown below.

在Unity的现阶段,Oats使用时间轴作为组装工具,将Alembic资产组合在一起并与其他资产一起在场景空间中进行编排。 例如,为了完全组合完整的角色表演,他们在动画轨道的顶部使用了两个Alembic轨道,每个轨道用于面部和衣服,该轨道包含FBX格式的身体表演,如下所示。

The assembled character comes to life in Timeline

组装好的角色在时间轴中栩栩如生

With everything in Timeline, Oats could synchronize and sequence all asset performances according to each shot’s timing for real-time playback. However, large numbers of assets can easily overcomplicate the Timeline editor interface and be hard to maintain once in production. Oats solved this by organizing assets in-scene using TrackGroup, which also let them expand or collapse groups as needed. Another Unity feature that Oats tapped to keep things well organized and manageable was ControlTrack for handling multiple nested Timeline instances.

利用时间轴中的所有内容,Oats可以根据每个镜头的定时来同步和排序所有资产性能,以进行实时回放。 但是,大量资产很容易使“时间轴”编辑器界面复杂化,并且一旦投入生产就难以维护。 Oats通过使用 TrackGroup 现场组织资产来解决此问题,该资产 还允许它们根据需要扩展或折叠组。 Oats利用另一个Unity功能来使事情井井有条,易于管理,它是ControlTrack,用于处理多个嵌套的时间轴实例。

Expanded and collapsed Track Groups

扩展和折叠的轨道组

ControlTracks handle nested timeline assets (Characters and Caches shown here)

ControlTracks处理嵌套的时间轴资产(此处显示了字符和缓存)

一键式自动化 (One-click automation)

Later in the production stage, the amount of generated Alembic data for both facial mocap and cloth simulation reached almost 300 files. Therefore Oats needed an automated process to import multiple Alembic files into Timeline, so they implemented their own importer to automatically bring in Alembic files with predefined settings, instantiate them into a scene with the required components as well as sequence them in Timeline. With help from the Unity Dev team, Oats was able to kick-off this automation process with the click of a button. We also gathered a lot of great feedback and API requests from this project to further improve Timeline.

在生产后期,用于面部运动捕捉和布料模拟的Alembic数据生成量已达到近300个文件。 因此,Oats需要一个自动化的过程来将多个Alembic文件导入到时间线中,因此他们实现了自己的导入器,以自动将具有预定义设置的Alembic文件导入,将它们实例化为具有所需组件的场景,并在时间轴中对其进行排序。 在Unity Dev团队的帮助下,Oats只需单击一个按钮即可启动此自动化过程。 我们还从该项目中收集了很多很好的反馈和API请求,以进一步改进时间轴。

Managing hundreds of Alembic assets for various characters and props

为各种角色和道具管理数百种Alembic资产

展望未来 (Looking ahead)

Over the course of the ADAM project, the Alembic Importer became more mature and production-ready. You can download the release version at the quick link below. Now you can use it for dynamic topology simulation mesh as well as static topology mesh such as cloth and face. It’s optimized and has better integration for existing and upcoming Unity features. More and more artists and studios are showing interest in using Alembic, especially for real-time CG films, so we’re looking forward to seeing how it will enable the success of many awesome Unity projects. Let us know how you’re using it!

在ADAM项目过程中,Alembic进口商变得更加成熟并且可以投入生产。 您可以通过下面的快速链接下载发行版本 。 现在,您可以将其用于动态拓扑模拟网格以及静态拓扑网格,例如布料和面。 它经过优化,可以更好地集成现有和即将推出的Unity功能。 越来越多的艺术家和工作室对使用Alembic表现出兴趣,尤其是对于实时CG电影,因此,我们期待看到它如何使许多出色的Unity项目成功。 让我们知道您的使用方式!

Special thanks to the Unity DCC Dev Team: Mark Visser, Jason McCullough, Thomas Chollet, Seiya Ishibashi

特别感谢Unity DCC开发团队: Mark Visser,Jason McCullough,Thomas Chollet,Seiya Ishibashi

More “Behind the Scenes” in ADAM
Check out our other in-depth posts on lighting, clothing simulation, and Timeline.

ADAM中的更多“幕后花絮”
查看我们有关 照明服装模拟时间轴的 其他深入文章 。

快速链接 (Quick link)

You can get Alembic Vertex Sharing release version (1.0f1) in Unity Package format here.

您可以在此处获取 Unity Package格式的Alembic Vertex Sharing 发布版本(1.0f1)。

(This branch will be merging with the master soon. We will update again once it’s ready. Sorry for the confusion caused.)

(此分支将很快与主服务器合并。一旦准备好,我们将再次更新。很抱歉造成混乱。)

了解有关Unity的更多信息 (Learn more about Unity)

Find out how Unity 2017 and its features like Timeline, Cinemachine, Post-Processing Stack, and real-time rendering at 30 FPS help teams like Oats Studios change the future of filmmaking.

了解Unity 2017及其时间轴,电影机,后处理堆栈和30 FPS实时渲染等功能如何帮助Oats Studios等团队改变电影制作的未来。

翻译自: https://blogs.unity3d.com/2017/12/04/adam-the-evolution-of-alembic-support-in-unity/

unity alembic

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值