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.
Workflow update + model README improvements
- Loading branch information
Showing
7 changed files
with
96 additions
and
10 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
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.png) | ||
|
||
## Description | ||
|
||
Simple collection of explicit triangles. | ||
|
||
## Data layout | ||
|
||
The following image shows the data layout of this sample: | ||
|
||
![triangleWithoutIndices](screenshot/triangleWithoutIndices.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 |
---|---|---|
@@ -1,15 +1,36 @@ | ||
# TriangleWithoutIndices | ||
|
||
## Tags | ||
|
||
[core](../../Models-core.md), [testing](../../Models-testing.md) | ||
|
||
## Summary | ||
|
||
The simplest possible glTF asset: A single scene with a single node and a single mesh with a single mesh.primitive with a single triangle with a single attribute, without indices and without a material | ||
|
||
## Operations | ||
|
||
* [Display](https://github.khronos.org/glTF-Sample-Viewer-Release/?model=https://raw.GithubUserContent.com/KhronosGroup/glTF-Sample-Assets/main/./Models/TriangleWithoutIndices/glTF/TriangleWithoutIndices.gltf) in SampleViewer | ||
* [Model Directory](./) | ||
|
||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.png) | ||
|
||
## License Information | ||
## Description | ||
|
||
Public domain ([CC0](https://creativecommons.org/publicdomain/zero/1.0/)) | ||
Simple collection of explicit triangles. | ||
|
||
## Data layout | ||
|
||
The following image shows the data layout of this sample: | ||
|
||
![triangleWithoutIndices](screenshot/triangleWithoutIndices.png) | ||
![triangleWithoutIndices](screenshot/triangleWithoutIndices.png) | ||
|
||
## Legal | ||
|
||
© 2017, Public. [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/legalcode) | ||
|
||
- javagl for Everything | ||
|
||
#### Assembled by modelmetadata |
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
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,33 @@ | ||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot_large.jpg) | ||
|
||
## Description | ||
|
||
This model tests the [`KHR_materials_unlit`](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit) extension. There are two objects, one orange-ish (`#FF7F00` in sRGB space) and one blue-ish (`#007FFF` in sRGB space). The visible surface of these two objects should appear as a uniform color, so much so that the 3D effect is intentionally lost. | ||
|
||
## Problem: Lighting applied to un-lit model | ||
|
||
![screenshot](screenshot/unlit_test_fail.jpg) | ||
|
||
The above screenshot shows a case where normal lighting calculations have been applied to an un-lit material. While the shadows on the ground are permissible, the various panels and edges visible on the orange and blue objects are not. | ||
|
||
## `ExtensionsUsed` vs. `ExtensionsRequired` | ||
|
||
This model lists the unlit extension in both lists, like this: | ||
|
||
``` | ||
"extensionsUsed": [ | ||
"KHR_materials_unlit" | ||
], | ||
"extensionsRequired": [ | ||
"KHR_materials_unlit" | ||
] | ||
``` | ||
|
||
The first list includes all extensions used by the current model, so there's no doubt that `KHR_materials_unlit` belongs there in this case. The second list is a subset of the first list, naming all the extensions that a given glTF viewer is *required* to support in order for this model to be loaded and displayed correctly. In this case, the sample model is a showcase for the visual appearance of the un-lit material, and any visible lighting effects are being declared as errors in the glTF viewer implementation. | ||
|
||
For this reason, I decided to include `KHR_materials_unlit` in the `extensionsRequired` list in this case. A conforming glTF implementation that does not support the `KHR_materials_unlit` extension should find an unknown value in the `extensionsRequired` list, and report an error rather than loading or displaying the model without the unlit material. | ||
|
||
In your own models, if you consider using a lit material to be a reasonable fallback behavior for implementations that don't support this extension, you should omit `KHR_materials_unlit` from the `extensionsRequired` list. | ||
|
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
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