元編程參考文件

煙霧

32 個節點

本頁內容 32

新增餘燼

函數

加入餘燼後的場景:在火的上方生出的發光小點,隨著氣體上升、打旋,從黃冷卻成紅,然後熄滅。它們出現在圖片和序列圖裡。

簽名
新增餘燼 -> Smoke Scene Description
    場景: Smoke Scene Description
    名稱: 文字
    位置: Vector3d
    大小: Vector3d
    速率: 數字
    壽命: 數字
    開始: 數字
    結束: 數字
SmokeSceneDescription AddEmbers(
    SmokeSceneDescription scene,
    string name,
    Vector3d position,
    Vector3d size,
    double rate = 3000,
    double lifetime = 4,
    double start = 0,
    double end = 0)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
名稱文字—The embers' name, by which a session moves them (Move Source) and bursts them.
位置Vector3d—The middle of the box they are born in (m): just over the fire.
大小Vector3d—That box's size (m) along X, Y and Z: the fire's width, and a few centimetres high.
速率數字3000Embers per second.
壽命數字4How long an ember glows (s) at most.
開始數字0When they start (s).
結束數字0When they stop (s); 0: never.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

新增火

函數

給場景加一堆火:一個給出燃料的扁平燃燒器,燃料在它上方燒成火焰、熱和煙。

簽名
新增火 -> Smoke Scene Description
    場景: Smoke Scene Description
    名稱: 文字
    位置: Vector3d
    大小: Vector3d
    燃料: 數字
    開始: 數字
    結束: 數字
    按火的習性: 真否
SmokeSceneDescription AddFire(
    SmokeSceneDescription scene,
    string name,
    Vector3d position,
    Vector3d size,
    double fuel = 0.7,
    double start = 0,
    double end = 0,
    bool behaveAsFire = true)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
名稱文字—The fire's name.
位置Vector3d—The burner's centre (m).
大小Vector3d—The burner's size (m) along X, Y and Z; a pan is wide and a few centimetres high.
燃料數字0.7How much fuel it gives (0.5 to 1 is a strong fire).
開始數字0When it lights (s).
結束數字0When it goes out (s); 0: never.
按火的習性真否TrueGive the scene's gas the behaviour that suits a fire: it rises less hard than plain hot smoke, cools faster, its smoke fades and it swirls more (Set Smoke Behaviour 0.4, 1.6, 0.3, 3). Off keeps the scene's own.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

新增障礙長方體

函數

給場景加一個實心長方體,氣體繞著它流。

簽名
新增障礙長方體 -> Smoke Scene Description
    場景: Smoke Scene Description
    名稱: 文字
    位置: Vector3d
    大小: Vector3d
SmokeSceneDescription AddObstacleBox(
    SmokeSceneDescription scene,
    string name,
    Vector3d position,
    Vector3d size)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
名稱文字—The solid's name.
位置Vector3d—Its centre (m).
大小Vector3d—Its size (m) along X, Y and Z.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

新增障礙球

函數

給場景加一個實心球,氣體繞著它流。

簽名
新增障礙球 -> Smoke Scene Description
    場景: Smoke Scene Description
    名稱: 文字
    位置: Vector3d
    半徑: 數字
SmokeSceneDescription AddObstacleSphere(
    SmokeSceneDescription scene,
    string name,
    Vector3d position,
    double radius)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
名稱文字—The solid's name.
位置Vector3d—Its centre (m).
半徑數字—Its radius (m).

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

新增煙霧中的物體

函數

在箱子裡放進一個剛體後的場景,剛體由長方體、球、膠囊等物體節點做出。氣體繞著它流,也推動它:輕的物體被托起、吹走,重的物體立著不動,把煙柱分開。物體會下落,彼此碰撞,也與場景的固體碰撞,落在箱底上;箱子的四周對物體和對氣體一樣是敞開的。氣體把球、長方體和膠囊當作它們本來的形狀,把其他形狀當作包住它的長方體。

簽名
新增煙霧中的物體 -> Smoke Scene Description
    場景: Smoke Scene Description
    物體: Body Description
SmokeSceneDescription AddSmokeBody(
    SmokeSceneDescription scene,
    BodyDescription body)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
物體Body Description—The body. A static one stands where it is, as an obstacle does; a kinematic one is moved by a session's Move Solid.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

新增煙源

函數

給場景加一個冒煙的球:它讓球內保持一定的濃度和溫度,熱的會上升。

簽名
新增煙源 -> Smoke Scene Description
    場景: Smoke Scene Description
    名稱: 文字
    位置: Vector3d
    半徑: 數字
    濃度: 數字
    溫度(K): 數字
    開始: 數字
    結束: 數字
SmokeSceneDescription AddSmokeSource(
    SmokeSceneDescription scene,
    string name,
    Vector3d position,
    double radius = 0.2,
    double density = 1,
    double temperature = 450,
    double start = 0,
    double end = 0)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
名稱文字—The source's name.
位置Vector3d—Its centre (m).
半徑數字0.2Its radius (m).
濃度數字1The smoke it gives (1 is thick).
溫度(K)數字450Its temperature (K); air is at 293, and 450 rises briskly.
開始數字0When it starts (s).
結束數字0When it stops (s); 0: never.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

新增煙霧觸發器

函數

給場景的物體加入一個觸發器後的場景,觸發器由觸發器節點做出:到某一時刻,每隔一段時間,或者當一個物體碰到什麼、升過或落過某個高度、快過某個速度時,它推動一個物體、釋放一個被固定住的物體、生成一個物體的副本,或者移除一個物體。觸發器在物體的每一步之後按加入順序被檢查;它們做了什麼,在“煙霧中的物體”的事件裡。即時場景不接受“區域內有水”“引爆”“設定風”和“解除布料固定”,並且在這裡就說出來。

簽名
新增煙霧觸發器 -> Smoke Scene Description
    場景: Smoke Scene Description
    觸發器: Trigger Description
SmokeSceneDescription AddSmokeTrigger(
    SmokeSceneDescription scene,
    TriggerDescription trigger)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
觸發器Trigger Description—The trigger. A spawn that repeats has room for 32 bodies the gas flows round; later ones still fall and collide.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

新增火花

函數

加入火花後的場景:從一點丟擲的發光亮線,不受氣體帶動,會落下,並在地面和固體上彈跳。火在噼啪作響,砂輪,引信。它們出現在圖片和序列圖裡。

簽名
新增火花 -> Smoke Scene Description
    場景: Smoke Scene Description
    名稱: 文字
    位置: Vector3d
    方向: Vector3d
    速率: 數字
    散佈: 數字
    壽命: 數字
    開始: 數字
    結束: 數字
SmokeSceneDescription AddSparks(
    SmokeSceneDescription scene,
    string name,
    Vector3d position,
    Vector3d direction,
    double rate = 4000,
    double spread = 1,
    double lifetime = 1.5,
    double start = 0,
    double end = 0)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
名稱文字—The sparks' name, by which a session moves them (Move Source) and bursts them.
位置Vector3d—Where they come from (m).
方向Vector3d—The velocity they are thrown with (m/s).
速率數字4000Sparks per second.
散佈數字1The speed of the random part of their velocity (m/s).
壽命數字1.5How long a spark glows (s).
開始數字0When they start (s).
結束數字0When they stop (s); 0: never.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

匯出煙霧序列圖

函數

執行場景,把它的序列圖寫成帶透明度的 PNG,並在旁邊用文字寫出它的佈局;返回 PNG 的路徑。

簽名
匯出煙霧序列圖 -> 文字
    場景: Smoke Scene Description
    路徑: 文字
    時長: 數字
    眼睛: Vector3d
    目標: Vector3d
    列數: 整數
    行數: 整數
    幀大小: 整數
    視場角: 數字
string ExportSmokeFlipbook(
    SmokeSceneDescription scene,
    string path,
    double duration,
    Vector3d eye,
    Vector3d target,
    int columns = 8,
    int rows = 8,
    int frameSize = 256,
    double fieldOfView = 40)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
路徑文字—The PNG to write; its folder is created if missing.
時長數字—How long to run (s).
眼睛Vector3d—Where the camera stands (m).
目標Vector3d—What it looks at (m).
列數整數8Frames in a row.
行數整數8Rows of frames.
幀大小整數256A frame's width and height in pixels.
視場角數字40The camera's vertical field of view in degrees.

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

匯出帶運動的煙霧序列圖

函數

執行場景,把它的序列圖連同運動一起寫出:各幀寫成帶透明度的 PNG,運動寫成旁邊的第二張 PNG(同名,以 .motion.png 結尾),再用一個文字檔案寫出佈局、運動的尺度以及播放器如何使用它。返回兩張 PNG 的路徑,各幀的在前。

簽名
匯出帶運動的煙霧序列圖 -> 文字陣列
    場景: Smoke Scene Description
    路徑: 文字
    時長: 數字
    眼睛: Vector3d
    目標: Vector3d
    列數: 整數
    行數: 整數
    幀大小: 整數
    視場角: 數字
string[] ExportSmokeFlipbookWithMotion(
    SmokeSceneDescription scene,
    string path,
    double duration,
    Vector3d eye,
    Vector3d target,
    int columns = 8,
    int rows = 8,
    int frameSize = 256,
    double fieldOfView = 40)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
路徑文字—The frames' PNG to write; its folder is created if missing.
時長數字—How long to run (s).
眼睛Vector3d—Where the camera stands (m).
目標Vector3d—What it looks at (m).
列數整數8Frames in a row.
行數整數8Rows of frames.
幀大小整數256A frame's width and height in pixels.
視場角數字40The camera's vertical field of view in degrees.

返回

結果文字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

匯出煙霧 VDB

函數

執行場景,把每一幀的氣體寫成一個 OpenVDB 檔案,裡面有濃度、溫度和火焰三個體積;返回寫出的檔案。

簽名
匯出煙霧 VDB -> 文字陣列
    場景: Smoke Scene Description
    資料夾: 文字
    時長: 數字
    每秒幀數: 數字
    字首: 文字
string[] ExportSmokeVdb(
    SmokeSceneDescription scene,
    string folder,
    double duration = 2,
    double framesPerSecond = 24,
    string prefix = "smoke")

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
資料夾文字—The folder; created if missing.
時長數字2How long to run (s).
每秒幀數數字24Frames per second of simulated time.
字首文字smokeFile name prefix: files are prefix.0001.vdb and on.

返回

結果文字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

匯出煙霧 VDB 幀

函數

把一次記錄執行中的一幀寫成一個 OpenVDB 檔案,並返回路徑。

簽名
匯出煙霧 VDB 幀 -> 文字
    結果: Smoke Result
    幀: 整數
    路徑: 文字
string ExportSmokeVdbFrame(
    SmokeResult result,
    int frame,
    string path)

參數

名稱型別預設值說明
結果Smoke Result—The run.
幀整數—The recorded frame, from 0.
路徑文字—The file to write; its folder is created if missing.

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

序列圖顏色

函數

序列圖的各幀:一張帶透明度的圖片,幀從左到右、行從上到下排列,顏色已預乘透明度。

簽名
序列圖顏色(序列圖: Flipbook Sheet) -> Pixel Image
PixelImage FlipbookColour(FlipbookSheet sheet)

參數

名稱型別預設值說明
序列圖Flipbook Sheet—A flipbook made with its motion.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

序列圖運動

函數

序列圖的運動,與它的各幀逐像素對應:紅色是該像素所顯示的東西到下一幀為止向右移動了多遠,綠色是向下移動了多遠,都寫成 0.5 + 0.5 × 位移 / 尺度,以幀寬和幀高為單位(所以兩個通道都是中灰就是靜止)。“序列圖運動尺度”給出這個尺度。在 A、B 兩幀之間進行到比例 t 時,播放器在 uv − t × 位移處讀 A,在 uv + (1 − t) × 位移處讀 B,各用各的位移,再按 t 混合兩者。

簽名
序列圖運動(序列圖: Flipbook Sheet) -> Pixel Image
PixelImage FlipbookMotion(FlipbookSheet sheet)

參數

名稱型別預設值說明
序列圖Flipbook Sheet—A flipbook made with its motion.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

序列圖運動尺度

函數

序列圖的運動圖在取值範圍兩端(紅或綠為 0 或 255)所代表的位移,以幀寬或幀高為單位,從一幀到下一幀。

簽名
序列圖運動尺度(序列圖: Flipbook Sheet) -> 數字
double FlipbookMotionScale(FlipbookSheet sheet)

參數

名稱型別預設值說明
序列圖Flipbook Sheet—A flipbook made with its motion.

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

即時模擬可用

函數

這臺機器能否執行即時求解器:需要一塊支援 Vulkan 的顯示卡。

簽名
即時模擬可用() -> 真否
bool IsRealtimeAvailable()

返回

結果真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

新建煙霧

函數

一箱靜止的空氣,立在地面上,煙和火就活在裡面:四周和頂部敞開,底面封閉。

簽名
新建煙霧 -> Smoke Scene Description
    大小: Vector3d
    位置: Vector3d
    單元大小: 數字
    稀疏: 真否
    半精度: 真否
SmokeSceneDescription NewSmoke(
    Vector3d size,
    Vector3d position,
    double cellSize = 0.05,
    bool sparse = false,
    bool halfPrecision = false)

參數

名稱型別預設值說明
大小Vector3d—The box's size (m) along X, Y and Z (up). It is made of whole cells counted in eights, so each side is rounded up to the next multiple of eight cells.
位置Vector3d—The middle of the box's floor (m).
單元大小數字0.05The size of a cell (m): the smallest detail the gas has. Halving it is eight times the cells.
稀疏真否FalseWork on and store only the parts of the box that hold something: for a large box that is mostly empty.
半精度真否FalseStore the gas in 16-bit numbers: two thirds of the memory and a faster step.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

即時模擬裝置

函數

即時求解器所用的顯示卡;沒有可用的顯示卡時,說明缺少什麼。

簽名
即時模擬裝置() -> 文字
string RealtimeDevice()

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

設定煙霧習性

函數

讓場景裡的氣體換一種習性:升得多猛,冷得多快,煙散得多快,渦旋多活躍。

簽名
設定煙霧習性 -> Smoke Scene Description
    場景: Smoke Scene Description
    浮力: 數字
    冷卻: 數字
    消散: 數字
    渦旋: 數字
SmokeSceneDescription SetSmokeBehaviour(
    SmokeSceneDescription scene,
    double buoyancy = 1,
    double cooling = 0.5,
    double fading = 0,
    double swirl = 2)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
浮力數字1How strongly hot gas rises (1 is air's own).
冷卻數字0.5How fast the gas loses its heat (per second).
消散數字0How fast smoke fades (per second; 0: it stays).
渦旋數字2How much small swirls are kept alive (0: none; 2 to 4: lively).

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

設定煙霧外觀

函數

讓場景裡的氣體在圖片和序列圖裡換一種樣子:煙有多厚,火有多亮,太陽在哪裡。

簽名
設定煙霧外觀 -> Smoke Scene Description
    場景: Smoke Scene Description
    厚度: 數字
    亮度: 數字
    太陽方向: Vector3d
SmokeSceneDescription SetSmokeLook(
    SmokeSceneDescription scene,
    double thickness,
    double brightness,
    Vector3d sunDirection)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
厚度數字—How thick the smoke looks: what a metre of it takes from the light.
亮度數字—How bright the fire looks.
太陽方向Vector3d—Where the sun stands, as a direction towards it.

返回

結果Smoke Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

模擬煙霧

函數

把場景執行一段時間,並記錄每一幀的氣體:煙、溫度和火焰,供體積節點讀取。

簽名
模擬煙霧 -> Smoke Result
    場景: Smoke Scene Description
    時長: 數字
    每秒幀數: 數字
    每隔幾幀保留: 整數
SmokeResult SimulateSmoke(
    SmokeSceneDescription scene,
    double duration = 2,
    double framesPerSecond = 30,
    int keepEvery = 1)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
時長數字2How long to run (s).
每秒幀數數字30Frames per second of simulated time.
每隔幾幀保留整數1Record every frame (1), every second one (2) and so on; the last frame is always recorded.

返回

結果Smoke Result
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧量

函數

某一記錄幀裡全部的煙:摺合成濃度為 1 的煙的體積(立方米)。

簽名
煙霧量(結果: Smoke Result, 幀: 整數) -> 數字
double SmokeAmount(SmokeResult result, int frame)

參數

名稱型別預設值說明
結果Smoke Result—The run.
幀整數—The recorded frame, from 0.

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧中的物體

函數

一次記錄執行中,場景的物體和固體的運動,作為一個結果:結果節點(物體位置、物體路徑、物體網格)讀取它,三維檢視播放它。它的幀就是這次執行的幀:這裡的第 3 幀,就是“煙霧濃度體積”第 3 幀的那一刻。

簽名
煙霧中的物體(結果: Smoke Result) -> Simulation Result
SimulationResult SmokeBodies(SmokeResult result)

參數

名稱型別預設值說明
結果Smoke Result—The run of a scene that has bodies.

返回

結果Simulation Result
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧濃度體積

函數

某一記錄幀的煙,作為一個體積:一個單元一個體素,沒有煙的單元被省略。

簽名
煙霧濃度體積(結果: Smoke Result, 幀: 整數) -> VdbFloatGrid
VdbFloatGrid SmokeDensityVolume(SmokeResult result, int frame)

參數

名稱型別預設值說明
結果Smoke Result—The run.
幀整數—The recorded frame, from 0.

返回

結果VdbFloatGrid
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧火焰體積

函數

某一記錄幀的氣體燒得多亮,作為一個體積;沒有火焰的單元被省略。

簽名
煙霧火焰體積(結果: Smoke Result, 幀: 整數) -> VdbFloatGrid
VdbFloatGrid SmokeFlameVolume(SmokeResult result, int frame)

參數

名稱型別預設值說明
結果Smoke Result—The run.
幀整數—The recorded frame, from 0.

返回

結果VdbFloatGrid
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧序列圖

函數

執行場景,在執行期間均勻地取出只有氣體的幀,拼成一張帶透明度的圖片:遊戲用來播放煙和火的序列圖。

簽名
煙霧序列圖 -> Pixel Image
    場景: Smoke Scene Description
    時長: 數字
    眼睛: Vector3d
    目標: Vector3d
    列數: 整數
    行數: 整數
    幀大小: 整數
    視場角: 數字
PixelImage SmokeFlipbook(
    SmokeSceneDescription scene,
    double duration,
    Vector3d eye,
    Vector3d target,
    int columns = 4,
    int rows = 4,
    int frameSize = 128,
    double fieldOfView = 40)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
時長數字—How long to run (s).
眼睛Vector3d—Where the camera stands (m).
目標Vector3d—What it looks at (m).
列數整數4Frames in a row.
行數整數4Rows of frames.
幀大小整數128A frame's width and height in pixels.
視場角數字40The camera's vertical field of view in degrees.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

帶運動的煙霧序列圖

函數

執行場景,做出它的序列圖,同時做出它的運動:在每一幀旁邊,記下每個像素所顯示的東西到下一幀為止在幀裡移動了多遠,取自氣體自身的速度。遊戲把序列圖放得比拍攝時慢的時候,按它把每一幀滑向下一幀,而不是讓兩幀互相淡入淡出,那樣會有重影。“序列圖顏色”和“序列圖運動”讀出這兩張圖;兩者來自同一次執行,所以要一起做。

簽名
帶運動的煙霧序列圖 -> Flipbook Sheet
    場景: Smoke Scene Description
    時長: 數字
    眼睛: Vector3d
    目標: Vector3d
    列數: 整數
    行數: 整數
    幀大小: 整數
    視場角: 數字
FlipbookSheet SmokeFlipbookWithMotion(
    SmokeSceneDescription scene,
    double duration,
    Vector3d eye,
    Vector3d target,
    int columns = 4,
    int rows = 4,
    int frameSize = 128,
    double fieldOfView = 40)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
時長數字—How long to run (s).
眼睛Vector3d—Where the camera stands (m).
目標Vector3d—What it looks at (m).
列數整數4Frames in a row.
行數整數4Rows of frames.
幀大小整數128A frame's width and height in pixels.
視場角數字40The camera's vertical field of view in degrees.

返回

結果Flipbook Sheet
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧幀數

函數

一次執行記錄了多少幀。

簽名
煙霧幀數(result: Smoke Result) -> 整數
int SmokeFrameCount(SmokeResult result)

參數

名稱型別預設值說明
resultSmoke Result—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧幀時間

函數

某一記錄幀的模擬時間(秒)。

簽名
煙霧幀時間(result: Smoke Result, frame: 整數) -> 數字
double SmokeFrameTime(SmokeResult result, int frame)

參數

名稱型別預設值說明
resultSmoke Result—
frame整數—

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧高度

函數

某一記錄幀的煙升到了多高:看得見煙的最高單元離箱底的高度(米)。

簽名
煙霧高度(結果: Smoke Result, 幀: 整數) -> 數字
double SmokeHeight(SmokeResult result, int frame)

參數

名稱型別預設值說明
結果Smoke Result—The run.
幀整數—The recorded frame, from 0.

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧圖片

函數

把場景執行一段時間,然後給它拍一張照:地面、固體和氣體,由太陽照亮。

簽名
煙霧圖片 -> Pixel Image
    場景: Smoke Scene Description
    時間: 數字
    眼睛: Vector3d
    目標: Vector3d
    寬度: 整數
    高度: 整數
    視場角: 數字
PixelImage SmokePicture(
    SmokeSceneDescription scene,
    double time,
    Vector3d eye,
    Vector3d target,
    int width = 640,
    int height = 480,
    double fieldOfView = 40)

參數

名稱型別預設值說明
場景Smoke Scene Description—The scene.
時間數字—How long to run before the picture (s).
眼睛Vector3d—Where the camera stands (m).
目標Vector3d—What it looks at (m).
寬度整數640The picture's width in pixels.
高度整數480The picture's height in pixels.
視場角數字40The camera's vertical field of view in degrees.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬

煙霧溫度體積

函數

某一記錄幀的氣體比周圍空氣熱多少(K),作為一個體積。

簽名
煙霧溫度體積(結果: Smoke Result, 幀: 整數) -> VdbFloatGrid
VdbFloatGrid SmokeTemperatureVolume(
    SmokeResult result,
    int frame)

參數

名稱型別預設值說明
結果Smoke Result—The run.
幀整數—The recorded frame, from 0.

返回

結果VdbFloatGrid
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
煙霧
所屬包
物理模擬