本页内容

DepthOfFieldHQBlur QML Type

基于深度的模糊效果。更多...

Import Statement: import QtQuick3D.Effects 6.12
Status: Deprecated since 6.5

自 QtQuick3D.Effects 6.5 起,此类型已被废弃。我们强烈建议不要在新代码中使用它。

属性

详细说明

请改用ExtendedSceneEnvironment 。

警告: 从 Qt 6.5 开始,QtQuick3D.Effects中所有 现成的独立特效均 被视为已弃用。若要对场景应用景深特效,请改用ExtendedSceneEnvironment 。

展示景深虚化效果的场景对比

DepthOfFieldHQBlur 效果会根据图像各区域与相机之间距离的偏差,对这些区域执行渐变模糊处理。

为了使该特效发挥最佳效果,您需要调整场景中摄像机的clipFar 和clipNear 属性以构图。理想情况下,应将clipNear 设置为尽可能大的值,并将clipFar 设置为尽可能小的值。接下来,调整特效的属性以获得所需的效果。

例如,当“focusDistance ”设置为100 ,而“focusRange ”设置为20 时,这意味着距离摄像机90到110单位范围内的所有物体都将完全清晰, 距离在70-90和110-130单位之间的物体将呈现不同程度的模糊,而距离小于70单位或大于130单位的物体则会完全模糊。

另请参阅 TiltShift 。

属性文档

blurAmount : real

失焦时的模糊强度。合理的取值范围为[1...10] 。默认值为4 。

focusDistance : real

内容在相机前处于完美对焦状态时的距离。默认值为600 。

focusRange : real

在focusDistance 周围,物体完全处于焦点范围内的距离。此后,焦点会以相同的距离向近处和远处逐渐模糊,直至完全失焦。默认值为100 。

© 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.