元编程参考文档

烟雾

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
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
烟雾
所属包
物理模拟