汽车配置器
一个展示如何使用 Qt Quick 3D 摄像头、扩展场景环境以及Qt Quick 3D 。

“汽车配置器”展示了汽车在不同场景环境中的外观以及多种颜色方案。该应用采用Qt Qml实现,并依赖于多个Qt模块,其中最突出的是 Qt Quick 以及 Qt Quick 3D。
运行示例
您可以通过以下方式运行该示例:
- Qt Creator
打开Welcome 模式,并从Examples 中选择该示例。有关更多信息,请参阅Qt Creator :教程:构建与运行。
- Qt Extension for Visual Studio Code
在Command Palette 中运行Qt: Open Qt examples 命令,并从列表中选择该示例。有关详细信息,请参阅Qt Extension for Visual Studio Code :教程:构建和运行。
平台注意事项
该示例会在运行时从互联网服务器下载一些资源。因此,首次启动时需要连接互联网。
您可以通过两种模式与汽车模型进行交互:
- 演示模式
- 用户模式
演示模式
摄像机视角会沿着不同的路径移动,并展示汽车的不同视角。
用户模式
用户可以使用鼠标或触摸操作围绕车辆旋转。
重置摄像头
摄像机将移动到初始位置。
场景环境
本示例提供四种场景环境:
- 车库
- 沙漠
- 动画
- 工作室
车库环境
车库环境作为默认场景,提供了一个简洁、工业风格的展示空间:
ExtendedSceneEnvironment {
id: showhall
glowBloom: 0
glowStrength: 0
glowEnabled: false
depthOfFieldFocusDistance: 600
depthOfFieldFocusRange: 627
depthOfFieldBlurAmount: 19.97
depthOfFieldEnabled: false
exposure: 1.2
lightProbe: _Hall
backgroundMode: SceneEnvironment.SkyBox
tonemapMode: SceneEnvironment.TonemapModeLinear
probeExposure: 1
depthPrePassEnabled: false
depthTestEnabled: true
antialiasingMode: SceneEnvironment.MSAA
antialiasingQuality: root.perfMode ? SceneEnvironment.Medium : SceneEnvironment.VeryHigh
clearColor: "#000000"
probeHorizon: 0.5
Texture {
id: _Hall
source: root.downloadBase + "/content/images/HDR/_Hall.ktx"
mipFilter: Texture.Linear
scaleV: 2
}
temporalAAEnabled: false
}沙漠环境
沙漠环境采用HDR穹顶照明、大气雾效以及特制的地面几何结构:
ExtendedSceneEnvironment {
id: desert
lightProbe: _Desert
glowStrength: 2
glowBloom: 0.11191
glowEnabled: true
depthPrePassEnabled: false
probeExposure: btnRain.checked ? 1.0 : 1.5
tonemapMode: SceneEnvironment.TonemapModeLinear
backgroundMode: SceneEnvironment.SkyBox
depthTestEnabled: true
antialiasingMode: SceneEnvironment.MSAA
antialiasingQuality: root.perfMode ? SceneEnvironment.Medium : SceneEnvironment.VeryHigh
clearColor: "#000000"
probeHorizon: 0.5
temporalAAEnabled: false
fog: Fog {}
}动态环境
动态环境通过视频墙效果展示动态内容:
ExtendedSceneEnvironment {
id: videoRoom
aoSoftness: 0
aoDistance: 0
probeExposure: 1
tonemapMode: SceneEnvironment.TonemapModeLinear
antialiasingMode: SceneEnvironment.MSAA
antialiasingQuality: root.perfMode ? SceneEnvironment.Medium : SceneEnvironment.VeryHigh
clearColor: "#000000"
depthPrePassEnabled: false
backgroundMode: SceneEnvironment.Color
depthTestEnabled: true
probeHorizon: 0
Vignette {
id: vignette
vignetteStrength: 15
vignetteColor: Qt.vector3d(0, 0, 0)
}
temporalAAEnabled: false
}演播室环境
演播室环境提供了一个光线可控、整洁专业的演示场景:
ExtendedSceneEnvironment {
id: studio
aoEnabled: false
antialiasingQuality: SceneEnvironment.VeryHigh
antialiasingMode: SceneEnvironment.MSAA
tonemapMode: SceneEnvironment.TonemapModeLinear
probeExposure: 1
probeHorizon: 1
clearColor: "#000000"
temporalAAEnabled: false
depthTestEnabled: true
backgroundMode: SceneEnvironment.Color
depthPrePassEnabled: false
}车身颜色
该车共有四种颜色可选:
- 白色
- 黑色
- 黄色
- 红色
车灯
您可以打开和关闭汽车的车灯。
源文件
另请参阅 所有 Qt 示例。
© 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.