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 中隱藏它。