本页内容

BakedLightmap QML Type

指定模型的烘焙光照贴图设置。更多...

Import Statement: import QtQuick3D
Since: Qt 6.4
Inherits:

QtObject

属性

详细说明

BakedLightmap 对象可用于实现:

  • 在烘焙过程中持久化存储烘焙光照贴图数据,或
  • 在运行时加载先前生成并存储的光照贴图。

当烘焙光照贴图时,将“usedInBakedLighting ”设置为 true 的模型会被视为光线追踪场景的一部分,这意味着该模型的几何体和材质会参与直接和间接照明的计算。 但仅凭这一点并不能自动生成(包括对反弹间接光照的完整计算)并最终为该模型保存光照贴图。要实现这一点,该模型还需与一个已设置唯一键的“enabled ”BakedLightmap对象相关联。

在正常模式下,同一个 BakedLightmap 对象表示该模型拥有光照贴图数据,引擎应尝试(基于唯一键)加载该数据并在渲染时使用它。

有关如何烘焙光照贴图的更多信息,请参阅Lightmapper 文档。

注意:截至 Qt 6.4 版本,光照贴图烘焙功能尚处于早期技术预览阶段。未来版本中,其功能、质量和 API 可能会发生变化。

另请参阅 Lightmapper 和Model::usedInBakedLighting 。

属性文档

enabled : bool

当该选项为 false 时,即使将 `key ` 设置为非空值,在光照贴图烘焙过程中也不会保存为该模型生成的光照贴图。

默认值为 true。

key : string

当该字段不为空且“enabled ”为真时,在光照贴图烘焙过程中,为该模型生成的光照贴图将被持久化存储。场景中的其他模型不得使用相同的键。

默认值为空。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.