Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 785712c

Browse files
Iridescence Lamp sample model
A demonstration model for testing KHR_materials_iridescence, a reproduction of a real product on the Wayfair website. The surfaces include both opaque and transmissive materials with pronounced iridescence.
1 parent b2a2d47 commit 785712c

11 files changed

+384
-0
lines changed

2.0/IridescenceLamp/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Iridescence Lamp
2+
3+
## Screenshot
4+
5+
![A screenshot of the glTF model in the glTF Sample Viewer.](screenshot/screenshot_Large.jpg)
6+
7+
(above) [glTF Sample Viewer](https://github.khronos.org/glTF-Sample-Viewer-Release/) screenshot, with the Footprint Court IBL.
8+
9+
## Description
10+
11+
This model represents the real Wayfair product [Bonsell 19" Table Lamp](https://www.wayfair.com/lighting/pdp/wrought-studio-bonsell-19-table-lamp-w002337865.html) which has iridescent finishes.
12+
13+
The use of real-world photographic reference is meant to help glTF developers with calibrating material features and renderer behavior, to more accurately represent e-commerce products. Additional photo reference is available on the Wayfair website.
14+
15+
![Photos of the real product.](screenshot/reference_Photos.jpg)
16+
17+
(above) Photos of the real product.
18+
19+
20+
## Materials
21+
22+
The glass material uses [KHR_materials_transmission](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_transmission) and [KHR_materials_volume](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_volume) for transmission and refraction, along with [KHR_materials_iridescence](https://github.com/KhronosGroup/glTF/pull/2027) for iridescence.
23+
24+
The colors are caused by a type of glaze called [carnival glass](http://www.ddoty.com/newcomers.html). On the real product the glaze is applied to the inside of the glass cover rather than the outside. However because most rasterizers render only a single layer of transmission, the iridescent colors were applied to both inside and outside of the cover rather than only on the inside.
25+
26+
The glass uses partial Metalness to improve the iridescent response, because the glaze on carnival glass is partially metallic. If it were fully metallic, the glass would become entirely opaque.
27+
28+
The iridescence on the glass uses a thickness range from 395 to 405 nanometers and a thickness texture for surface variation, which seems to match the iridescent colors in the reference photography.
29+
30+
The inner surface of the lamp shade uses a fully-metallic material with iridescence. On the real product this surface is a partially-transmissive metal foil; however to optimize the rendering in glTF this material has been simplified to not utilize transmission.
31+
32+
The iridescence on the lamp shade uses a thickness range from 485 to 515 nanometers and a thickness texture for surface variation, which seems to match the iridescent colors in the reference photography.
33+
34+
![screenshot](screenshot/Textures.jpg)
35+
36+
(above) Material ingredients for the model. Top row: occlusion, roughness, metalness. Bottom row: base color, iridescence, iridescence thickness.
37+
38+
39+
## Creation Details
40+
41+
The asset was created using [3ds Max](https://www.autodesk.com/products/3ds-max), exported to glTF using [Max2Babylon](https://github.com/BabylonJS/Exporters#babylonjs-exporters), and materials were edited in [Visual Studio Code](https://code.visualstudio.com/) with [glTF Tools](https://github.com/AnalyticalGraphicsInc/gltf-vscode#gltf-tools-extension-for-visual-studio-code).
42+
43+
44+
## License Information
45+
46+
Copyright 2022 Wayfair LLC. CC BY 4.0 International https://creativecommons.org/licenses/by/4.0/
5.05 MB
Binary file not shown.
444 KB
Binary file not shown.
Lines changed: 338 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,338 @@
1+
{
2+
"asset": {
3+
"version": "2.0",
4+
"generator": "3ds Max, Max2Babylon, Visual Studio Code, glTF Tools",
5+
"copyright": "Copyright 2022 Wayfair LLC. CC BY 4.0 International https://creativecommons.org/licenses/by/4.0/"
6+
},
7+
"extensionsUsed": [
8+
"KHR_materials_transmission",
9+
"KHR_materials_volume",
10+
"KHR_materials_iridescence"
11+
],
12+
"scene": 0,
13+
"scenes": [
14+
{
15+
"nodes": [
16+
0,
17+
1,
18+
2
19+
]
20+
}
21+
],
22+
"nodes": [
23+
{
24+
"mesh": 0,
25+
"name": "lamp"
26+
},
27+
{
28+
"mesh": 1,
29+
"name": "lamp_transmission"
30+
},
31+
{
32+
"mesh": 2,
33+
"name": "lamp_iridescence"
34+
}
35+
],
36+
"meshes": [
37+
{
38+
"primitives": [
39+
{
40+
"attributes": {
41+
"POSITION": 1,
42+
"NORMAL": 2,
43+
"TEXCOORD_0": 3
44+
},
45+
"indices": 0,
46+
"material": 0
47+
}
48+
],
49+
"name": "lamp"
50+
},
51+
{
52+
"primitives": [
53+
{
54+
"attributes": {
55+
"POSITION": 5,
56+
"NORMAL": 6,
57+
"TEXCOORD_0": 7
58+
},
59+
"indices": 4,
60+
"material": 1
61+
}
62+
],
63+
"name": "lamp_transmission"
64+
},
65+
{
66+
"primitives": [
67+
{
68+
"attributes": {
69+
"POSITION": 9,
70+
"NORMAL": 10,
71+
"TEXCOORD_0": 11
72+
},
73+
"indices": 8,
74+
"material": 2
75+
}
76+
],
77+
"name": "lamp_iridescence"
78+
}
79+
],
80+
"accessors": [
81+
{
82+
"bufferView": 0,
83+
"componentType": 5123,
84+
"count": 36246,
85+
"type": "SCALAR",
86+
"name": "accessorIndices"
87+
},
88+
{
89+
"bufferView": 1,
90+
"componentType": 5126,
91+
"count": 7036,
92+
"max": [
93+
0.14865604,
94+
0.476097584,
95+
0.1509395
96+
],
97+
"min": [
98+
-0.14865604,
99+
0.0,
100+
-0.1509395
101+
],
102+
"type": "VEC3",
103+
"name": "accessorPositions"
104+
},
105+
{
106+
"bufferView": 1,
107+
"byteOffset": 84432,
108+
"componentType": 5126,
109+
"count": 7036,
110+
"type": "VEC3",
111+
"name": "accessorNormals"
112+
},
113+
{
114+
"bufferView": 2,
115+
"componentType": 5126,
116+
"count": 7036,
117+
"type": "VEC2",
118+
"name": "accessorUVs"
119+
},
120+
{
121+
"bufferView": 0,
122+
"byteOffset": 72492,
123+
"componentType": 5123,
124+
"count": 16896,
125+
"type": "SCALAR",
126+
"name": "accessorIndices"
127+
},
128+
{
129+
"bufferView": 1,
130+
"byteOffset": 168864,
131+
"componentType": 5126,
132+
"count": 2990,
133+
"max": [
134+
0.09652254,
135+
0.20118323,
136+
0.09652254
137+
],
138+
"min": [
139+
-0.09652254,
140+
0.05125974,
141+
-0.09652254
142+
],
143+
"type": "VEC3",
144+
"name": "accessorPositions"
145+
},
146+
{
147+
"bufferView": 1,
148+
"byteOffset": 204744,
149+
"componentType": 5126,
150+
"count": 2990,
151+
"type": "VEC3",
152+
"name": "accessorNormals"
153+
},
154+
{
155+
"bufferView": 2,
156+
"byteOffset": 56288,
157+
"componentType": 5126,
158+
"count": 2990,
159+
"type": "VEC2",
160+
"name": "accessorUVs"
161+
},
162+
{
163+
"bufferView": 0,
164+
"byteOffset": 106284,
165+
"componentType": 5123,
166+
"count": 3456,
167+
"type": "SCALAR",
168+
"name": "accessorIndices"
169+
},
170+
{
171+
"bufferView": 1,
172+
"byteOffset": 240624,
173+
"componentType": 5126,
174+
"count": 657,
175+
"max": [
176+
0.14623034,
177+
0.472099632,
178+
0.148518875
179+
],
180+
"min": [
181+
-0.14623034,
182+
0.243182123,
183+
-0.148518875
184+
],
185+
"type": "VEC3",
186+
"name": "accessorPositions"
187+
},
188+
{
189+
"bufferView": 1,
190+
"byteOffset": 248508,
191+
"componentType": 5126,
192+
"count": 657,
193+
"type": "VEC3",
194+
"name": "accessorNormals"
195+
},
196+
{
197+
"bufferView": 2,
198+
"byteOffset": 80208,
199+
"componentType": 5126,
200+
"count": 657,
201+
"type": "VEC2",
202+
"name": "accessorUVs"
203+
}
204+
],
205+
"bufferViews": [
206+
{
207+
"buffer": 0,
208+
"byteLength": 113196,
209+
"name": "bufferViewScalar"
210+
},
211+
{
212+
"buffer": 0,
213+
"byteOffset": 113196,
214+
"byteLength": 256392,
215+
"byteStride": 12,
216+
"name": "bufferViewFloatVec3"
217+
},
218+
{
219+
"buffer": 0,
220+
"byteOffset": 369588,
221+
"byteLength": 85464,
222+
"byteStride": 8,
223+
"name": "bufferViewFloatVec2"
224+
}
225+
],
226+
"buffers": [
227+
{
228+
"uri": "IridescenceLamp.bin",
229+
"byteLength": 455052
230+
}
231+
],
232+
"materials": [
233+
{
234+
"name": "IridescenceLamp",
235+
"pbrMetallicRoughness": {
236+
"baseColorTexture": {
237+
"index": 0
238+
},
239+
"metallicRoughnessTexture": {
240+
"index": 1
241+
}
242+
},
243+
"occlusionTexture": {
244+
"index": 1
245+
}
246+
},
247+
{
248+
"name": "IridescenceLampTransmissionIridescence",
249+
"pbrMetallicRoughness": {
250+
"baseColorTexture": {
251+
"index": 0
252+
},
253+
"metallicRoughnessTexture": {
254+
"index": 1
255+
}
256+
},
257+
"occlusionTexture": {
258+
"index": 1
259+
},
260+
"extensions": {
261+
"KHR_materials_transmission": {
262+
"transmissionFactor": 1
263+
},
264+
"KHR_materials_volume": {
265+
"thicknessFactor": 0.005
266+
},
267+
"KHR_materials_iridescence": {
268+
"iridescenceFactor": 1,
269+
"iridescenceIOR": 1.67,
270+
"iridescenceThicknessMaximum": 405,
271+
"iridescenceThicknessMinimum": 395,
272+
"iridescenceThicknessTexture": {
273+
"index": 2
274+
}
275+
}
276+
}
277+
},
278+
{
279+
"name": "IridescenceLampIridescence",
280+
"pbrMetallicRoughness": {
281+
"baseColorTexture": {
282+
"index": 0
283+
},
284+
"metallicRoughnessTexture": {
285+
"index": 1
286+
}
287+
},
288+
"occlusionTexture": {
289+
"index": 1
290+
},
291+
"extensions": {
292+
"KHR_materials_iridescence": {
293+
"iridescenceFactor": 1,
294+
"iridescenceIOR": 1.8,
295+
"iridescenceThicknessMaximum": 515,
296+
"iridescenceThicknessMinimum": 485,
297+
"iridescenceThicknessTexture": {
298+
"index": 2
299+
}
300+
}
301+
}
302+
}
303+
],
304+
"textures": [
305+
{
306+
"sampler": 0,
307+
"source": 0,
308+
"name": "IridescenceLamp_BaseColor.png"
309+
},
310+
{
311+
"sampler": 0,
312+
"source": 1,
313+
"name": "IridescenceLamp_OcclusionRoughnessMetalness.png"
314+
},
315+
{
316+
"sampler": 0,
317+
"source": 2,
318+
"name": "IridescenceLamp_Iridescence.png"
319+
}
320+
],
321+
"images": [
322+
{
323+
"uri": "IridescenceLamp_BaseColor.png"
324+
},
325+
{
326+
"uri": "IridescenceLamp_OcclusionRoughnessMetalness.png"
327+
},
328+
{
329+
"uri": "IridescenceLamp_Iridescence.png"
330+
}
331+
],
332+
"samplers": [
333+
{
334+
"magFilter": 9729,
335+
"minFilter": 9987
336+
}
337+
]
338+
}
1.11 MB
Loading
708 KB
Loading
2.81 MB
Loading
369 KB
Loading
39.8 KB
Loading
241 KB
Loading

0 commit comments

Comments
 (0)