QtQuick3D/Qt Design Studio GLTF 导入 Material 看起来不对
QtQuick3D / Qt Design Studio GLTF import Material looks wrong
我发现 this 适合 Blender 的漂亮汽车座椅,然后将整个场景导出为 GTLF2.0,并通过 Qt Design Studio 导入为 QML 资产。
我遇到了一些时间线问题,我手动修复了这个问题,但是 Material 看起来不对,如图所示。
我用 GLTF Onlineviewer 检查了相同的 GLTF2.0 文件 Link,看起来与 Blender 相同。
后来我用其他 GLTF Onlineviewer 检查 Link 在这里我有同样的问题。
问题:
- 有人知道或给我提示哪个值可能是问题所在
制造商?
- 不会是雷电问题吧?
生成的 Qml 文件:
import QtQuick3D 1.15
import QtQuick 2.15
import QtQuick.Timeline 1.0
Node {
id: rOOT
property alias currentFrame: timeline0.currentFrame
Node {
id: light
x: 407.625
y: 590.386
z: -100.545
eulerRotation.x: -132.466
eulerRotation.y: 72.7792
eulerRotation.z: -169.256
scale.x: 1
scale.y: 1
scale.z: 1
PointLight {
id: light_Orientation
eulerRotation.x: -90
color: "#ffffffff"
brightness: 10000
quadraticFade: 1
}
}
Node {
id: camera
x: 524.195
y: 308.297
z: -485.887
eulerRotation.x: -105.604
eulerRotation.y: 44.346
eulerRotation.z: -179.999
PerspectiveCamera {
id: camera_Orientation
eulerRotation.x: -90
clipNear: 0.1
clipFar: 100
fieldOfView: 39.5978
fieldOfViewOrientation: Camera.Horizontal
}
}
Node {
id: empty_002
Model {
id: node01_Base
y: 3.23133
z: 21.8115
source: "meshes/node01_Base.mesh"
PrincipledMaterial {
id: plastico_Negro_material
baseColor: "#ff010101"
metalness: 0
roughness: 0.8
normalMap: Texture {
source: "maps/0.png"
}
cullMode: Material.NoCulling
}
materials: [
plastico_Negro_material
]
}
Model {
id: node02_Base_rim
y: 3.23133
z: 21.8115
eulerRotation.z: 180
scale.x: 0.121224
scale.y: 0.361819
scale.z: 1.3171
source: "meshes/node02_Base_rim.mesh"
PrincipledMaterial {
id: aluminio_galvanizado_material
baseColor: "#ff383838"
roughness: 0.5
cullMode: Material.NoCulling
}
materials: [
aluminio_galvanizado_material
]
}
Model {
id: node03_Base_controls
eulerRotation.x: 8.46812
scale.x: 0.0367964
scale.y: 0.271225
scale.z: 0.271225
source: "meshes/node03_Base_controls.mesh"
PrincipledMaterial {
id: aluminio_negro_material
baseColor: "#ff080808"
roughness: 0.5
cullMode: Material.NoCulling
}
materials: [
aluminio_galvanizado_material,
aluminio_negro_material
]
}
Model {
id: node04_Bottom_seat
y: 32.6284
tessellationMode: Model.NPatch
receivesShadows: false
isWireframeMode: false
source: "meshes/node04_Bottom_seat.mesh"
PrincipledMaterial {
id: cUERO_NEGRO_material
baseColor: "#ff534d30"
metalness: 0
roughness: 0.389465
normalMap: Texture {
source: "maps/0.png"
tilingModeHorizontal: Texture.Repeat
tilingModeVertical: Texture.Repeat
}
cullMode: Material.NoCulling
}
materials: cUERO_NEGRO_material
}
Model {
id: node05_Bottom_sides
source: "meshes/node05_Bottom_sides.mesh"
materials: cUERO_NEGRO_material
}
Model {
id: node06_Back_seat
y: -7.04048
z: 6.17094
eulerRotation.x: -1.59834
source: "meshes/node06_Back_seat.mesh"
materials: cUERO_NEGRO_material
}
Model {
id: node07_Seat_back_sides
source: "meshes/node07_Seat_back_sides.mesh"
materials: cUERO_NEGRO_material
}
Model {
id: node08_Upper_neck
y: 222.546
z: 199.645
source: "meshes/node08_Upper_neck.mesh"
materials: cUERO_NEGRO_material
}
Model {
id: node09_Header
isWireframeMode: true
source: "meshes/node09_Header.mesh"
materials: cUERO_NEGRO_material
}
}
Timeline {
id: timeline0
startFrame: 0
endFrame: 30
currentFrame: 0
enabled: true
animations: [
TimelineAnimation {
duration: 30
from: 0
to: 30
running: true
}
]
KeyframeGroup {
target: empty_002
property: "position"
Keyframe {
frame: 0
value: Qt.vector3d(0, 0, 0)
}
}
KeyframeGroup {
target: empty_002
property: "eulerRotation"
Keyframe {
frame: 0
value: Qt.vector3d(0, 0, 0)
}
Keyframe {
frame: 1
value: Qt.vector3d(0, 6, 0)
}
Keyframe {
frame: 2
value: Qt.vector3d(0, 12, 0)
}
Keyframe {
frame: 3
value: Qt.vector3d(0, 18, 0)
}
Keyframe {
frame: 4
value: Qt.vector3d(0, 24, 0)
}
Keyframe {
frame: 5
value: Qt.vector3d(0, 30, 0)
}
Keyframe {
frame: 291.667
value: Qt.vector3d(0, 36, 0)
}
Keyframe {
frame: 6
value: Qt.vector3d(0, 42, 0)
}
Keyframe {
frame: 7
value: Qt.vector3d(0, 48, 0)
}
Keyframe {
frame: 8
value: Qt.vector3d(0, 54, 0)
}
Keyframe {
frame: 9
value: Qt.vector3d(0, 60, 0)
}
Keyframe {
frame: 10
value: Qt.vector3d(0, 66, 0)
}
Keyframe {
frame: 11
value: Qt.vector3d(0, 72, 0)
}
Keyframe {
frame: 12
value: Qt.vector3d(0, 78, 0)
}
Keyframe {
frame: 13
value: Qt.vector3d(0, 84, 0)
}
Keyframe {
frame: 14
value: Qt.vector3d(0, 90, 0)
}
Keyframe {
frame: 15
value: Qt.vector3d(0, 96, 0)
}
Keyframe {
frame: 16
value: Qt.vector3d(0, 102, 0)
}
Keyframe {
frame: 17
value: Qt.vector3d(0, 108, 0)
}
Keyframe {
frame: 18
value: Qt.vector3d(0, 114, 0)
}
Keyframe {
frame: 19
value: Qt.vector3d(0, 120, 0)
}
Keyframe {
frame: 20
value: Qt.vector3d(0, 126, 0)
}
Keyframe {
frame: 21
value: Qt.vector3d(0, 132, 0)
}
Keyframe {
frame: 22
value: Qt.vector3d(0, 138, 0)
}
Keyframe {
frame: 23
value: Qt.vector3d(0, 144, 0)
}
Keyframe {
frame: 24
value: Qt.vector3d(0, 150, 0)
}
Keyframe {
frame: 25
value: Qt.vector3d(0, 156, 0)
}
Keyframe {
frame: 26
value: Qt.vector3d(0, 162, 0)
}
Keyframe {
frame: 27
value: Qt.vector3d(0, 168, 0)
}
Keyframe {
frame: 28
value: Qt.vector3d(0, 174, 0)
}
Keyframe {
frame: 29
value: Qt.vector3d(0, 182, 0)
}
Keyframe {
frame: 30
value: Qt.vector3d(0, 190, 0)
}
}
KeyframeGroup {
target: empty_002
property: "scale"
Keyframe {
frame: 0
value: Qt.vector3d(1, 1, 1)
}
}
}
}
问题出在纹理映射属性下的 PrincipledMaterial
U 比例 = 1
垂直比例 = 1
我都改成了0,但是什么都没变。我不得不再次在 3D 编辑器中重新加载场景。
色差不是问题。我必须适应一下光线等等
这里是更正 PrincipledMaterial 的摘录。
PrincipledMaterial {
id: cUERO_NEGRO_material
baseColor: "#ff534d30"
metalness: 0
roughness: 0.389465
normalMap: Texture {
scaleV: 0
scaleU: 0
source: "maps/0.png"
tilingModeHorizontal: Texture.Repeat
tilingModeVertical: Texture.Repeat
}
cullMode: Material.NoCulling
}
materials: cUERO_NEGRO_material
}
我发现 this 适合 Blender 的漂亮汽车座椅,然后将整个场景导出为 GTLF2.0,并通过 Qt Design Studio 导入为 QML 资产。
我遇到了一些时间线问题,我手动修复了这个问题,但是 Material 看起来不对,如图所示。
我用 GLTF Onlineviewer 检查了相同的 GLTF2.0 文件 Link,看起来与 Blender 相同。
后来我用其他 GLTF Onlineviewer 检查 Link 在这里我有同样的问题。
问题:
- 有人知道或给我提示哪个值可能是问题所在 制造商?
- 不会是雷电问题吧?
生成的 Qml 文件:
import QtQuick3D 1.15
import QtQuick 2.15
import QtQuick.Timeline 1.0
Node {
id: rOOT
property alias currentFrame: timeline0.currentFrame
Node {
id: light
x: 407.625
y: 590.386
z: -100.545
eulerRotation.x: -132.466
eulerRotation.y: 72.7792
eulerRotation.z: -169.256
scale.x: 1
scale.y: 1
scale.z: 1
PointLight {
id: light_Orientation
eulerRotation.x: -90
color: "#ffffffff"
brightness: 10000
quadraticFade: 1
}
}
Node {
id: camera
x: 524.195
y: 308.297
z: -485.887
eulerRotation.x: -105.604
eulerRotation.y: 44.346
eulerRotation.z: -179.999
PerspectiveCamera {
id: camera_Orientation
eulerRotation.x: -90
clipNear: 0.1
clipFar: 100
fieldOfView: 39.5978
fieldOfViewOrientation: Camera.Horizontal
}
}
Node {
id: empty_002
Model {
id: node01_Base
y: 3.23133
z: 21.8115
source: "meshes/node01_Base.mesh"
PrincipledMaterial {
id: plastico_Negro_material
baseColor: "#ff010101"
metalness: 0
roughness: 0.8
normalMap: Texture {
source: "maps/0.png"
}
cullMode: Material.NoCulling
}
materials: [
plastico_Negro_material
]
}
Model {
id: node02_Base_rim
y: 3.23133
z: 21.8115
eulerRotation.z: 180
scale.x: 0.121224
scale.y: 0.361819
scale.z: 1.3171
source: "meshes/node02_Base_rim.mesh"
PrincipledMaterial {
id: aluminio_galvanizado_material
baseColor: "#ff383838"
roughness: 0.5
cullMode: Material.NoCulling
}
materials: [
aluminio_galvanizado_material
]
}
Model {
id: node03_Base_controls
eulerRotation.x: 8.46812
scale.x: 0.0367964
scale.y: 0.271225
scale.z: 0.271225
source: "meshes/node03_Base_controls.mesh"
PrincipledMaterial {
id: aluminio_negro_material
baseColor: "#ff080808"
roughness: 0.5
cullMode: Material.NoCulling
}
materials: [
aluminio_galvanizado_material,
aluminio_negro_material
]
}
Model {
id: node04_Bottom_seat
y: 32.6284
tessellationMode: Model.NPatch
receivesShadows: false
isWireframeMode: false
source: "meshes/node04_Bottom_seat.mesh"
PrincipledMaterial {
id: cUERO_NEGRO_material
baseColor: "#ff534d30"
metalness: 0
roughness: 0.389465
normalMap: Texture {
source: "maps/0.png"
tilingModeHorizontal: Texture.Repeat
tilingModeVertical: Texture.Repeat
}
cullMode: Material.NoCulling
}
materials: cUERO_NEGRO_material
}
Model {
id: node05_Bottom_sides
source: "meshes/node05_Bottom_sides.mesh"
materials: cUERO_NEGRO_material
}
Model {
id: node06_Back_seat
y: -7.04048
z: 6.17094
eulerRotation.x: -1.59834
source: "meshes/node06_Back_seat.mesh"
materials: cUERO_NEGRO_material
}
Model {
id: node07_Seat_back_sides
source: "meshes/node07_Seat_back_sides.mesh"
materials: cUERO_NEGRO_material
}
Model {
id: node08_Upper_neck
y: 222.546
z: 199.645
source: "meshes/node08_Upper_neck.mesh"
materials: cUERO_NEGRO_material
}
Model {
id: node09_Header
isWireframeMode: true
source: "meshes/node09_Header.mesh"
materials: cUERO_NEGRO_material
}
}
Timeline {
id: timeline0
startFrame: 0
endFrame: 30
currentFrame: 0
enabled: true
animations: [
TimelineAnimation {
duration: 30
from: 0
to: 30
running: true
}
]
KeyframeGroup {
target: empty_002
property: "position"
Keyframe {
frame: 0
value: Qt.vector3d(0, 0, 0)
}
}
KeyframeGroup {
target: empty_002
property: "eulerRotation"
Keyframe {
frame: 0
value: Qt.vector3d(0, 0, 0)
}
Keyframe {
frame: 1
value: Qt.vector3d(0, 6, 0)
}
Keyframe {
frame: 2
value: Qt.vector3d(0, 12, 0)
}
Keyframe {
frame: 3
value: Qt.vector3d(0, 18, 0)
}
Keyframe {
frame: 4
value: Qt.vector3d(0, 24, 0)
}
Keyframe {
frame: 5
value: Qt.vector3d(0, 30, 0)
}
Keyframe {
frame: 291.667
value: Qt.vector3d(0, 36, 0)
}
Keyframe {
frame: 6
value: Qt.vector3d(0, 42, 0)
}
Keyframe {
frame: 7
value: Qt.vector3d(0, 48, 0)
}
Keyframe {
frame: 8
value: Qt.vector3d(0, 54, 0)
}
Keyframe {
frame: 9
value: Qt.vector3d(0, 60, 0)
}
Keyframe {
frame: 10
value: Qt.vector3d(0, 66, 0)
}
Keyframe {
frame: 11
value: Qt.vector3d(0, 72, 0)
}
Keyframe {
frame: 12
value: Qt.vector3d(0, 78, 0)
}
Keyframe {
frame: 13
value: Qt.vector3d(0, 84, 0)
}
Keyframe {
frame: 14
value: Qt.vector3d(0, 90, 0)
}
Keyframe {
frame: 15
value: Qt.vector3d(0, 96, 0)
}
Keyframe {
frame: 16
value: Qt.vector3d(0, 102, 0)
}
Keyframe {
frame: 17
value: Qt.vector3d(0, 108, 0)
}
Keyframe {
frame: 18
value: Qt.vector3d(0, 114, 0)
}
Keyframe {
frame: 19
value: Qt.vector3d(0, 120, 0)
}
Keyframe {
frame: 20
value: Qt.vector3d(0, 126, 0)
}
Keyframe {
frame: 21
value: Qt.vector3d(0, 132, 0)
}
Keyframe {
frame: 22
value: Qt.vector3d(0, 138, 0)
}
Keyframe {
frame: 23
value: Qt.vector3d(0, 144, 0)
}
Keyframe {
frame: 24
value: Qt.vector3d(0, 150, 0)
}
Keyframe {
frame: 25
value: Qt.vector3d(0, 156, 0)
}
Keyframe {
frame: 26
value: Qt.vector3d(0, 162, 0)
}
Keyframe {
frame: 27
value: Qt.vector3d(0, 168, 0)
}
Keyframe {
frame: 28
value: Qt.vector3d(0, 174, 0)
}
Keyframe {
frame: 29
value: Qt.vector3d(0, 182, 0)
}
Keyframe {
frame: 30
value: Qt.vector3d(0, 190, 0)
}
}
KeyframeGroup {
target: empty_002
property: "scale"
Keyframe {
frame: 0
value: Qt.vector3d(1, 1, 1)
}
}
}
}
问题出在纹理映射属性下的 PrincipledMaterial
U 比例 = 1 垂直比例 = 1
我都改成了0,但是什么都没变。我不得不再次在 3D 编辑器中重新加载场景。
色差不是问题。我必须适应一下光线等等
这里是更正 PrincipledMaterial 的摘录。
PrincipledMaterial {
id: cUERO_NEGRO_material
baseColor: "#ff534d30"
metalness: 0
roughness: 0.389465
normalMap: Texture {
scaleV: 0
scaleU: 0
source: "maps/0.png"
tilingModeHorizontal: Texture.Repeat
tilingModeVertical: Texture.Repeat
}
cullMode: Material.NoCulling
}
materials: cUERO_NEGRO_material
}