diff --git a/examples/files.js b/examples/files.js index bc6df508cd50575baccf2a53f784da2a52340028..66ed31d983a95ab58c30bdc9246e7e184f586360 100644 --- a/examples/files.js +++ b/examples/files.js @@ -161,6 +161,7 @@ var files = { "webgl_materials_lightmap", "webgl_materials_nodes", "webgl_materials_normalmap", + "webgl_materials_normalmap_object_space", "webgl_materials_parallaxmap", "webgl_materials_reflectivity", "webgl_materials_shaders_fresnel", diff --git a/examples/models/gltf/Nefertiti/README.md b/examples/models/gltf/Nefertiti/README.md new file mode 100644 index 0000000000000000000000000000000000000000..595906dacbe14afad550340406ed0d8cfeb108ec --- /dev/null +++ b/examples/models/gltf/Nefertiti/README.md @@ -0,0 +1,9 @@ +# Nefertiti + +## License Information + +Model is provided under a creative commons license for non-commercial purposes (CC BY-NC). + +3D scan of a copy of the Nefertiti Bust + +Digitized by Fraunhofer IGD, Competence Center Cultural Heritage Digitization, http://www.cultlab3d.de/ diff --git a/examples/models/gltf/Nefertiti/material0_basecolor.jpg b/examples/models/gltf/Nefertiti/material0_basecolor.jpg new file mode 100755 index 0000000000000000000000000000000000000000..25dbf62b868ba5a8a9ee07a7b6473a489639d1f6 Binary files /dev/null and b/examples/models/gltf/Nefertiti/material0_basecolor.jpg differ diff --git a/examples/models/gltf/Nefertiti/material0_normal.jpg b/examples/models/gltf/Nefertiti/material0_normal.jpg new file mode 100755 index 0000000000000000000000000000000000000000..4ce7936b95144196c9acc14170fead44e777aeda Binary files /dev/null and b/examples/models/gltf/Nefertiti/material0_normal.jpg differ diff --git a/examples/models/gltf/Nefertiti/scene.data.bin b/examples/models/gltf/Nefertiti/scene.data.bin new file mode 100755 index 0000000000000000000000000000000000000000..ad34eea473d21aad5bc10f0dd0df60335a039778 Binary files /dev/null and b/examples/models/gltf/Nefertiti/scene.data.bin differ diff --git a/examples/models/gltf/Nefertiti/scene.gltf b/examples/models/gltf/Nefertiti/scene.gltf new file mode 100755 index 0000000000000000000000000000000000000000..a5db4937874783ea5a5f10b1f1bce09a74ca73ad --- /dev/null +++ b/examples/models/gltf/Nefertiti/scene.gltf @@ -0,0 +1,191 @@ +{ + "accessors": [ + { + "bufferView": 1, + "byteOffset": 0, + "byteStride": 0, + "componentType": 5126, + "count": 11378, + "max": [ + 5.6986370086669922, + 29.504100799560547, + 7.6080727577209473 + ], + "min": [ + -6.0125927925109863, + 0.11976776272058487, + -10.487000465393066 + ], + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 136536, + "byteStride": 0, + "componentType": 5126, + "count": 11378, + "max": [ + 0.76048284769058228, + 0.99951171875 + ], + "min": [ + 0.00048828125, + 1.9942936191341687e-12 + ], + "type": "VEC2" + }, + { + "bufferView": 1, + "byteOffset": 227560, + "byteStride": 0, + "componentType": 5126, + "count": 11378, + "max": [ + 0.99920654296875, + 0.9923892617225647, + 0.99845790863037109 + ], + "min": [ + -0.99988287687301636, + -0.95674973726272583, + -0.99919658899307251 + ], + "type": "VEC3" + }, + { + "bufferView": 1, + "byteOffset": 364096, + "byteStride": 0, + "componentType": 5126, + "count": 11378, + "max": [ + 0.99995666742324829, + 0.99990606307983398, + 0.99975591897964478, + 1 + ], + "min": [ + -0.99938887357711792, + -0.99999749660491943, + -0.99997586011886597, + 1 + ], + "type": "VEC4" + }, + { + "bufferView": 0, + "byteOffset": 0, + "byteStride": 0, + "componentType": 5123, + "count": 58446, + "max": [ + 11377 + ], + "min": [ + 0 + ], + "type": "SCALAR" + } + ], + "asset": { + "generator": "Created by MOPS CLI \/ instantUV v1.1.3", + "version": "2.0" + }, + "bufferViews": [ + { + "buffer": 0, + "byteLength": 116892, + "byteOffset": 0, + "target": 34963 + }, + { + "buffer": 0, + "byteLength": 546144, + "byteOffset": 116892, + "target": 34962 + } + ], + "buffers": [ + { + "byteLength": 663036, + "type": "arraybuffer", + "uri": "scene.data.bin" + } + ], + "extensionsUsed": [], + "images": [ + { + "uri": "material0_basecolor.jpg" + }, + { + "uri": "material0_normal.jpg" + } + ], + "materials": [ + { + "normalTexture": { + "index": 1 + }, + "pbrMetallicRoughness": { + "baseColorFactor": [ + 1, + 1, + 1, + 1 + ], + "baseColorTexture": { + "index": 0 + }, + "metallicFactor": 0.0, + "roughnessFactor": 0.5 + } + } + ], + "meshes": [ + { + "name": "mainMesh", + "primitives": [ + { + "attributes": { + "NORMAL": 2, + "POSITION": 0, + "TANGENT": 3, + "TEXCOORD_0": 1 + }, + "indices": 4, + "material": 0, + "mode": 4 + } + ] + } + ], + "nodes": [ + { + "children": [], + "mesh": 0, + "name": "rootNode2" + } + ], + "samplers": [ + {}, + {} + ], + "scene": 0, + "scenes": [ + { + "nodes": [ + 0 + ] + } + ], + "textures": [ + { + "sampler": 0, + "source": 0 + }, + { + "sampler": 1, + "source": 1 + } + ] +} diff --git a/examples/webgl_materials_normalmap_object_space.html b/examples/webgl_materials_normalmap_object_space.html new file mode 100644 index 0000000000000000000000000000000000000000..0412291632ae989b708517d6d8b6f180a88a1f5c --- /dev/null +++ b/examples/webgl_materials_normalmap_object_space.html @@ -0,0 +1,150 @@ + + + + three.js webgl - materials - normal map [object space] + + + + + + +
+ three.js - webgl object-space normalmap demo
+ Nefertiti Bust by + CultLab3D
+ +
+ + + + + + + + + + + +