Skip to content

Commit

Permalink
Merge branch 'main' into PotOfCoalsAnimationPointer
Browse files Browse the repository at this point in the history
  • Loading branch information
echadwick-artist committed Nov 18, 2024
2 parents 539171f + 517a5db commit f729061
Show file tree
Hide file tree
Showing 310 changed files with 22,885 additions and 5,141 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/AssetCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: glTF Validation

on: [push, pull_request]
on: [pull_request]

env:
CI: true
LINK: "https://github.com/KhronosGroup/glTF-Validator/releases/download/2.0.0-dev.3.8/gltf_validator-2.0.0-dev.3.8-linux64.tar.xz"
LINK: "https://github.com/KhronosGroup/glTF-Validator/releases/download/2.0.0-dev.3.10/gltf_validator-2.0.0-dev.3.10-linux64.tar.xz"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install glTF Validator
run: |
Expand All @@ -21,7 +21,7 @@ jobs:
./gltf_validator -r -a ./Models/
- name: Upload Validation Reports
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: validation-reports
path: |
Expand Down
116 changes: 115 additions & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Copyright:
2018 Analytical Graphics, Inc.
License: CC-BY-4.0

Files: Models/AnimatedColorsCube/*
Copyright:
2024 Public
License: CC0-1.0

Files: Models/AnimatedCube/*
Copyright:
2017 UX3D
Expand Down Expand Up @@ -171,6 +176,103 @@ Copyright:
2023 Public
License: CC0-1.0

Files: Models/CompareAlphaCoverage/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareAmbientOcclusion/*
Copyright:
2017 Khronos Group
2024 Public
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareAnisotropy/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareBaseColor/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareClearcoat/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareDispersion/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareEmissiveStrength/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareIor/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareIridescence/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareMetallic/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareNormal/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareRoughness/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareSheen/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareSpecular/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareTransmission/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/CompareVolume/*
Copyright:
2017 Khronos Group
2024 Public
License: LicenseRef-LegalMark-Khronos AND CC0-1.0

Files: Models/Corset/*
Copyright:
2017 UX3D
Expand All @@ -189,8 +291,9 @@ License: CC-BY-4.0 AND CC-BY-NC-4.0

Files: Models/DiffuseTransmissionPlant/*
Copyright:
2024 Darmstadt Graphics Group GmbH
2021 Public domain
License: CC0-1.0
License: CC-BY-4.0 AND CC0-1.0

Files: Models/DiffuseTransmissionTeacup/*
Copyright:
Expand Down Expand Up @@ -384,6 +487,11 @@ Copyright:
2023 Analytical Graphics, Inc.
License: CC-BY-4.0

Files: Models/NodePerformanceTest/*
Copyright:
2024 Public
License: CC0-1.0

Files: Models/NormalTangentMirrorTest/*
Copyright:
2018 Analytical Graphics, Inc.
Expand Down Expand Up @@ -452,6 +560,12 @@ Copyright:
2023 Public
License: CC0-1.0

Files: Models/SheenWoodLeatherSofa/*
Copyright:
2024 Darmstadt Graphics Group GmbH
2021 Public domain
License: CC-BY-4.0 AND CC0-1.0

Files: Models/SimpleInstancing/*
Copyright:
2023 Public
Expand Down
30 changes: 22 additions & 8 deletions Models/AlphaBlendModeTest/README.body.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,43 @@

This model tests the various alpha modes available in glTF 2.0. There are three settings for `alphaMode`: `"OPAQUE"` (the default), `"BLEND"`, and `"MASK"`. Of these, `"MASK"` takes an additional `alphaCutoff` value that modifies it.

## `OPAQUE` vs `BLEND`
## Successful Test: `OPAQUE` vs `BLEND`

![screenshot](screenshot/OpaqueVsBlend.jpg)

The box on the far left uses the default alphaMode, `OPAQUE`. Although the texturemap supplies an alpha channel, the alpha values are intentionally ignored here.

The next box shows the effects of alpha blending. The texture contains a linear alpha ramp inside a black border, along with some labels. At the bottom there are green check marks and hidden red X's, that will show check marks only when the requested mode is correctly applied.

## Problem: Alpha Values Used in Opaque Mode
## Common Problems with `OPAQUE` and `BLEND`

### Problem: Alpha Values Used in Opaque Mode

![screenshot](screenshot/OpaqueFail.jpg)

The above screenshot shows what typically happens if a rendering engine decides to process alpha values from a texturemap without blending being specifically requested. This is a test failure, and should be corrected in the engine.

Note that a red "X" mark has appeared next to `OPAQUE`, due to a green checkmark with zero alpha values being blended away.

# Problem: Lack of Alpha Blending
### Problem: Lack of Alpha Blending

![screenshot](screenshot/BlendFail.jpg)

In the above screenshot, it appears that alpha blending is not available, or not enabled when a model requests it. This is also a test failure, and could be due to a missing feature or other issues in the rendering engine.

Note that a red "X" mark has appeared next to `BLEND`. This "X" has zero alpha values, and should be blended away, revealing a green checkmark behind it.

## `MASK` and `alphaCutoff`
### Problem: Premultiplied Alpha

![screenshot](screenshot/PremultipliedAlphaFail.jpg)

The black areas indicated above are due to pre-multiplying alpha values into color values on a material marked as `OPAQUE`. The [relevant section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#alpha-coverage) of the glTF specification states:

> `OPAQUE` - The rendered output is fully opaque and any alpha value is ignored.
The alpha value must be completely ignored, not premultiplied into the color channels. If this rule is not followed, a black box appears next to the word "Opaque", and the test fails.

## Successful Test: `MASK` and `alphaCutoff`

![screenshot](screenshot/CutoffTests.jpg)

Expand All @@ -40,20 +52,22 @@ Because the alpha values in the box are a smooth linear ramp, we can expect the

Note that alpha blending should not be applied here: Each texel is either fully opaque or discarded. Depth buffering with writes enabled may be used in `MASK` mode.

## Known Mipmapping Issues
## Common problems with `MASK` and `alphaCutoff`

### Known Mipmapping Issues

![screenshot](screenshot/MissingBorder.png)

When a texture gets farther from the camera, a process called mipmapping may be used to blend texels (texturemap pixels) together. This particular test model has a very thin opaque border adjacent to a lot of transparent texels. When mipmapping blends these together, the resulting alpha values can land in the middle someplace. Setting a high alpha mask cutoff value can cause these blended texels to be discarded. This is not considered a failure for the purpose of this particular test. However, if you see this effect in your own models, you may wish to set a lower cutoff value or increase the thickness of the affected area.

## Problem: `alphaCutoff` Not Respected
### Problem: `alphaCutoff` Not Respected

![screenshot](screenshot/CutoffValueFail.jpg)

In the above screenshot, the requested `alphaCutoff` value is not being respected, and the default value of `0.5` appears to be applied regardless of the setting. This is a test failure.

## Problem: No Default Cutoff
### Problem: No Default Cutoff

![screenshot](screenshot/CutoffDefaultFail.jpg)

In this screenshot, it appears that the rendering engine is not using the value `0.5` for the default value of `alphaCutoff` when the model does not specify a particular value. The glTF specification [names `0.5` as the default](https://github.com/KhronosGroup/glTF/blob/0890b76c62cc762ce82d4010df9bfebb1634839b/specification/2.0/schema/material.schema.json#L68), so this is a test failure.
In this screenshot, it appears that the rendering engine is not using the value `0.5` for the default value of `alphaCutoff` when the model does not specify a particular value. The glTF specification [names `0.5` as the default](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_material_alphacutoff), so this is a test failure.
31 changes: 23 additions & 8 deletions Models/AlphaBlendModeTest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,43 @@ Tests alpha modes and settings.

This model tests the various alpha modes available in glTF 2.0. There are three settings for `alphaMode`: `"OPAQUE"` (the default), `"BLEND"`, and `"MASK"`. Of these, `"MASK"` takes an additional `alphaCutoff` value that modifies it.

## `OPAQUE` vs `BLEND`
## Successful Test: `OPAQUE` vs `BLEND`

![screenshot](screenshot/OpaqueVsBlend.jpg)

The box on the far left uses the default alphaMode, `OPAQUE`. Although the texturemap supplies an alpha channel, the alpha values are intentionally ignored here.

The next box shows the effects of alpha blending. The texture contains a linear alpha ramp inside a black border, along with some labels. At the bottom there are green check marks and hidden red X's, that will show check marks only when the requested mode is correctly applied.

## Problem: Alpha Values Used in Opaque Mode
## Common Problems with `OPAQUE` and `BLEND`

### Problem: Alpha Values Used in Opaque Mode

![screenshot](screenshot/OpaqueFail.jpg)

The above screenshot shows what typically happens if a rendering engine decides to process alpha values from a texturemap without blending being specifically requested. This is a test failure, and should be corrected in the engine.

Note that a red "X" mark has appeared next to `OPAQUE`, due to a green checkmark with zero alpha values being blended away.

# Problem: Lack of Alpha Blending
### Problem: Lack of Alpha Blending

![screenshot](screenshot/BlendFail.jpg)

In the above screenshot, it appears that alpha blending is not available, or not enabled when a model requests it. This is also a test failure, and could be due to a missing feature or other issues in the rendering engine.

Note that a red "X" mark has appeared next to `BLEND`. This "X" has zero alpha values, and should be blended away, revealing a green checkmark behind it.

## `MASK` and `alphaCutoff`
### Problem: Premultiplied Alpha

![screenshot](screenshot/PremultipliedAlphaFail.jpg)

The black areas indicated above are due to pre-multiplying alpha values into color values on a material marked as `OPAQUE`. The [relevant section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#alpha-coverage) of the glTF specification states:

> `OPAQUE` - The rendered output is fully opaque and any alpha value is ignored.
The alpha value must be completely ignored, not premultiplied into the color channels. If this rule is not followed, a black box appears next to the word "Opaque", and the test fails.

## Successful Test: `MASK` and `alphaCutoff`

![screenshot](screenshot/CutoffTests.jpg)

Expand All @@ -56,23 +68,26 @@ Because the alpha values in the box are a smooth linear ramp, we can expect the

Note that alpha blending should not be applied here: Each texel is either fully opaque or discarded. Depth buffering with writes enabled may be used in `MASK` mode.

## Known Mipmapping Issues
## Common problems with `MASK` and `alphaCutoff`

### Known Mipmapping Issues

![screenshot](screenshot/MissingBorder.png)

When a texture gets farther from the camera, a process called mipmapping may be used to blend texels (texturemap pixels) together. This particular test model has a very thin opaque border adjacent to a lot of transparent texels. When mipmapping blends these together, the resulting alpha values can land in the middle someplace. Setting a high alpha mask cutoff value can cause these blended texels to be discarded. This is not considered a failure for the purpose of this particular test. However, if you see this effect in your own models, you may wish to set a lower cutoff value or increase the thickness of the affected area.

## Problem: `alphaCutoff` Not Respected
### Problem: `alphaCutoff` Not Respected

![screenshot](screenshot/CutoffValueFail.jpg)

In the above screenshot, the requested `alphaCutoff` value is not being respected, and the default value of `0.5` appears to be applied regardless of the setting. This is a test failure.

## Problem: No Default Cutoff
### Problem: No Default Cutoff

![screenshot](screenshot/CutoffDefaultFail.jpg)

In this screenshot, it appears that the rendering engine is not using the value `0.5` for the default value of `alphaCutoff` when the model does not specify a particular value. The glTF specification [names `0.5` as the default](https://github.com/KhronosGroup/glTF/blob/0890b76c62cc762ce82d4010df9bfebb1634839b/specification/2.0/schema/material.schema.json#L68), so this is a test failure.
In this screenshot, it appears that the rendering engine is not using the value `0.5` for the default value of `alphaCutoff` when the model does not specify a particular value. The glTF specification [names `0.5` as the default](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_material_alphacutoff), so this is a test failure.


## Legal

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Models/AnimatedColorsCube/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# LICENSE file for the model: Animated Colors Cube

All files in this directory tree are licensed as indicated below.

* All files directly associated with the model including all text, image and binary files:

* [CC0 1.0 Universal]("https://creativecommons.org/publicdomain/zero/1.0/legalcode") [SPDX license identifier: "CC0-1.0"]

* This file and all other metadocumentation files including "metadata.json":

* [Creative Commons Attribtution 4.0 International]("https://creativecommons.org/licenses/by/4.0/legalcode") [SPDX license identifier: "CC-BY-4.0"]

Full license text of these licenses are available at the links above

#### Generated by modelmetadata
15 changes: 15 additions & 0 deletions Models/AnimatedColorsCube/README.body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Screenshot

![screenshot](screenshot/screenshot-large.gif)

## Description

This model tests the [`KHR_animation_pointer`](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_animation_pointer) extension's effect on the `baseColorFactor` of a material. When animated, the top cube should rotate above other colored cubes, and change its own color to match the cubes below.

This model was created in Blender 4.2.0 by placing keyframes for a material's default base color and using the "Push Down Action" button in the NLA Track Editor. The glTF export settings were configured with "Animation Mode" set to "NLA Tracks" and with a checkmark placed on "Animation Pointer (experimental)".

## Possible Problems

- If the top cube moves but stays red the entire time, it may indicate that `KHR_animation_pointer` is not supported in your renderer.

- If the color changes become out-of-sync with the physical motion of the cube, it may indicate that the various animation tracks are not being driven by the same clock. The movement is defined for the `[0, 3]` range while colors are defined for the `[0, 2.5]` range. This checks that the last color keyframe remains active until the movement track is complete. A similar test exists in the [BoxAnimated](../BoxAnimated) sample without any animation pointers.
Loading

0 comments on commit f729061

Please sign in to comment.