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

Commit

Permalink
Anisotropy added, clearcoat removed
Browse files Browse the repository at this point in the history
* Added anisotropy extension.
* Removed clearcoat, because it makes anisotropy more difficult to examine.
* Renamed the folder and files.
* New geometry to avoid errors in tangent space calculation.
* Details added to normal texture for weave curvature and fibre bumpiness.
* Normalized the normal texture as 3d vectors, and the anisotropy texture as 2d vectors.
  • Loading branch information
echadwick-artist committed Jun 15, 2023
1 parent 67a3798 commit 252467d
Show file tree
Hide file tree
Showing 16 changed files with 91 additions and 75 deletions.
20 changes: 20 additions & 0 deletions 2.0/CarbonFibre/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Carbon Fibre

## Screenshot

![screenshot](screenshot/screenshot_large.jpg)

Screenshot from the [glTF Sample Viewer](https://github.khronos.org/glTF-Sample-Viewer-Release/) with the Wide Street environment light.

## Description

This model is a sphere using the glTF extension [`KHR_materials_anisotropy`](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_anisotropy) to create a carbon fibre material.

The normalTexture is a higher resolution than the others to preserve more details in the shapes of individual fibres. The anisotropyTexture could in theory be only 4x4 pixels however that tends to introduce upscale artifacts.

![textures](screenshot/textures.jpg)


## License Information

(C) 2023, Wayfair LLC. CC-BY 4.0 International https://creativecommons.org/licenses/by/4.0/. Model and textures created by Eric Chadwick.
Binary file added 2.0/CarbonFibre/glTF-Binary/CarbonFibre.glb
Binary file not shown.
Binary file added 2.0/CarbonFibre/glTF/CarbonFibre.bin
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"asset": {
"version": "2.0",
"generator": "babylon.js glTF exporter for 3dsmax 2022 v20220210.4",
"copyright": "CC0, No Rights Reserved. Model and texture created by Eric Chadwick"
"generator": "3ds Max, Max2Babylon, Visual Studio Code, glTF Tools",
"copyright": "(C) 2023, Wayfair LLC. CC-BY 4.0 International https://creativecommons.org/licenses/by/4.0/. Model and textures created by Eric Chadwick."
},
"extensionsUsed": [
"KHR_texture_transform",
"KHR_materials_clearcoat"
],
"scene": 0,
"scenes": [
{
Expand All @@ -24,7 +20,7 @@
0.5,
0.0
],
"name": "Sphere"
"name": "CarbonFibre"
}
],
"meshes": [
Expand All @@ -40,123 +36,140 @@
"material": 0
}
],
"name": "Sphere"
"name": "CarbonFibre"
}
],
"accessors": [
{
"bufferView": 0,
"componentType": 5123,
"count": 9216,
"count": 11904,
"type": "SCALAR",
"name": "accessorIndices"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 1728,
"count": 2129,
"max": [
0.5000792,
0.4901544,
0.5000792
0.5,
0.5,
0.5
],
"min": [
-0.5000792,
-0.490154475,
-0.5000792
-0.5,
-0.5,
-0.5
],
"type": "VEC3",
"name": "accessorPositions"
},
{
"bufferView": 1,
"byteOffset": 20736,
"byteOffset": 25548,
"componentType": 5126,
"count": 1728,
"count": 2129,
"type": "VEC3",
"name": "accessorNormals"
},
{
"bufferView": 2,
"componentType": 5126,
"count": 1728,
"count": 2129,
"type": "VEC2",
"name": "accessorUVs"
}
],
"bufferViews": [
{
"buffer": 0,
"byteLength": 18432,
"byteLength": 23808,
"name": "bufferViewScalar",
"target": 34963
},
{
"buffer": 0,
"byteOffset": 18432,
"byteLength": 41472,
"byteOffset": 23808,
"byteLength": 51096,
"byteStride": 12,
"name": "bufferViewFloatVec3",
"target": 34962
},
{
"buffer": 0,
"byteOffset": 59904,
"byteLength": 13824,
"byteOffset": 74904,
"byteLength": 17032,
"byteStride": 8,
"name": "bufferViewFloatVec2",
"target": 34962
}
],
"buffers": [
{
"uri": "ClearCoatCarbonFibre.bin",
"byteLength": 73728
"uri": "CarbonFibre.bin",
"byteLength": 91936
}
],
"extensionsUsed": [
"KHR_materials_anisotropy"
],
"images": [
{
"uri": "CarbonFibre_occlusion.png"
},
{
"uri": "CarbonFibre_normal.png"
},
{
"uri": "CarbonFibre_anisotropy.png"
}
],
"textures": [
{
"name": "CarbonFibre_occlusion.png",
"sampler": 0,
"source": 0
},
{
"name": "CarbonFibre_normal.png",
"sampler": 0,
"source": 1
},
{
"name": "CarbonFibre_anisotropy.png",
"sampler": 0,
"source": 2
}
],
"materials": [
{
"name": "CarbonFibre",
"pbrMetallicRoughness": {
"baseColorFactor": [
0.05,
0.05,
0.05,
1
0.009,
0.009,
0.009,
1.0
],
"metallicFactor": 0,
"roughnessFactor": 0.6
"roughnessFactor": 0.4
},
"normalTexture": {
"index": 0,
"extensions": {
"KHR_texture_transform": {
"scale": [
4,
4
]
}
}
"index": 1,
"scale": 2
},
"occlusionTexture": {
"index": 0
},
"extensions": {
"KHR_materials_clearcoat": {
"clearcoatFactor": 0.75,
"clearcoatRoughnessFactor": 0.05
"KHR_materials_anisotropy": {
"anisotropyStrength": 0.5,
"anisotropyRotation": 0,
"anisotropyTexture": {
"index": 2
}
}
},
"doubleSided": false,
"name": "carbon fibre"
}
],
"textures": [
{
"sampler": 0,
"source": 0,
"name": "ClearCoatCarbonFibre_Normal.png"
}
],
"images": [
{
"uri": "ClearCoatCarbonFibre_Normal.png"
}
}
],
"samplers": [
Expand Down
Binary file added 2.0/CarbonFibre/glTF/CarbonFibre_anisotropy.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 added 2.0/CarbonFibre/glTF/CarbonFibre_normal.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 added 2.0/CarbonFibre/glTF/CarbonFibre_occlusion.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 added 2.0/CarbonFibre/screenshot/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2.0/CarbonFibre/screenshot/screenshot_large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2.0/CarbonFibre/screenshot/textures.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 0 additions & 17 deletions 2.0/ClearCoatCarbonFibre/README.md

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed 2.0/ClearCoatCarbonFibre/screenshot/screenshot.jpg
Binary file not shown.
Binary file not shown.

0 comments on commit 252467d

Please sign in to comment.