-
Notifications
You must be signed in to change notification settings - Fork 412
test: Add StandardShaderBall test scene and common models directory #2149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jmp-22
wants to merge
4
commits into
AcademySoftwareFoundation:main
Choose a base branch
from
jmp-22:test/add-shaderball-testrender-scene
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7aabd17
test(testrender): Add render-shaderball testsuite entry
jmp-22 172948d
test: Add testsuite/common/models directory
jmp-22 61ed95a
test: Reference common models relative to the build tree
jmp-22 3829a06
test: Document StandardShaderBall attribution and licensing
jmp-22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
File renamed without changes.
This file contains hidden or 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,73 @@ | ||
| <!-- Copyright Contributors to the Open Shading Language project. --> | ||
| <!-- SPDX-License-Identifier: CC-BY-4.0 --> | ||
|
|
||
| Standard Shader Ball | ||
| ==================== | ||
|
|
||
| The geometry in this directory is derived from the **StandardShaderBall** | ||
| asset published by the USD Working Group: | ||
|
|
||
| https://github.com/usd-wg/assets/tree/main/full_assets/StandardShaderBall | ||
|
|
||
| The matching textures live in `testsuite/render-shaderball/maps` and come | ||
| from the same asset. | ||
|
|
||
|
|
||
| Credits | ||
| ------- | ||
|
|
||
| * Chris Rydalch — geometry and textures | ||
| * André Mazzone — specification and validation | ||
| * Thomas Anagnostou — original scene, inspiration, and consultation | ||
|
|
||
| Per the upstream README, the asset descends from the "Simball" / "Material | ||
| Preview" scene created by Thomas Anagnostou, which was originally released | ||
| under a Creative Commons Attribution-ShareAlike license. The USD Working | ||
| Group asset is released under Creative Commons Attribution 4.0. | ||
|
|
||
|
|
||
| License | ||
| ------- | ||
|
|
||
| This material is licensed under the Creative Commons Attribution 4.0 | ||
| International License (`SPDX-License-Identifier: CC-BY-4.0`). | ||
|
|
||
| To view a copy of this license, visit | ||
| https://creativecommons.org/licenses/by/4.0/ or send a letter to | ||
| Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. | ||
|
|
||
| The upstream license file is at: | ||
| https://github.com/usd-wg/assets/blob/main/full_assets/StandardShaderBall/LICENCE | ||
|
|
||
| Note that this is a different license from the BSD-3-Clause license that | ||
| covers OSL's own source code. See the repository's `THIRD-PARTY.md`. | ||
|
|
||
|
|
||
| Modifications | ||
| ------------- | ||
|
|
||
| `shaderball.obj` and `shaderball.mtl` are **modified** from the upstream | ||
| asset. The upstream asset is distributed as USD with MaterialX shading | ||
| networks; OSL's `testrender` reads Wavefront OBJ, so the scene was imported | ||
| into Blender 3.4.1 and re-exported as OBJ + MTL. The changes are: | ||
|
|
||
| * **Format conversion**, USD to Wavefront OBJ. The USD stage is flattened | ||
| into a single file, with each mesh written as an OBJ group. | ||
|
|
||
| * **Triangulation.** All faces in the exported mesh are triangles. | ||
| UVs and normals are preserved. | ||
|
|
||
| * **Shading networks removed.** The upstream MaterialX networks are not | ||
| carried over. The exported `.mtl` retains the upstream *material names*, | ||
| which `testrender` uses to bind OSL shader groups. | ||
|
|
||
| * **Emissive geometry added.** The upstream asset lights its scene with | ||
| USD area lights, which are analytic and are not representable | ||
| in Wavefront OBJ. `testrender` has no area lights either, instead it | ||
| illuminates a scene with emissive geometry. Light-emitting planes | ||
| were added in their place, positioned to match the upstream light | ||
| transforms. These are the `emitterTop0`--`emitterTop3` and | ||
| `emitterLeft0` groups. | ||
|
|
||
| Apart from the added emissive planes, no changes were made to the shape of | ||
| the modeled geometry beyond the triangulation performed by the exporter. | ||
This file contains hidden or 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,129 @@ | ||
| # StandardShaderBall, Copyright (c) Chris Rydalch, André Mazzone, | ||
| # and Thomas Anagnostou. | ||
| # https://github.com/usd-wg/assets/tree/main/full_assets/StandardShaderBall | ||
| # Licensed under CC BY 4.0: https://creativecommons.org/licenses/by/4.0/ | ||
| # SPDX-License-Identifier: CC-BY-4.0 | ||
| # Modified from the upstream USD asset: converted to Wavefront OBJ via | ||
| # Blender. See README.md in this directory for details. | ||
| # Blender 3.4.1 MTL File: 'shaderball-light-geo.blend' | ||
| # www.blender.org | ||
|
|
||
| newmtl back | ||
| Ns 0.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl backplane | ||
| Ns 360.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl emitterLeft | ||
| Ns 360.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl emitterTop | ||
| Ns 360.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl front | ||
| Ns 0.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl ground | ||
| Ns 0.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl left | ||
| Ns 0.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl material_surface | ||
| Ns 360.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl neutral | ||
| Ns 0.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl right | ||
| Ns 0.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl sss_bars | ||
| Ns 0.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 1.000000 1.000000 1.000000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 | ||
|
|
||
| newmtl top | ||
| Ns 0.000000 | ||
| Ka 1.000000 1.000000 1.000000 | ||
| Kd 0.800000 0.800000 0.800000 | ||
| Ks 0.500000 0.500000 0.500000 | ||
| Ke 0.000000 0.000000 0.000000 | ||
| Ni 1.000000 | ||
| d 1.000000 | ||
| illum 2 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OSL project uses 2 standard licenses: BSD-3-Clause for code, and CC-BY-4.0 for docs and other non-code things. We mention this and link to the CC pages in the main README.md of this project. So you aren't adding any new or different kinds of licenses here, and I think you can just minimally note that the original data the shaderball file is derived from was also CC-BY-4.0 and give a link to the usd-wg repo where it lives.