三星魔术师助手v5.3.1_Cinemachine 2.6为您带来精度,改进的工作流程和一点点魔术...

三星魔术师助手v5.3.1

Everything in your Unity project passes through the lens of a camera, so you need to squeeze everything you can out of that camera. While much of this magic is expressed through render pipelines – light, shadow, focus, color – other dimensions are critical: camera position, motion, and timing.

Unity项目中的所有内容都通过相机的镜头,因此您需要从相机中挤出所有可能的东西。 尽管许多魔术都是通过渲染管道(光,阴影,焦点,颜色)表达的,但其他尺寸至关重要:相机的位置,运动和定时。

Cinemachine is Unity’s virtual camera operator, a tool for ensuring that your camera captures the action exactly where and when you need it. Made for both games and animations, 2D and 3D, Cinemachine makes your camera smarter so that the action and emotion is always captured by the lens.

Cinemachine是Unity的虚拟摄像头操作员,该工具可确保您的摄像头在需要的位置和时间准确地捕获动作。 Cinemachine专为2D和3D游戏和动画制作,使您的相机更加智能,因此镜头始终可以捕捉动作和情感。

We want to share some of the latest developments with Cinemachine. We’ve become a verified package (more on what that means below). We have a new version coming out with some fun and useful features and samples. And we have a live talk coming up as part of Unite Now that you can join from the comfort of your home.

我们想与Cinemachine分享一些最新的发展。 我们已经成为经过验证的软件包(更多有关以下内容的说明)。 我们有一个新版本,其中包含一些有趣且有用的功能和示例。 作为Unite的一部分,我们将进行现场演讲,现在您可以在家中舒适地加入。

现场直播:电影机在战the中 (Live talk: Cinemachine in the trenches)

Join us at 9 am PT on Thursday, May 28, via Zoom as part of Unite Now, Unity’s free series of online learning sessions, demos, creator stories and more.  We’ll be talking with a few of our most demanding customers about how they’ve achieved their results with Cinemachine. The conversation will be followed by a live Q&A. Register here to attend.

5月28日(星期四)太平洋标准时间上午9点加入我们,通过Zoom作为Unity免费一部分的在线学习课程,演示,创作者故事Unite Now的一部分,以及更多内容。 我们将与一些要求最苛刻的客户讨论他们如何通过Cinemachine获得成果。 对话后将进行现场问答。 在这里注册参加。

If you miss the live show, you can check out the recording on YouTube later.

如果您错过现场直播,可以稍后在YouTube上查看录制的内容。

Cinemachine 2.5已针对Unity 2020.1进行了验证 (Cinemachine 2.5 verified for Unity 2020.1)

Cinemachine has been around for a long time, both as a Unity package and before that as an asset in the Asset Store. As a “verified” package, it has proven its mettle both through internal QA and through user validation.

Cinemachine作为Unity软件包以及之前作为Asset Store中的资产存在了很长时间。 作为“经过验证的”程序包,它已通过内部质量检查和用户验证证明了自己的才能。

这对您意味着什么? (What does this mean for you?)

While no feature can claim to cover every use case, verification indicates that we’ve considered a lot of use cases and we’ll prioritize bug fixes to ensure those cases remain supported. The Cinemachine team has always taken its commitment to users outrageously seriously, and you’re always welcome to ask us for help on our forum.

尽管没有功能可以声称涵盖所有用例,但验证表明我们已经考虑了许多用例,并且将优先考虑漏洞修复以确保这些用例得到支持。 Cinemachine团队一直非常认真地对待用户,我们非常欢迎您在我们的论坛上向我们寻求帮助。

Verification also points to a future in which we’ll be better able to serve you with Cinemachine included in project templates and more educational material.

验证还指出了未来,我们将可以更好地为您提供项目模板中包含的Cinemachine和更多教育材料。

预览中的Cinemachine 2.6 (Cinemachine 2.6 in preview)

No sooner was the code dry on 2.5 than the team started work on 2.6, which is now in preview. There are some new features, but perhaps even more useful are the new samples, which help you get up and running for key use cases like aiming (in third-person shooters) and dual targeting.

在团队中开始在2.6上进行工作之前,代码在2.5上枯燥不久。 有一些新功能,但也许更有用的是新样本,这些样本可以帮助您启动并运行关键用例,例如瞄准(在第三人称射击者中)和双重瞄准。

To create a new project, install Cinemachine and the new samples, and follow along.

要创建一个新项目,请安装Cinemachine和新示例,然后继续进行。

工作流程改进:现在可以在场景视图中创建虚拟摄像机 (Workflow improvement: Virtual cameras now created at scene view )

We’re pleased (and a tiny bit embarrassed) to open with this astonishingly simple but really useful workflow improvement: whenever you create a new virtual camera, we drop it in exactly where your scene view is.

我们很高兴(有点尴尬)以这种惊人的简单但真正有用的工作流程改进来打开:每当您创建新的虚拟摄像机时,我们都会将其放到场景视图的确切位置。

Placing the camera exactly where you are in the scene makes blocking and framing shots much easier and more intuitive, speeding up your creative workflow.

将相机准确地放置在场景中的位置,可以更轻松,更直观地对镜头进行取景和取景,从而加快了创意工作流程。

新功能:脉冲传播 (New feature: Impulse propagation)

An important effect for achieving realism in digital camera work, useful both in games and in cinematics, is when actions in the environment jostle the camera. In the real world, we tend to worry about it the other way around, using tools like a Steadicam to dampen this effect. But when the connection between the environment and the viewer’s perspective is lacking, the virtual world can seem stiff and unresponsive.

当环境中的动作使相机震动时,在游戏和电影中都有用的实现数码相机工作中逼真度的重要作用。 在现实世界中,我们倾向于用另一种方式担心它,即使用Steadicam之类的工具来减轻这种影响。 但是,当缺少环境与查看者的视角之间的联系时,虚拟世界似乎会变得僵硬且无响应。

We provide a couple of ways to connect camera motion to the physical action in the scene. One of these is the Impulse, which consists of a Noise Setting (a pattern for generating shake), an Impulse Source (the location in the world that creates a disturbance), and an Impulse Listener (the thing affected by that disturbance). Note that the listener doesn’t have to be a camera, so you can use this system to disturb other objects as well (see the example below). For Cinemachine 2.6, this tool includes an added layer of realism, propagation speed, which allows you to modulate the timing between when a disturbance occurs and when it affects the listener.

我们提供了两种方法将摄像机的运动与场景中的物理动作联系起来。 其中之一是冲动,由噪声设置(用于产生抖动的模式),冲动源(在世界上造成干扰的位置)和冲动侦听器(受该干扰影响的事物)组成。 请注意,侦听器不必是摄像机,因此您也可以使用此系统来干扰其他对象(请参见下面的示例)。 对于Cinemachine 2.6,此工具包括增加的真实感,传播速度层,它使您可以调整发生干扰与影响侦听器之间的时间。

For this example, we first keep the propagation speed low, so you can see the effect clearly, before ramping it way up to show something more akin to the effects of a realistic explosion.

在此示例中,我们首先将传播速度保持在较低水平,以便在逐渐增大效果以显示出与真实爆炸效果更相似的效果之前,可以清楚地看到效果。

If you downloaded the Samples, you’ll find a sample scene in your project at Assets > Samples > Cinemachine > 2.6.0-preview.5 > Cinemachine Example Scenes > Scenes > Impulse > ImpulseWave. (Note that the version number might have changed by the time you read this.)

如果下载了样本,则可以在项目中的Assets> Samples> Cinemachine> 2.6.0-preview.5> Cinemachine Example Scenes> Scenes> Impulse> ImpulseWave中找到样本场景。 (请注意,在您阅读本文时,版本号可能已更改。)

新样本:第三人称瞄准装置 (New sample: Third-person aiming rig)

One big difficulty with games like third-person shooters is the slight (but significant) disconnect between the perspective of the character and the player’s camera. Anyone who has played such a game and lurked around a corner or behind an obstacle, waiting for a clear moment to attack, has experienced this disconnect. But in games where the camera is well managed, you probably don’t find it problematic.

像第三人称射击游戏这样的游戏的最大困难是角色视角与玩家摄影机之间的轻微(但很明显)脱节。 任何玩过此类游戏并潜伏在拐角处或障碍物后面,等待明确时刻发动进攻的人,都经历了这种脱节。 但是在相机管理得当的游戏中,您可能不会觉得有问题。

In Cinemachine 2.6, we’ve added the sample scene Assets > Samples > Cinemachine > 2.6.0-preview.5 > Cinemachine Example Scenes > Scenes > AimingRig > AimingRig (the version number might be updated). The example demonstrates a great setup to achieve a AAA-quality look for this common use case.

在Cinemachine 2.6中,我们添加了示例场景Assets> Samples> Cinemachine> 2.6.0-preview.5> Cinemachine示例场景>场景> AimingRig> AimingRig (可能会更新版本号)。 该示例演示了一个很好的设置,可以针对此常见用例实现AAA质量的外观。

The video above highlights how to construct such a rig with the help of the 3rd Person Follow behavior and a Cinemachine 3rd Person Aim component. The component references a sprite as the reticle that denotes where the character is looking, and it uses a raycast to position that reticle. In the video, you can see the difference between the camera’s perspective (the larger circle) and where the character is looking (the smaller one). It’s a minor offset, but it can be critical when a player is trying to judge aim.

上面的视频重点介绍了如何借助“第三人称关注”行为和Cinemachine“第三人称目标”组件来构建这样的装备。 该组件将子图形作为标线,指示角色正在看的地方,并使用射线投射对该标线进行定位。 在视频中,您可以看到相机的视角(较大的圆圈)和角色所看到的位置(较小的圆圈)之间的差异。 这是一个很小的偏移,但是当玩家尝试判断目标时,它可能至关重要。

Note also that the Cinemachine 3rd Person Aim component provides filters for what the raycast will ignore, and a distance setting to limit how far the ray is cast.

还要注意,Cinemachine第三人称目标组件为光线投射将忽略的内容提供了过滤器,并提供了一个距离设置以限制光线投射的距离。

新样品:双目标钻机 (New sample: Dual-target rig)

Another common use case: you want to drive the position of the camera by following a GameObject – a tank, a car, an avatar – but drive the aim by chasing another object that represents a point of interest, such as the tank’s aim. As with the aiming rig, we’ve set up a reticle, but this one does some fancy indirect chasing of the mouse within a set of limits. Then there’s a Virtual Camera following the reticle. Check out the video below.

另一个常见用例:您想通过跟随GameObject(坦克,汽车,化身)来驱动摄像机的位置,但是通过追赶代表感兴趣点的另一个对象(例如坦克的目标)来驱动目标。 与瞄准装置一样,我们已经设置了一个标线,但是该标线在一组限制内对鼠标进行了一些奇特的间接追赶。 十字线后面有一个虚拟相机。 看看下面的视频。

The example is available at Assets > Samples > Cinemachine > 2.6.0-preview.5 > Cinemachine Example Scenes > Scenes > DualTarget > DualTarget (the version number might be updated).

该示例位于资产>样本> Cinemachine> 2.6.0-preview.5> Cinemachine示例场景>场景> DualTarget> DualTarget (版本号可能已更新)中。

This is a great illustration of how you can use indirection with Cinemachine to create complex behavior. There are a few moving parts here:

这很好地说明了如何在Cinemachine中使用间接创建复杂行为。 这里有一些移动的部分:

  • The CM Dual Target Virtual Camera follows the Player object, but it looks at the AimTarget Moved by Mouse object.

    CM Dual Target虚拟摄像机跟随Player对象,但它查看由Mouse对象移动的AimTarget。

  • The Gun Points at AimTarget object has a simple script on it called PointAtAimTarget, which points the gun at the AimTarget Moved by Mouse object.

    “将枪对准AimTarget”对象上有一个名为PointAtAimTarget的简单脚本,该脚本将枪对准“鼠标移动”的AimTarget。

  • Finally, the AimTarget Moved by Mouse object – the thing everyone else is looking at – itself has a MoveAimTarget script.

    最后,其他对象正在查看的“由鼠标移动的AimTarget”对象本身具有MoveAimTarget脚本。

The camera following the Player object is pretty self-explanatory. Wherever the Player goes, the camera will follow with appropriate offsets. Similarly, the look at behavior simply ensures that the camera looks at the reticle. Note that the Dead Zone and Soft Zone parameters are set almost wide open (and exactly the same as each other), so the reticle can move freely within the screen-space without causing any motion. Only when the reticle gets close to the edges does the camera react.

跟随Player对象的摄像机非常不言自明。 不论播放器走到哪里,摄像机都会跟随适当的偏移量。 类似地,注视行为只是确保照相机注视标线。 请注意,“死区”和“软区”参数设置为几乎全开(并且彼此完全相同),因此标线可以在屏幕空间内自由移动而不会引起任何运动。 仅当分划板靠近边缘时,摄像机才会做出React。

PointAtAimTarget, the script on the gun, does literally what it says on the tin: it ensures that the gun points at the target.

PointAtAimTarget ,枪上的脚本,按照字面上的意思执行了操作:确保枪对准目标。

So the only somewhat complicated piece is the MoveAimTarget script. As was the case with the third-person animation setup, we have references to a sprite (for the reticle) as well as information about how far to raycast and which layers and tags to filter from the cast. Additionally, we’ve added details for tuning the reticle behavior, including which input dimensions should drive the behavior.

因此,唯一有些复杂的部分是MoveAimTarget脚本。 与第三人称动画设置一样,我们引用了一个小精灵(用于标线片)以及有关射线投射的距离以及从演员表中筛选出哪些图层和标签的信息。 此外,我们还添加了用于微调标线片行为的详细信息,包括哪些输入维应驱动该行为。

新样品:相机磁铁 (New sample: Camera magnets)

Camera magnets sound like a new feature, but really they’re just a refined example of using weights in a CinemachineTargetGroup. This use case, suggested by a user on our forums, is fairly common: your camera wants to follow a target (your avatar, perhaps) until it gets close to a point of interest. As you approach that point, you want the camera to gravitate towards the point of interest. Let’s watch the video and then we’ll explain how it’s done.

摄像头磁铁听起来像是一项新功能,但实际上,它们只是在CinemachineTargetGroup中使用砝码的精妙示例。 用户在我们的论坛上建议的这种用例是相当普遍的:您的相机要跟随一个目标(也许是您的化身),直到它接近兴趣点为止。 当您接近该点时,您希望相机偏向兴趣点。 让我们观看视频,然后我们将说明其完成方式。

Our virtual camera this time is not focused on a single object, but rather on a CinemachineTargetGroup. Target groups are an incredibly useful and versatile abstraction in Cinemachine. Instead of pointing a camera at one thing, a group allows you to point it at multiple things. This comes in handy, for example, if you have a party of adventurers who spread out and you want to keep them all in the shot.

这次,我们的虚拟摄影机不再聚焦于单个对象,而是聚焦于CinemachineTargetGroup。 目标组是Cinemachine中非常有用且用途广泛的抽象。 不用将摄像机对准一件事,而是让一个小组将它指向多个事情。 例如,如果您有一个冒险者队伍分散开来,并且想让他们全神贯注,这会派上用场。

But each target in the group also has a weight, so you can bias the camera towards objects whose weight is greater than others. In this example, we demonstrate how playing with that weighting dynamically allows us to “magnetize” objects as we approach them.

但是组中的每个目标也都有权重,因此您可以将相机偏向权重大于其他物体的物体。 在此示例中,我们演示了如何动态地使用该权重使我们在接近对象时“磁化”对象。

Two exceptionally simple classes allow this magic to happen: CameraMagnetTargetContoller (attached to the CameraMagnets GameObject), and CameraMagnetProperty (attached to each of the CameraMagnet GameObjects). Each CameraMagnetProperty sets a proximity and strength to control its weight in the target group. The CameraMagnetTargetContoller then loops through all the magnets. Added into the mix is the player avatar itself, which has a constant weight value of 1. If there are no magnets attracting the camera, the avatar “owns” the camera’s attention. But as the player approaches, the magnets pull more strongly, drawing the attention towards these key positions.

有两个非常简单的类可以实现这种神奇效果:CameraMagnetTargetContoller(附加到CameraMagnets GameObject)和CameraMagnetProperty(附加到每个CameraMagnet GameObject)。 每个CameraMagnetProperty都设置一个接近度和强度以控制其在目标组中的重量。 然后,CameraMagnetTargetContoller遍历所有磁体。 添加到混合中的是玩家化身本身,其权重值为1。如果没有磁铁吸引摄像机,则该化身“拥有”摄像机的注意力。 但是随着玩家的接近,磁铁会更加强烈地拉动,将注意力吸引到这些关键位置。

改进:提前查找 (Improvement: Better lookahead)

Smoother, more predictable, and more efficient. Lookahead is a powerful feature that can give a better view of where the target is going. We think the new implementation has a more human feel to it, and more users should take advantage of this feature.  

更流畅,更可预测,更高效。 前瞻是一项强大的功能,可以更好地了解目标的前进方向。 我们认为新的实现方式具有更人性化的感觉,更多的用户应该利用此功能。

改进:更好地支持输入系统 (Improvement: Better support for input systems)

While it was always possible to use Cinemachine with custom or third-party input systems to control the camera, doing so was sometimes a little awkward and not so easily discoverable. You had to override the global delegate CinemachineCore.GetInputAxis(string name) to point to your custom input provider function. You can still do that, but it’s no longer the best or most efficient way.

尽管始终可以将Cinemachine与自定义或第三方输入系统一起使用来控制摄像机,但是这样做有时有点笨拙,而且不那么容易发现。 您必须重写全局委托CinemachineCore.GetInputAxis(string name)指向您的自定义输入提供程序函数。 您仍然可以这样做,但这不再是最好或最有效的方法。

Now there is a new interface Cinemachine.AxisState.IInputProvider. If a virtual camera has a behavior that implements this interface, then that behavior will be queried for input instead of the standard CinemachineCore.GetInputAxis(string name) delegate.

现在有一个新的接口Cinemachine.AxisState.IInputProvider。 如果虚拟相机具有实现此接口的行为,则将查询该行为以获取输入,而不是标准CinemachineCore.GetInputAxis(string name)委托。

The advantages of this are that the interface call is not string-based and that it calls a per-virtual-camera implementation that can have its own data, so it can be set up for efficiency and for mapping to specific players.

这样做的优点是,接口调用不是基于字符串的,而是调用了每个虚拟摄像机的实现,该实现可以拥有自己的数据,因此可以进行设置以提高效率并映射到特定播放器。

Cinemachine 2.6 ships with an example implementation of this for Unity’s new input system. You can either use it directly as-is or use it as a template for your own custom input providers.

Cinemachine 2.6随附Unity的新输入系统的示例实现。 您可以直接使用它,也可以将其用作您自己的自定义输入提供程序的模板。

If you have the new Input System package installed, then you will be able to add the new CinemachineInputProvider component to your virtual camera. With it, you can simply and easily map your camera’s input to an Input Action Reference and support multiplayer requirements.

如果您安装了新的输入系统软件包 ,则可以将新的CinemachineInputProvider组件添加到您的虚拟相机。 借助它,您可以轻松轻松地将摄像机的输入映射到“输入操作参考”,并支持多人游戏需求。

保持联系 (Stay connected)

Cinemachine is all about making your game, movie, or cutscene look amazing, and we hope you find all the new features, improvements, and samples useful in making your games as gorgeous as they can be. Download the Cinemachine 2.6 Preview now. 

Cinemachine旨在使您的游戏,电影或过场动画看起来令人赞叹,我们希望您能找到所有新功能,改进和示例,它们有助于使游戏尽可能的华丽。 立即下载Cinemachine 2.6预览版。

Let us know what you think, what works for you, and where we can do better. Join us in the Cinemachine forum, where we can answer your questions and get you the results you need.

让我们知道您的想法,什么对您有用,以及我们可以做得更好。 加入我们的Cinemachine论坛,在这里我们可以回答您的问题并为您提供所需的结果。

Finally, mark your calendar: our live Cinemachine session, part of Unite Now, airs at 9 am PT on Thursday, May 28. You can register now.

最后,记下您的日历:5月28日(星期四)美国太平洋时间上午9点播出我们的在线电影发布会,这是Unite Now的一部分。您可以现在注册

翻译自: https://blogs.unity3d.com/2020/05/22/cinemachine-2-6-brings-you-precision-improved-workflow-and-little-bits-of-magic/

三星魔术师助手v5.3.1