使用 MAXScript 对模拟进行基准测试

ProfileTools 是隐藏界面,可以通过 MAXScript 访问。通过它,您可以查看 MassFX 引擎计算模拟中的帧或范围所需的时间。这可以帮助您了解在引擎中对费用施加的某些设置,这可潜在导致一个更加优化和通用的模拟。

属性

.useProfileTools : bool : Read|Write

方法

<float>getCalcTime <time>time

<float>getCalcTimeForInterval <time>timeStart <time>timeEnd

用法和示例

-- 为变量指定“MassFX 世界”辅助对象

PFX = $'MassFX 世界 01'

OK

-- 检查以查看 ProfileTools 是否已启用

PFX.useProfileTools

false

-- 启用配置文件工具

PFX.useProfileTools = true

true

-- 检查当前帧的模拟时间

PFX.getCalcTime currentTime

-- 检查动画范围的模拟时间

PFX.getCalcTimeForInterval animationRange.start animationRange.end