Cinemmachine 组件学习


CinemachineFollowZoom
An​ ​add-on​ ​module​ ​for​ ​Cinemachine​ ​Virtual​ ​Camera​ ​that​ ​adjusts​ ​the​ ​FOV​ ​of​ ​the​ ​lens​ ​to​ ​keep​ ​the target​ ​object​ ​at​ ​a​ ​constant​ ​size​ ​on​ ​the​ ​screen,​ ​regardless​ ​of​ ​camera​ ​and​ ​target​ ​position.
CinemachineVirtualCamera
The​ ​Virtual​ ​Camera​ ​will​ ​animate​ ​its​ ​Transform​ ​according​ ​to​ ​the​ ​rules​ ​contained​ ​in​ ​its CinemachineComponent​ ​pipeline​ ​(Aim,​ ​Body,​ ​and​ ​Noise).​ ​When​ ​the​ ​virtual​ ​camera​ ​is​ ​Live,​ ​the Unity​ ​Camera​ ​equipped​ ​with​ ​a​ ​CinemachineBrain​ ​will​ ​assume​ ​the​ ​position​ ​and​ ​orientation​ ​of​ ​the virtual​ ​camera. A​ ​virtual​ ​camera​ ​is​ ​not​ ​a​ ​camera.​ ​Instead,​ ​it​ ​can​ ​be​ ​thought​ ​of​ ​as​ ​a​ ​camera​ ​controller,​ ​not​ ​unlike a​ ​cameraman.​ ​It​ ​can​ ​drive​ ​the​ ​Unity​ ​Camera​ ​and​ ​control​ ​its​ ​position,​ ​orientation,​ ​lens​ ​settings, and​ ​PostProcessing​ ​effects.​ ​Each​ ​Virtual​ ​Camera​ ​owns​ ​its​ ​own​ ​Cinemachine​ ​Component Pipeline,​ ​through​ ​which​ ​you​ ​provide​ ​the​ ​instructions​ ​for​ ​dynamically​ ​tracking​ ​specific​ ​game objects.
Aim
CinemachineComposer
This​ ​is​ ​a​ ​CinemachineComponent​ ​in​ ​the​ ​Aim​ ​section​ ​of​ ​the​ ​component​ ​pipeline.​ ​Its​ ​job​ ​is​ ​to​ ​aim the​ ​camera​ ​at​ ​the​ ​vcam’s​ ​LookAt​ ​target​ ​object,​ ​with​ ​configurable​ ​offsets,​ ​damping,​ ​and composition​ ​rules. The​ ​composer​ ​does​ ​not​ ​change​ ​the​ ​camera’s​ ​position.​ ​It​ ​will​ ​only​ ​pan​ ​and​ ​tilt​ ​the​ ​camera​ ​where it​ ​is,​ ​in​ ​order​ ​to​ ​get​ ​the​ ​desired​ ​framing.​ ​To​ ​move​ ​the​ ​camera,​ ​you​ ​have​ ​to​ ​use​ ​the​ ​virtual camera’s​ ​Body​ ​section. The​ ​vcam’s​ ​LookAt​ ​target​ ​is​ ​the​ ​Composer’s​ ​target.​ ​​ ​Common​ ​Composer​ ​targets:​ ​include​ ​bones on​ ​a​ ​character​ ​like​ ​the​ ​upper​ ​spine​ ​or​ ​head​ ​bone,​ ​vehicles,​ ​or​ ​dummy​ ​objects​ ​which​ ​are controlled​ ​or​ ​animated​ ​programmatically.
CinemachineGroupComposer
This​ ​is​ ​a​ ​CinemachineComponent​ ​in​ ​the​ ​Aim​ ​section​ ​of​ ​the​ ​component​ ​pipeline.​ ​Its​ ​job​ ​is​ ​to​ ​aim the​ ​camera​ ​at​ ​a​ ​target​ ​object,​ ​with​ ​configurable​ ​offsets,​ ​damping,​ ​and​ ​composition​ ​rules. In​ ​addition,​ ​if​ ​the​ ​target​ ​is​ ​a​ ​CinemachineTargetGroup,​ ​the​ ​behaviour​ ​will​ ​adjust​ ​the​ ​FOV​ ​and the​ ​camera​ ​distance​ ​to​ ​ensure​ ​that​ ​the​ ​entire​ ​group​ ​of​ ​targets​ ​is​ ​framed​ ​properly.

Body
CinemachineTransposer
This​ ​is​ ​a​ ​CinemachineComponent​ ​in​ ​the​ ​Body​ ​section​ ​of​ ​the​ ​component​ ​pipeline.​ ​Its​ ​job​ ​is​ ​to position​ ​the​ ​camera​ ​in​ ​a​ ​fixed​ ​relationship​ ​to​ ​the​ ​vcam’s​ ​Follow​ ​target​ ​object,​ ​with​ ​offsets​ ​and damping. The​ ​Tansposer​ ​will​ ​only​ ​change​ ​the​ ​camera’s​ ​position​ ​in​ ​space.​ ​It​ ​will​ ​not​ ​re-orient​ ​or​ ​otherwise aim​ ​the​ ​camera.​ ​To​ ​to​ ​that,​ ​you​ ​need​ ​to​ ​instruct​ ​the​ ​vcam​ ​in​ ​the​ ​Aim​ ​section​ ​of​ ​its​ ​pipeline. Transposer​ ​is​ ​a​ ​component​ ​which​ ​mounts​ ​a​ ​camera​ ​to​ ​any​ ​object.​ ​It​ ​has​ ​a​ ​number​ ​of advantages​ ​over​ ​just​ ​putting​ ​the​ ​camera​ ​under​ ​the​ ​object​ ​you​ ​want​ ​to​ ​have​ ​the​ ​camera​ ​follow. Hood​ ​Cam,​ ​Door​ ​Cam,​ ​POV​ ​Cam,​ ​Missile​ ​Cam​ ​-​ ​if​ ​you​ ​want​ ​to​ ​mount​ ​the​ ​camera​ ​to​ ​something, use​ ​Transposer.
CinemachineFramingTransposer
这是一个body中的一个section,它的作用是不断纠正相机与Follow target object的位置关系,它功能只能改变相机的位置,为了使它运作得更恰当,LooKAt target必须为null
CinemachineTrackedDolly
A​ ​Cinemachine​ ​Virtual​ ​Camera​ ​Body​ ​component​ ​that​ ​constrains​ ​camera​ ​motion​ ​to​ ​a CinemachinePath​ ​or​ ​a​ ​CinemachineSmoothPath.​ ​The​ ​camera​ ​can​ ​move​ ​along​ ​the​ ​path. This​ ​behaviour​ ​can​ ​operate​ ​in​ ​two​ ​modes:​ ​manual​ ​positioning,​ ​and​ ​Auto-Dolly​ ​positioning.​ ​In Manual​ ​mode,​ ​the​ ​camera’s​ ​position​ ​is​ ​specified​ ​by​ ​animating​ ​the​ ​Path​ ​Position​ ​field.​ ​In Auto-Dolly​ ​mode,​ ​the​ ​Path​ ​Position​ ​field​ ​is​ ​animated​ ​automatically​ ​every​ ​frame​ ​by​ ​finding​ ​the position​ ​on​ ​the​ ​path​ ​that’s​ ​closest​ ​to​ ​the​ ​virtual​ ​camera’s​ ​Follow​ ​target.
CinemachineOrbitalTransposer
This​ ​is​ ​a​ ​CinemachineComponent​ ​in​ ​the​ ​the​ ​Body​ ​section​ ​of​ ​the​ ​component​ ​pipeline.​ ​Its​ ​job​ ​is​ ​to position​ ​the​ ​camera​ ​in​ ​a​ ​variable​ ​relationship​ ​to​ ​a​ ​the​ ​vcam’s​ ​Follow​ ​target​ ​object,​ ​with​ ​offsets and​ ​damping. This​ ​component​ ​is​ ​typically​ ​used​ ​to​ ​implement​ ​a​ ​camera​ ​that​ ​follows​ ​its​ ​target.​ ​It​ ​can​ ​accept player​ ​input​ ​from​ ​an​ ​input​ ​device,​ ​which​ ​allows​ ​the​ ​player​ ​to​ ​dynamically​ ​control​ ​the​ ​relationship between​ ​the​ ​camera​ ​and​ ​the​ ​target,​ ​for​ ​example​ ​with​ ​a​ ​joystick.
Noise
CinemachineBasicMultiChannelPerlin
As​ ​a​ ​part​ ​of​ ​the​ ​Cinemachine​ ​Pipeline​ ​implementing​ ​the​ ​Noise​ ​stage,​ ​this​ ​component​ ​adds Perlin​ ​Noise​ ​to​ ​the​ ​Camera​ ​state,​ ​in​ ​the​ ​Correction​ ​channel. The​ ​noise​ ​is​ ​created​ ​by​ ​using​ ​a​ ​predefined​ ​noise​ ​profile​ ​asset.​ ​This​ ​defines​ ​the​ ​shape​ ​of​ ​the noise​ ​over​ ​time.​ ​You​ ​can​ ​scale​ ​this​ ​in​ ​amplitude​ ​or​ ​in​ ​time,​ ​to​ ​produce​ ​a​ ​large​ ​family​ ​of​ ​different noises​ ​using​ ​the​ ​same​ ​profile. The​ ​Noise​ ​is​ ​a​ ​multi-layered​ ​Perlin​ ​noise​ ​function​ ​which​ ​is​ ​applied​ ​after​ ​the​ ​Composer​ ​and​ ​adds additional​ ​transforms.​ ​It​ ​has​ ​controls​ ​for​ ​Position​ ​and​ ​Orientation.​ ​You​ ​can​ ​add​ ​as​ ​many​ ​layers as​ ​you​ ​want​ ​by​ ​increasing​ ​the​ ​profile’s​ ​Size​ ​value。可以模拟相机手持抖动效果
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值