Skip to content

Commit

Permalink
Fixing testsuite issues using 21.02+ and supporting new and old light…
Browse files Browse the repository at this point in the history
… parameter naming conventions. (Autodesk#881) (Autodesk#882)

Fixes Autodesk#880
Fixes Autodesk#772
  • Loading branch information
sirpalee authored Sep 16, 2021
1 parent 399a442 commit 0b7bbe7
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 61 deletions.
2 changes: 2 additions & 0 deletions testsuite/test_0015/data/scene.usda
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def "World"
{
uniform token info:id = "arnold:flat"
color3f inputs:color = (0,0,1)
token outputs:surface
}
}

Expand All @@ -41,6 +42,7 @@ def "World"
{
uniform token info:id = "arnold:standard_surface"
color3f inputs:base_color = (0.5,1,1)
token outputs:surface
}
}

Expand Down
16 changes: 8 additions & 8 deletions testsuite/test_0140/data/test.usda
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ def Xform "lights"
prepend apiSchemas = ["ShapingAPI"]
)
{
color3f color = (1, 0.3, 0.2)
float diffuse = 1
bool enableColorTemperature = 0
float exposure = 7
float intensity = 2
bool normalize = 1
asset shaping:ies:file = "file.ies"
float specular = 1
color3f inputs:color = (1, 0.3, 0.2)
float inputs:diffuse = 1
bool inputs:enableColorTemperature = 0
float inputs:exposure = 7
float inputs:intensity = 2
bool inputs:normalize = 1
asset inputs:shaping:ies:file = "file.ies"
float inputs:specular = 1
bool treatAsPoint = 0
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0.7037717123658266, -0.7104261938257008, 0), (0, 0.7104261938257008, 0.7037717123658266, 0), (0, 4, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
Expand Down
40 changes: 31 additions & 9 deletions testsuite/test_0181/data/test.usda
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,21 @@ def Xform "pointLight1"(apiSchemas = ["CollectionAPI:lightLink", "CollectionAPI:
{
def SphereLight "pointLightShape1"
{
color3f color = (1, 0, 0)
float diffuse = 1
float exposure = 0
float intensity = 64
color3f inputs:color = (1, 0, 0)
float inputs:diffuse = 1
float inputs:exposure = 0
float inputs:intensity = 64
color3f color = (1, 1, 1)
float diffuse = 5
float exposure = 2
float intensity = 14
vector3f[] primvars:arnold:position = [(0, 0, 0)]
string primvars:dcc_name = "pointLightShape1" (
elementSize = 1
interpolation = "constant"
)
float specular = 1
float inputs:specular = 1
float specular = 5
bool treatAsPoint = 1
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 6.294501781463623, 3.448580503463745, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
Expand All @@ -112,7 +117,8 @@ def Xform "transform1"
color3f color = (0, 1, 0)
float diffuse = 1
float exposure = 0
float height = 2
float inputs:height = 2
float height = 20
float intensity = 64
bool normalize = 1
string[] primvars:arnold:filters = ["defaultLightDecay"]
Expand All @@ -122,7 +128,8 @@ def Xform "transform1"
interpolation = "constant"
)
float specular = 1
float width = 2
float width = 15
float inputs:width = 2
matrix4d xformOp:transform = ( (0.95982426404953, 0.28060176968574524, 0, 0), (0.012077394872903824, -0.0413118451833725, -0.999073326587677, 0), (-0.2803417146205902, 0.9589348435401917, -0.04304105043411255, 0), (0, 6.185134410858154, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]

Expand All @@ -145,8 +152,10 @@ def Xform "transform2"
{
def DomeLight "aiSkyDomeLight"
{
color3f color = (1, 1, 1)
prepend color3f color.connect = </ramp1.outputs:out>
color3f inputs:color = (1, 1, 1)
prepend color3f inputs:color.connect = </ramp1.outputs:out>
color3f color = (0.5, 0.5, 0.5)
prepend color3f color.connect = </ramp2.outputs:out>
float diffuse = 1
float exposure = 0
float intensity = 1
Expand Down Expand Up @@ -199,6 +208,19 @@ def Shader "ramp1"
color3f outputs:out
}

def Shader "ramp2"
{
uniform token info:id = "arnold:ramp_rgb"
color3f[] inputs:color = [(0.585, 0.53418667, 0.032560002), (0.753, 0.753, 1), (0, 0, 1)]
int[] inputs:interpolation = [1, 1, 1]
string inputs:name = "ramp1"
float[] inputs:position = [0.45, 0.5, 1]
string inputs:type = "v"
string inputs:use_implicit_uvs = "curves_only"
bool inputs:wrap_uvs = 1
color3f outputs:out
}

def Xform "pCube1"
{
def Mesh "pCubeShape1"
Expand Down
Loading

0 comments on commit 0b7bbe7

Please sign in to comment.