Image Sampler
Image Sampler 对 Input Asset 的值(亮度/暗度)进行采样,然后输出 0..1 之间的值(其中黑色 = 0,白色 = 1)。支持图像、图像序列和视频。
出于性能原因,Image Sampler 不支持滤镜和着色器。它读取原始图像数据,因此任何调整(色阶、色调等)都需要对原始资产进行修改,并在 Assets Window 中重新加载。如需更大的灵活性但以牺牲性能为代价,请查看 Material Sampler。
Position - 设置 Image Sampler 的位置。0,0 位于 Composition 的中心。
Rotation - 设置 Image Sampler 的旋转角度(度)。
Scale - 设置 Image Sampler 的缩放比例。
Skew - 沿 X 或 Y 轴倾斜或剪切 Image Sampler。
Pivot - 为 Image Sampler 定义轴心点。这在动画化旋转和缩放时很有用。
Opacity - 设置 Image Sampler 的预览不透明度。请注意 - Image Sampler 不会包含在渲染中。
Enabled - 当取消勾选时,Image Sampler 将输出值 1(结果等同于没有 Image Sampler)。在 Scene Window 中切换可见性图标(眼睛)只会隐藏 Image Sampler,而此属性会影响其输出。
Strength - 决定 Image Sampler 输出的强度。
Invert Value - 当勾选时,图像的输出将被反转,使低值输出 1,高值输出 0(例如白色 = 0,黑色 = 1)。
Image Asset - 连接一个图像资产。可以直接来自 Assets Window 或通过 Asset Array 或 Asset from Smart Folder。支持静态图像、图像序列和视频。
Tiling - 决定在 Image Asset 边界处的行为。
- Clamp - 使用 Image Asset 边缘的值。
- Repeat - 重复/循环 Image Asset。
- Decal - 裁剪 Image Asset。
Looping - 当使用图像序列或视频作为 Image Asset 时,循环播放序列/视频。
Offset - 对输出进行加减操作。
Channel - 选择要采样的颜色通道:
- RGB - 采样所有 RGB 通道。
- Red - 采样红色通道。
- Green - 采样绿色通道。
- Blue - 采样蓝色通道。
- Alpha - 采样 Alpha 通道。
- Luminance - 采样图像的亮度。
Time - 连接到 Composition 的 Time,用于驱动视频或图像序列的帧号。
- 将图像导入 Assets Window。
- 创建一个 Image Sampler。
- 将图像从 Assets Window 拖入 Image Sampler 的 Image Asset。
- 创建一个 Rectangle。
- 选中 Rectangle,点击 Shelf 中的 Duplicator 项。
- 连接 imageSampler.id→duplicator.shapeScale。
Shape 的大小将根据图像的亮度进行缩放。请注意 - 将 Image Sampler 的 Opacity 设置为 0 可以从 Viewport 中隐藏它。