Skip to content

Commit

Permalink
Changed mesh orientations, added normals to triangle mesh, clarified …
Browse files Browse the repository at this point in the history
…camera.

To make it easier for tools which don't yet read both types of USD meshes, this commit changes the geometry to be rightHanded. There should be no visual differences for renderers/software that recognize meshes could have either winding order. (Issue #70)

The triangulated variant now has `normals` authored as well now (Issue #69)

Also re-authored the Camera transform using XformCommonAPI, rather than a 4x4 Matrix, so the translate/rotate values are clear.
  • Loading branch information
crydalch committed Feb 23, 2024
1 parent 746b850 commit 07e13a3
Show file tree
Hide file tree
Showing 10 changed files with 126 additions and 114 deletions.
5 changes: 5 additions & 0 deletions full_assets/StandardShaderBall/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Auto-Generated .rat files from Karma
*.rat

# Ignore Houdini's backup folder
src/backup
3 changes: 3 additions & 0 deletions full_assets/StandardShaderBall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ anisotropic roughnesses are being exercised.

1.0 2023-05-21 First release of USD scene packages with textures and
this specification document.
1.1 2024-02-23 Changed the geometry winding order to right-handed, which
should render the same for packages that support both winding orders. Also
added normals to triangulated surface geometry. Camera transform clarified.

# Contributors

Expand Down
10 changes: 7 additions & 3 deletions full_assets/StandardShaderBall/layers/camera.usda
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
(
customLayerData = {
string License = "CC BY 4.0"
string Version = "1.0"
string Version = "1.1"
}
defaultPrim = "standard_shader_ball_scene"
framesPerSecond = 24
metersPerUnit = 0.01
timeCodesPerSecond = 24
upAxis = "Y"
)

Expand All @@ -18,8 +20,10 @@ def Xform "standard_shader_ball_scene"
float horizontalAperture = 20.955
token projection = "perspective"
float verticalAperture = 20.955
matrix4d xformOp:transform = ( (0.9396926207859084, 0, -0.3420201433256687, 0), (-0.2203032561704394, 0.7649214009184319, -0.6052782217606094, 0), (0.26161852717499334, 0.6441236297613865, 0.7187909959242699, 0), (6.531538924716362, 19.5, 17.948521838355774, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
float3 xformOp:rotateXYZ = (-40.1, 20, 0)
double3 xformOp:translate = (6.53154, 19.5, 17.9485)
float3 xformOp:translate:pivot = (0, 0, 0)
uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:translate:pivot", "xformOp:rotateXYZ", "!invert!xformOp:translate:pivot"]
}
}

71 changes: 28 additions & 43 deletions full_assets/StandardShaderBall/layers/environment.usda
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(
customLayerData = {
string License = "CC BY 4.0"
string Version = "1.0"
string Version = "1.1"
}
defaultPrim = "standard_shader_ball_scene"
framesPerSecond = 24
Expand Down Expand Up @@ -32,12 +32,12 @@ def Xform "standard_shader_ball_scene" (
{
float3[] extent = [(-50, 0, -50), (50, 0, 50)]
int[] faceVertexCounts = [3, 3]
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
uniform token orientation = "leftHanded"
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
uniform token orientation = "rightHanded"
point3f[] points = [(-50, 0, -50), (50, 0, -50), (-50, 0, 50), (50, 0, 50)] (
interpolation = "vertex"
)
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
interpolation = "faceVarying"
)
int[] primvars:st:indices = None
Expand All @@ -56,15 +56,12 @@ def Xform "standard_shader_ball_scene" (
matrix4d xformOp:transform:tweak_lights_position = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 2, 3, 1) )
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:tweak_lights_position"]

def RectLight "light" (
prepend apiSchemas = ["KarmaLightSettingsAPI"]
)
def RectLight "light"
{
float3[] extent = [(-7.4800005, -7.4800005, -0), (7.4800005, 7.4800005, 0)]
float inputs:height = 14.960001
float inputs:intensity = 9
float inputs:width = 14.960001
bool karma:light:renderlightgeo = 1
rel light:filters = None
matrix4d xformOp:transform = ( (-0, 0, 1, 0), (0, 1, 0, 0), (-1, 0, 0, 0), (0.0010000000474974513, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
Expand All @@ -74,7 +71,7 @@ def Xform "standard_shader_ball_scene" (
{
float3[] extent = [(0, -10.311456, -10.311456), (0, 10.311456, 10.311456)]
int[] faceVertexCounts = [3, 3]
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
float[] height = [0, 0, 0, 0] (
interpolation = "vertex"
)
Expand All @@ -84,7 +81,7 @@ def Xform "standard_shader_ball_scene" (
normal3f[] normals = [(1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0)] (
interpolation = "vertex"
)
uniform token orientation = "leftHanded"
uniform token orientation = "rightHanded"
point3f[] points = [(0, -10.311456, -10.311456), (0, -10.311456, 10.311456), (0, 10.311456, -10.311456), (0, 10.311456, 10.311456)] (
interpolation = "vertex"
)
Expand All @@ -108,57 +105,45 @@ def Xform "standard_shader_ball_scene" (
matrix4d xformOp:transform:tweak_lights_position = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 2, 3, 1) )
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:tweak_lights_position"]

def RectLight "light3" (
prepend apiSchemas = ["KarmaLightSettingsAPI"]
)
def RectLight "light3"
{
float3[] extent = [(-12.18, -12.18, -0), (12.18, 12.18, 0)]
float inputs:height = 24.36
float inputs:intensity = 6
float inputs:width = 24.36
bool karma:light:renderlightgeo = 1
rel light:filters = None
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0, -1, 0), (0, 1, 0, 0), (14.300071716308594, -0.00009999999747378752, -15.162029266357422, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
}

def RectLight "light2" (
prepend apiSchemas = ["KarmaLightSettingsAPI"]
)
def RectLight "light2"
{
float3[] extent = [(-12.18, -12.18, -0), (12.18, 12.18, 0)]
float inputs:height = 24.36
float inputs:intensity = 6
float inputs:width = 24.36
bool karma:light:renderlightgeo = 1
rel light:filters = None
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0, -1, 0), (0, 1, 0, 0), (-15.162029266357422, -0.00009999999747378752, -14.300069808959961, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
}

def RectLight "light1" (
prepend apiSchemas = ["KarmaLightSettingsAPI"]
)
def RectLight "light1"
{
float3[] extent = [(-12.18, -12.18, -0), (12.18, 12.18, 0)]
float inputs:height = 24.36
float inputs:intensity = 6
float inputs:width = 24.36
bool karma:light:renderlightgeo = 1
rel light:filters = None
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0, -1, 0), (0, 1, 0, 0), (15.162029266357422, -0.00009999999747378752, 14.300069808959961, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
}

def RectLight "light0" (
prepend apiSchemas = ["KarmaLightSettingsAPI"]
)
def RectLight "light0"
{
float3[] extent = [(-12.18, -12.18, -0), (12.18, 12.18, 0)]
float inputs:height = 24.36
float inputs:intensity = 6
float inputs:width = 24.36
bool karma:light:renderlightgeo = 1
rel light:filters = None
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0, -1, 0), (0, 1, 0, 0), (-14.300070762634277, -0.00009999999747378752, 15.162029266357422, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
Expand All @@ -168,7 +153,7 @@ def Xform "standard_shader_ball_scene" (
{
float3[] extent = [(-31.54725, 0, -31.6542), (31.54725, 0, 31.6542)]
int[] faceVertexCounts = [3, 3]
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
float[] height = [0, 0, 0, 0] (
interpolation = "vertex"
)
Expand All @@ -178,7 +163,7 @@ def Xform "standard_shader_ball_scene" (
normal3f[] normals = [(0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0)] (
interpolation = "vertex"
)
uniform token orientation = "leftHanded"
uniform token orientation = "rightHanded"
point3f[] points = [(-31.54725, 0, -31.6542), (31.54725, 0, -31.6542), (-31.54725, 0, 31.6542), (31.54725, 0, 31.6542)] (
interpolation = "vertex"
)
Expand Down Expand Up @@ -207,13 +192,13 @@ def Xform "standard_shader_ball_scene" (
{
float3[] extent = [(-50, 0, 50), (50, 75.8639, 50)]
int[] faceVertexCounts = [3, 3]
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
rel material:binding:full = </standard_shader_ball_scene/materials/back>
uniform token orientation = "leftHanded"
uniform token orientation = "rightHanded"
point3f[] points = [(50, 75.8639, 50), (-50, 75.8639, 50), (50, 0, 50), (-50, 0, 50)] (
interpolation = "vertex"
)
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
interpolation = "faceVarying"
)
int[] primvars:st:indices = None
Expand All @@ -226,13 +211,13 @@ def Xform "standard_shader_ball_scene" (
{
float3[] extent = [(50, 0, -50), (50, 75.8639, 50)]
int[] faceVertexCounts = [3, 3]
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
rel material:binding:full = </standard_shader_ball_scene/materials/right>
uniform token orientation = "leftHanded"
uniform token orientation = "rightHanded"
point3f[] points = [(50, 75.8639, -50), (50, 75.8639, 50), (50, 0, -50), (50, 0, 50)] (
interpolation = "vertex"
)
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
interpolation = "faceVarying"
)
int[] primvars:st:indices = None
Expand All @@ -245,13 +230,13 @@ def Xform "standard_shader_ball_scene" (
{
float3[] extent = [(-50, 75.8639, -50), (50, 75.8639, 50)]
int[] faceVertexCounts = [3, 3]
int[] faceVertexIndices = [0, 2, 3, 3, 1, 0]
int[] faceVertexIndices = [0, 3, 2, 3, 0, 1]
rel material:binding:full = </standard_shader_ball_scene/materials/top>
uniform token orientation = "leftHanded"
uniform token orientation = "rightHanded"
point3f[] points = [(-50, 75.8639, -50), (50, 75.8639, -50), (-50, 75.8639, 50), (50, 75.8639, 50)] (
interpolation = "vertex"
)
texCoord2f[] primvars:st = [(0, 0), (0, -1), (1, -1), (1, -1), (1, 0), (0, 0)] (
texCoord2f[] primvars:st = [(0, 0), (1, -1), (0, -1), (1, -1), (0, 0), (1, 0)] (
interpolation = "faceVarying"
)
int[] primvars:st:indices = None
Expand All @@ -264,13 +249,13 @@ def Xform "standard_shader_ball_scene" (
{
float3[] extent = [(-50, 0, -50), (50, 75.8639, -50)]
int[] faceVertexCounts = [3, 3]
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
rel material:binding:full = </standard_shader_ball_scene/materials/front>
uniform token orientation = "leftHanded"
uniform token orientation = "rightHanded"
point3f[] points = [(-50, 75.8639, -50), (50, 75.8639, -50), (-50, 0, -50), (50, 0, -50)] (
interpolation = "vertex"
)
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
interpolation = "faceVarying"
)
int[] primvars:st:indices = None
Expand All @@ -283,13 +268,13 @@ def Xform "standard_shader_ball_scene" (
{
float3[] extent = [(-50, 0, -50), (-50, 75.8639, 50)]
int[] faceVertexCounts = [3, 3]
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
rel material:binding:full = </standard_shader_ball_scene/materials/left>
uniform token orientation = "leftHanded"
uniform token orientation = "rightHanded"
point3f[] points = [(-50, 75.8639, 50), (-50, 75.8639, -50), (-50, 0, 50), (-50, 0, -50)] (
interpolation = "vertex"
)
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
interpolation = "faceVarying"
)
int[] primvars:st:indices = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(
customLayerData = {
string License = "CC BY 4.0"
string Version = "1.0"
string Version = "1.1"
}
defaultPrim = "standard_shader_ball_scene"
framesPerSecond = 24
Expand Down
Loading

0 comments on commit 07e13a3

Please sign in to comment.