forked from KhronosGroup/glTF-Sample-Assets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/KhronosGroup/glTF-Sample-As…
- Loading branch information
Showing
58 changed files
with
823 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.gif) | ||
|
||
## Description | ||
|
||
The cube contains two morph targets in it: | ||
|
||
* **`thin`** : moves the vertices so that it becomes super-thin | ||
* **`angle`** : moves the vertices so that it forms a ramp | ||
|
||
The animation loops, morphing between these two states. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.gif) | ||
|
||
## Description | ||
|
||
The sphere contains two morph targets in it: | ||
|
||
* **`blob`** : moves the vertices so that it becomes a somewhat amorphous fat, blob shape. | ||
* **`ship`** : moves the vertices so that it looks a bit like a spaceship, the goal being | ||
to just make it a much more complicated morph example than the [cube](../AnimatedMorphCube/README.md). | ||
|
||
The animation loops, morphing between these two states. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.gif) | ||
|
||
## Data layout | ||
|
||
The following images show the data layout of this sample: | ||
|
||
![simpleTriangle](screenshot/simpleTriangle.png) | ||
![animation](screenshot/animation.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.jpg) | ||
|
||
## Description | ||
|
||
Static model of old camera on a tripod, with UX3D logo on one of the legs. |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot-large.jpg) | ||
|
||
Path-traced render by the [Enterprise PBR Sample Renderer](https://github.com/DassaultSystemes-Technology/dspbr-pt), using IBL "Artist Workshop" by [HDRI Haven](https://hdrihaven.com/hdri/?h=artist_workshop). Turn off "autoscale scene" before loading in this particular renderer. | ||
|
||
## Description | ||
|
||
This model tests interactions between attenuation color, attenuation distance, and thickness in the `KHR_materials_volume` extension. The material on display here is intended to represent a tinted blue glass, where thinner or smaller chunks of the material are lighter blue, and larger or thicker chunks are deeper blue. The test should be viewed face-on, not at an angle, as the assigned thicknesses match the lengths of the cube edges, not the cubes' inner diagonals. | ||
|
||
Generally, an implementation can pass the test offered by this model if it displays a uniform shade of blue in each vertical column. If any row is a different shade from neighbor rows, it likely indicates a problem. | ||
|
||
### Sample Color | ||
|
||
The top row "Sample Color" does not use attenuation at all. It emulates the "correct" colors by varying the base color on the surface of each sample, according to the [attenuation formulas](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_volume#attenuation) given in the `KHR_materials_volume` specification. This row serves as an answer key for all of the other rows. | ||
|
||
### Thickness Factor | ||
|
||
The next row "Thickness Factor" is the first test of the tinted blue solid material. The attenuation color and attenuation distance are constant across the row, but the cube meshes vary in size, and the `thicknessFactor` for each cube matches the length of one edge of the corresponding cube. A non-raytracing rasterizer can use the `thicknessFactor` to gauge the depth of the material, and adjust the material color according to the attenuation formulas mentioned above. A path-tracer or ray-tracer will merely test if `thicknessFactor` is zero (because zero means thin-walled, non-zero means volumetric), but the numeric thickness value will be ignored, and instead the world-space thickness of the geometry will be calculated by path tracing. If the camera is viewing mostly straight through the cubes, this should result in mostly the same thickness being discovered by path tracer calculations and by rasterizers reading the thickness value. | ||
|
||
### Thickness Texture | ||
|
||
The "Thickness Texture" row is largely the same as the one above it, except the entire row is a single mesh, with a single material. This row's material has a `thicknessFactor` of `2.0`, which is the thickness of the largest cube, and the cubes use a `thicknessTexture` to indicate which parts of this row's mesh belong to smaller cubes. As is typical for glTF, the final thickness value is the product of the factor (uniform) and the texture (sampled). | ||
|
||
### Node Scale | ||
|
||
The "Node Scale" row tests the interaction between thickness and scale. Each cube on this row uses the same unit-size cube mesh, with the same material, attenuation, and thickness. Only the glTF node's scale is varied across the row. The `thicknessFactor` is given in the mesh's raw vertex space, but the `attenuationDistance` is a material property in world space. In a path tracer, larger nodes with larger cubes naturally produce deeper colors from attenuation. But a rasterizer must take the node's scale into account, adapting the `thicknessFactor` into world space before use with the material. | ||
|
||
### Attenuation Distance | ||
|
||
In the final row, "Attenuation Distance", the cubes are a different size from all of the other rows. This row features all unit-size cubes, and the attenuation distance of each cube has been adjusted to be the inverse of the cube's thickness on the other rows. This means that although the size of these cubes may appear different, the shade of blue coloring of each cube should match the coloring of the rest of the column. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.jpg) | ||
|
||
## Description | ||
|
||
A cut avocado showing the pit and flesh, using a hand-painted texture. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.jpg) | ||
|
||
## Description | ||
|
||
A fish created with Core glTF 2.0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot_large.jpg) | ||
|
||
## Description | ||
|
||
A portable radio with glowing front panel created with Core glTF 2.0. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot_large.jpg) | ||
|
||
## Description | ||
|
||
A portable radio with glowing front panel created with Core glTF 2.0, with an axis tripod above it showing the XYZ axis orientations. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.png) | ||
|
||
## Description | ||
|
||
Simple cube model. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.gif) | ||
|
||
## Description | ||
|
||
This model demonstrates a two-channel animation, one for rotation and the other | ||
translation. A smaller box rises up out of a larger hollow one, flips over, and | ||
sinks back down. | ||
|
||
## Common Problems | ||
|
||
![sample animation problem](screenshot/BoxAnimatedBug.png) | ||
|
||
This model features a single animation with a pair of channels that have different | ||
lengths. The "rotation" channel finishes its work before the "translation" channel | ||
is done. However, these channels are not permitted to get out of sync: The shorter | ||
channel may not loop and begin repeating until all of the channels within that | ||
animation have finished playing. Client runtimes must ensure that a single input | ||
time is given to all of the channels within a particular animation, for the | ||
animation to remain sensible. | ||
|
||
This model will reveal such an issue on subsequent bounces of the inner purple box. | ||
In affected runtimes, the box will begin rotating before it has moved to the top | ||
position, and collide with the blue box. If you see this, please file an issue | ||
on the affected runtime's issue tracker. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.png) | ||
|
||
## Description | ||
|
||
Box example with interleaved position and normal attributes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.png) | ||
|
||
## Description | ||
|
||
Box with a power-of-2 texture, using the Cesium logo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.gif) | ||
|
||
## Description | ||
|
||
Articulated robot with animation and hierarchy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.png) | ||
|
||
## Description | ||
|
||
Two cameras and a simple plane mesh; a perspective camera and an orthographic camera. | ||
|
||
## Data layout | ||
|
||
The following image shows the data layout of this sample: | ||
|
||
![simpleSquare](screenshot/simpleSquare.png) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.gif) | ||
|
||
## Description | ||
|
||
Animated and skinned character with the Cesium logo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.gif) | ||
|
||
## Description | ||
|
||
Textured. Multiple nodes/meshes. Animations. Cesium logo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot_large.jpg) | ||
|
||
## Description | ||
|
||
This model tests various settings and textures from the [`KHR_materials_clearcoat`](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat) glTF extension. | ||
|
||
### Columns | ||
|
||
There are three columns: | ||
|
||
- **Base Layer** - A base material with no coating. | ||
|
||
- **Coated** - The combination of the outer two columns, using [`KHR_materials_clearcoat`](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat). | ||
|
||
- **Coating Only** - This is a base material with settings copied from just the coating in the central column. | ||
|
||
The right-most column may visually appear as flat-black objects with various clear coatings applied. Indeed, such black objects do not need to make use of the `KHR_materials_clearcoat` extension, as the coating itself can be represented as a core glTF 2.0 material when the | ||
underlying layer reflects no light. | ||
|
||
The central "Coated" column uses `KHR_materials_clearcoat` to combine the material settings from the outer two columns. | ||
|
||
To read this test, examine how highlights reflect on the left and right columns ("Base layer" and "Coating only"), and then check the middle "Coated" column to see if it shows evidence of reflected highlights from both of the other columns. It will not be a pixel-perfect match, but it should be visually apparent that the major highlights from the other two columns have been combined. | ||
|
||
It is recommended to have an environment with distinctive bright light sources for testing. | ||
|
||
If the center column appears to have exactly the same reflections as the left column, it likely means the glTF viewer you're using does not yet support the `KHR_materials_clearcoat` extension. Check if a newer version of the viewer is available, or check if an issue exists to implement support for it. | ||
|
||
### Simple coating | ||
|
||
This row simply turns on the `KHR_materials_clearcoat` extension in the middle column, with some reasonable non-textured settings. | ||
|
||
![Simple coating](screenshot/FirstRow.jpg) | ||
|
||
### Partial coating | ||
|
||
This row uses a texturemap to turn clear coat on and off for different sections of the geometry. It is emulated in the right column with an alpha blend, making the coating disappear where it has been turned off. In the middle column with the `KHR_materials_clearcoat` extension, this value is read from the `R` (Red) channel, as linear (not sRGB) values. | ||
|
||
The center column should show bands where the coating has been applied and un-applied. The right column may look a little strange due to the use of alpha-blending, but its bands align with the center column's bands. | ||
|
||
![Partial coating](screenshot/PartialCoat.jpg) | ||
|
||
### Roughness variations | ||
|
||
This row offers a striped pattern with different roughness values for the coating. Roughness is read from the `G` (Green) channel, as linear (not sRGB) values. | ||
|
||
### Base normal map | ||
|
||
The base layer on this row has a pattern of bumps, but the coating is smooth. The center column should appear as if the bumps are visible under smooth glass. As before, look for reflected highlights in both of the outer columns, and then look for those same highlights in the center column. | ||
|
||
### Shared normal map | ||
|
||
On this row, the same normal map has been applied to both the base layer and the coating. This makes the coating appear very thin, as if it follows the curves of the base layer closely. Even so, the base layer has more roughness, so its reflections will be visibly different from the coating's reflections. Both sets of reflections should combine in the center column. | ||
|
||
### Coat normal map | ||
|
||
This row uses a normal map on the coating, while the base layer is smooth. In this case it is intended to look similar to clear plastic wrap (but without any roughness variation). In the center column, the base layer's wide reflections should be visible under the coating's thin reflections. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.jpg) | ||
|
||
## Description | ||
|
||
A female fabric mannequin with a corset and a collar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.jpg) | ||
|
||
## Description | ||
|
||
A cube with non-smoothed faces. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.png) | ||
|
||
## Description | ||
|
||
A fictional helmet with textured damage. | ||
|
||
## Modifications | ||
|
||
The original model was built on an early draft of glTF 2.0 that did not become final. This new model has been imported and re-exported from Blender to bring it into alignment with the final release glTF 2.0 specification. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot_large.png) | ||
|
||
Rasterized (without ray tracing or path tracing) by the [Khronos glTF Sample Viewer](https://github.khronos.org/glTF-Sample-Viewer-Release/), using IBL "Footprint Court" by [HDR Labs](http://www.hdrlabs.com/sibl/archive.html). | ||
|
||
## Description | ||
|
||
This model demonstrates the use of the `KHR_materials_transmission` and `KHR_materials_volume` extensions to specify an object that appears to be made from colored glass. | ||
|
||
The "Attenuation" material on the dragon uses full transmission with a perfectly smooth, clear surface color. The yellow and orange tones are produced by `KHR_material_volume`'s `attenuationColor` and `attenuationDistance`. | ||
|
||
### Thick Volume vs. Thin-Walled | ||
|
||
By default, glTF 2.0 and `KHR_materials_transmission` specify "thin-walled" materials, where the mesh's polygons are immeasurably thin. Any ray of light hitting such a polygon would enter and immediately exit the material. There is no refraction present on such a material, except for some possible blurriness introduced by rough microfacets on its surface. | ||
|
||
However, `KHR_materials_volume` introduces the new parameters `thicknessFactor` and `thicknessTexture`. When `thicknessFactor` is non-zero, the material definition changes from thin-walled to a thick volume. The mesh's polygons are then considered to represent a manifold surface surrounding a solid three-dimensional volume of material. This material produces refraction, as shown in the screenshot above where the view through the dragon distorts the checkerboard grid of the cloth behind it. | ||
|
||
For rasterizers that do not use ray tracing or path tracing, the product of `thicknessFactor` and `thicknessTexture` offer an average mesh thickness per texel along the surface. This allows for example the dragon's thin claws to absorb less light and appear lighter yellow, while the dragon's thicker body appears a deeper orange. | ||
|
||
Because the `KHR_materials_ior` extension is not present, glTF's default IOR of 1.5 is used for the material. | ||
|
||
## Path Traced | ||
|
||
![screenshot](screenshot/screenshot_pathTraced.png) | ||
|
||
Path-traced render by the [Enterprise PBR Sample Renderer](https://github.com/DassaultSystemes-Technology/dspbr-pt), using IBL "Footprint Court" by [HDR Labs](http://www.hdrlabs.com/sibl/archive.html). | ||
|
||
Ray tracers and path tracers must still test `thicknessFactor > 0.0` to determine if the material is in thin-walled mode or thick. Beyond that, they are free to disregard the thickness approximation, and trace the true thickness per ray. | ||
|
||
## Material Variant: Surface Color | ||
|
||
![screenshot](screenshot/surface_color.png) | ||
|
||
This model features a second material variant (via `KHR_materials_variants`), called "Surface Color." This variant specifies the same yellow color, but specifies it as a `baseColor` on the surface of a thick volume, with no attenuation inside the volume. This means the yellow color will be constant across the surface of the dragon, and not darken with thickness. The `thicknessFactor` and `thicknessTexture` are still supplied, so this variant offers the same refraction of the background grid as the other material. | ||
|
||
## Common Problems | ||
|
||
![screenshot](screenshot/too-dark.png) | ||
|
||
If the dragon appears a deep red color, it may indicate that node scaling has not been properly accounted for. The `thicknessFactor` is specified in raw mesh vertex space, so must be adjusted for glTF nodes that have scaling applied. The `attenuationDistance` is a material property, specified in world space. | ||
|
||
See the "Node Scale" row of the [Attenuation Test Model](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AttenuationTest) for an example of this effect using uniform thickness values. | ||
|
||
## Attribution for the Dragon | ||
|
||
The dragon model based on the one from [Morgan McGuire's Computer Graphics Archive](https://casual-effects.com/data). | ||
Original dragon mesh data based on a [Stanford Scan](http://www.graphics.stanford.edu/data/3Dscanrep/) | ||
© 1996 Stanford University. | ||
|
||
## Attribution for the Cloth Backdrop | ||
|
||
[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/) | ||
To the extent possible under law, Adobe has waived all copyright and related or neighboring rights to this asset [the cloth backdrop]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.png) | ||
|
||
## Description | ||
|
||
A rubber ducky bath toy. |
Oops, something went wrong.