Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cmake/testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ macro (osl_add_all_tests)
render-mx-medium-vdf
render-mx-medium-vdf-glass
render-microfacet render-oren-nayar
render-shaderball
render-spi-thinlayer
render-uv render-veachmis render-ward
render-raytypes
Expand Down
26 changes: 26 additions & 0 deletions testsuite/common/models/shaderball/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Copyright Contributors to the Open Shading Language project. -->
<!-- SPDX-License-Identifier: CC-BY-4.0 -->

Standard Shader Ball
====================

`shaderball.obj` and `shaderball.mtl` are derived from the **StandardShaderBall**
asset published by the USD Working Group, which is licensed CC-BY-4.0:

https://github.com/usd-wg/assets/tree/main/full_assets/StandardShaderBall

Credit: Chris Rydalch (geometry and textures), André Mazzone (specification and
validation), Thomas Anagnostou (original scene and inspiration).

Modifications
-------------

The original USD asset was imported into Blender 3.4.1 and re-exported as
Wavefront OBJ + MTL for `testrender`, which triangulates the mesh and drops the
shading networks. The exported `.mtl` retains the original material names, which
`testrender` uses to assign OSL shader groups.

Additional geometry in the form of emission planes were added in place of USD area
lights, which cannot be represented in OBJ format and which `testrender` can not use.
These are the `emitterTop0` through `emitterTop3` and `emitterLeft0` groups. The
modeled geometry is otherwise unchanged.
127 changes: 127 additions & 0 deletions testsuite/common/models/shaderball/shaderball.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# StandardShaderBall, from the USD Working Group asset repository:
# https://github.com/usd-wg/assets/tree/main/full_assets/StandardShaderBall
# Copyright (c) Chris Rydalch, André Mazzone, Thomas Anagnostou.
# SPDX-License-Identifier: CC-BY-4.0
# Converted from USD to 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
Loading
Loading