Skip to content

Commit

Permalink
Workflow update + model README improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
DRx3D committed Aug 1, 2023
1 parent a3a05c9 commit e6e8ee9
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add --verbose .
git diff-index --quiet HEAD || git commit -m "Updating generated Repo indices"
git diff-index HEAD
git commit -m "Updating generated Repo indices"
git push
13 changes: 13 additions & 0 deletions Models/TriangleWithoutIndices/README.body.md
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)
27 changes: 24 additions & 3 deletions Models/TriangleWithoutIndices/README.md
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
2 changes: 1 addition & 1 deletion Models/TriangleWithoutIndices/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
"name": "TriangleWithoutIndices",
"path": "./Models/TriangleWithoutIndices",
"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",
"createReadme": false
"createReadme": true
}
33 changes: 33 additions & 0 deletions Models/UnlitTest/README.body.md
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.

26 changes: 22 additions & 4 deletions Models/UnlitTest/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Unlit Test

## Tags

[testing](../../Models-testing.md), [extension](../../Models-extension.md)

## Summary

Tests if the KHR_materials_unlit extension is supported properly.

## Operations

* [Display](https://github.khronos.org/glTF-Sample-Viewer-Release/?model=https://raw.GithubUserContent.com/KhronosGroup/glTF-Sample-Assets/main/./Models/UnlitTest/glTF-Binary/UnlitTest.glb) in SampleViewer
* [Download GLB](https://raw.GithubUserContent.com/KhronosGroup/glTF-Sample-Assets/main/./Models/UnlitTest/glTF-Binary/UnlitTest.glb)
* [Model Directory](./)

## Screenshot

![screenshot](screenshot/screenshot_large.jpg)
Expand Down Expand Up @@ -33,8 +47,12 @@ For this reason, I decided to include `KHR_materials_unlit` in the `extensionsRe

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.

## License Information

Copyright 2019 Analytical Graphics, Inc.
CC-BY 4.0 https://creativecommons.org/licenses/by/4.0/
Model by Ed Mackey.

## Legal

© 2019, Analytical Graphics, Inc.. [CC BY 4.0 International](https://creativecommons.org/licenses/by/4.0/legalcode)

- Ed Mackey for Everything

#### Assembled by modelmetadata
2 changes: 1 addition & 1 deletion Models/UnlitTest/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
"name": "Unlit Test",
"path": "./Models/UnlitTest",
"summary": "Tests if the KHR_materials_unlit extension is supported properly.",
"createReadme": false
"createReadme": true
}

0 comments on commit e6e8ee9

Please sign in to comment.