Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Non-transmissive parts of the model are now a separate material to im…
Browse files Browse the repository at this point in the history
…prove support for real-time renderers.
  • Loading branch information
proog128 committed Sep 21, 2020
1 parent 4fa022e commit f550a20
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 68 deletions.
Binary file modified 2.0/ToyCar/glTF/ToyCar.bin
Binary file not shown.
205 changes: 137 additions & 68 deletions 2.0/ToyCar/glTF/ToyCar.gltf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"name" : "Scene",
"nodes" : [
0,
1
1,
2
]
}
],
Expand All @@ -17,28 +18,27 @@
"mesh" : 0,
"name" : "ToyCar",
"scale" : [
0.009999999776482582,
0.009999999776482582,
0.009999999776482582
],
"translation" : [
3.1585692340740934e-05,
-0.0001131248427554965,
-0.0006978416349738836
0.01,
0.01,
0.01
]
},
{
"mesh" : 1,
"name" : "Fabric",
"scale" : [
0.009999999776482582,
0.009999999776482582,
0.009999999776482582
],
"translation" : [
0.018294677138328552,
-0.5772045254707336,
0.04263647645711899
0.01,
0.01,
0.01
]
},
{
"mesh" : 2,
"name" : "Glass",
"scale" : [
0.01,
0.01,
0.01
]
}
],
Expand Down Expand Up @@ -76,17 +76,10 @@
"KHR_materials_ior" : {
"ior" : 6
},
"KHR_materials_transmission" : {
"transmissionFactor": 1,
"transmissionTexture" : {
"index": 5,
"texCoord": 0
}
},
"KHR_materials_clearcoat" : {
"clearcoatFactor": 1,
"clearcoatTexture" : {
"index": 6,
"index": 5,
"texCoord": 0
}
}
Expand All @@ -96,13 +89,13 @@
"doubleSided" : true,
"name" : "fabric",
"normalTexture" : {
"index" : 7,
"index" : 6,
"scale" : 1.140016794204712,
"texCoord" : 0
},
"pbrMetallicRoughness" : {
"baseColorTexture" : {
"index" : 8,
"index" : 7,
"texCoord" : 0
},
"metallicFactor" : 0,
Expand All @@ -112,11 +105,25 @@
"KHR_materials_specular" : {
"specularColorFactor": [0.729, 0.071, 0.078],
"specularTexture" : {
"index": 9,
"index": 8,
"texCoord": 0
}
}
}
},
{
"doubleSided" : true,
"name" : "glass",
"pbrMetallicRoughness" : {
"baseColorFactor" : [1, 1, 1, 1],
"metallicFactor" : 0,
"roughnessFactor" : 0
},
"extensions" : {
"KHR_materials_transmission" : {
"transmissionFactor": 1
}
}
}
],
"textures" : [
Expand All @@ -128,8 +135,7 @@
{ "source" : 5 },
{ "source" : 6 },
{ "source" : 7 },
{ "source" : 8 },
{ "source" : 9 }
{ "source" : 8 }
],
"images" : [
{
Expand Down Expand Up @@ -157,11 +163,6 @@
"name" : "ToyCar_specular",
"uri" : "ToyCar_specular.png"
},
{
"mimeType" : "image/png",
"name" : "ToyCar_transmission",
"uri" : "ToyCar_transmission.png"
},
{
"mimeType" : "image/png",
"name" : "ToyCar_clearcoat",
Expand All @@ -185,7 +186,7 @@
],
"meshes" : [
{
"name" : "Mesh",
"name" : "ToyCarMesh",
"primitives" : [
{
"attributes" : {
Expand All @@ -199,7 +200,7 @@
]
},
{
"name" : "Mesh.001",
"name" : "FabricMesh",
"primitives" : [
{
"attributes" : {
Expand All @@ -211,123 +212,191 @@
"material" : 1
}
]
},
{
"name" : "GlassMesh",
"primitives" : [
{
"attributes" : {
"POSITION" : 8,
"NORMAL" : 9,
"TEXCOORD_0" : 10
},
"indices" : 11,
"material" : 2
}
]
}
],
"accessors" : [
{
"bufferView" : 0,
"componentType" : 5126,
"count" : 62116,
"count" : 67470,
"max" : [
9.353763580322266,
12.61662483215332,
18.974475860595703
],
"min" : [
-9.353765487670898,
0.9924242496490479,
-9.353764533996582,
0.9924240112304688,
-19.404951095581055
],
"type" : "VEC3"
},
{
"bufferView" : 1,
"componentType" : 5126,
"count" : 62116,
"count" : 67470,
"type" : "VEC3"
},
{
"bufferView" : 2,
"componentType" : 5126,
"count" : 62116,
"count" : 67470,
"type" : "VEC2"
},
{
"bufferView" : 3,
"componentType" : 5123,
"count" : 273993,
"componentType" : 5125,
"count" : 266511,
"type" : "SCALAR"
},
{
"bufferView" : 4,
"componentType" : 5126,
"count" : 8986,
"count" : 8962,
"max" : [
35.779388427734375,
58.98687744140625,
33.733585357666016
38.44782638549805,
1.012609601020813,
36.98114776611328
],
"min" : [
-37.66353225708008,
41.76799011230469,
-40.22871398925781
-34.99509048461914,
-16.206275939941406,
-36.98115158081055
],
"type" : "VEC3"
},
{
"bufferView" : 5,
"componentType" : 5126,
"count" : 8986,
"count" : 8962,
"type" : "VEC3"
},
{
"bufferView" : 6,
"componentType" : 5126,
"count" : 8986,
"count" : 8962,
"type" : "VEC2"
},
{
"bufferView" : 7,
"componentType" : 5123,
"count" : 52815,
"type" : "SCALAR"
},
{
"bufferView" : 8,
"componentType" : 5126,
"count" : 1519,
"max" : [
5.7411041259765625,
12.069185256958008,
9.112582206726074
],
"min" : [
-5.741105079650879,
8.959808349609375,
-9.318028450012207
],
"type" : "VEC3"
},
{
"bufferView" : 9,
"componentType" : 5126,
"count" : 1519,
"type" : "VEC3"
},
{
"bufferView" : 10,
"componentType" : 5126,
"count" : 1519,
"type" : "VEC2"
},
{
"bufferView" : 11,
"componentType" : 5123,
"count" : 7482,
"type" : "SCALAR"
}
],
"bufferViews" : [
{
"buffer" : 0,
"byteLength" : 745392,
"byteLength" : 809640,
"byteOffset" : 0
},
{
"buffer" : 0,
"byteLength" : 745392,
"byteOffset" : 745392
"byteLength" : 809640,
"byteOffset" : 809640
},
{
"buffer" : 0,
"byteLength" : 496928,
"byteOffset" : 1490784
"byteLength" : 539760,
"byteOffset" : 1619280
},
{
"buffer" : 0,
"byteLength" : 547986,
"byteOffset" : 1987712
"byteLength" : 1066044,
"byteOffset" : 2159040
},
{
"buffer" : 0,
"byteLength" : 107832,
"byteOffset" : 2535700
"byteLength" : 107544,
"byteOffset" : 3225084
},
{
"buffer" : 0,
"byteLength" : 107832,
"byteOffset" : 2643532
"byteLength" : 107544,
"byteOffset" : 3332628
},
{
"buffer" : 0,
"byteLength" : 71888,
"byteOffset" : 2751364
"byteLength" : 71696,
"byteOffset" : 3440172
},
{
"buffer" : 0,
"byteLength" : 105630,
"byteOffset" : 2823252
"byteOffset" : 3511868
},
{
"buffer" : 0,
"byteLength" : 18228,
"byteOffset" : 3617500
},
{
"buffer" : 0,
"byteLength" : 18228,
"byteOffset" : 3635728
},
{
"buffer" : 0,
"byteLength" : 12152,
"byteOffset" : 3653956
},
{
"buffer" : 0,
"byteLength" : 14964,
"byteOffset" : 3666108
}
],
"buffers" : [
{
"byteLength" : 2928884,
"byteLength" : 3681072,
"uri" : "ToyCar.bin"
}
],
Expand Down
Binary file modified 2.0/ToyCar/glTF/ToyCar_baseColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2.0/ToyCar/glTF/ToyCar_emissive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2.0/ToyCar/glTF/ToyCar_roughness_metallic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2.0/ToyCar/glTF/ToyCar_specular.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f550a20

Please sign in to comment.