Skip to content

Commit 07e13a3

Browse files
committed
Changed mesh orientations, added normals to triangle mesh, clarified 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 usd-wg#70) The triangulated variant now has `normals` authored as well now (Issue usd-wg#69) Also re-authored the Camera transform using XformCommonAPI, rather than a 4x4 Matrix, so the translate/rotate values are clear.
1 parent 746b850 commit 07e13a3

File tree

10 files changed

+126
-114
lines changed

10 files changed

+126
-114
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore Auto-Generated .rat files from Karma
2+
*.rat
3+
4+
# Ignore Houdini's backup folder
5+
src/backup

full_assets/StandardShaderBall/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ anisotropic roughnesses are being exercised.
400400

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

404407
# Contributors
405408

full_assets/StandardShaderBall/layers/camera.usda

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
(
33
customLayerData = {
44
string License = "CC BY 4.0"
5-
string Version = "1.0"
5+
string Version = "1.1"
66
}
77
defaultPrim = "standard_shader_ball_scene"
8+
framesPerSecond = 24
89
metersPerUnit = 0.01
10+
timeCodesPerSecond = 24
911
upAxis = "Y"
1012
)
1113

@@ -18,8 +20,10 @@ def Xform "standard_shader_ball_scene"
1820
float horizontalAperture = 20.955
1921
token projection = "perspective"
2022
float verticalAperture = 20.955
21-
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) )
22-
uniform token[] xformOpOrder = ["xformOp:transform"]
23+
float3 xformOp:rotateXYZ = (-40.1, 20, 0)
24+
double3 xformOp:translate = (6.53154, 19.5, 17.9485)
25+
float3 xformOp:translate:pivot = (0, 0, 0)
26+
uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:translate:pivot", "xformOp:rotateXYZ", "!invert!xformOp:translate:pivot"]
2327
}
2428
}
2529

full_assets/StandardShaderBall/layers/environment.usda

+28-43
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(
33
customLayerData = {
44
string License = "CC BY 4.0"
5-
string Version = "1.0"
5+
string Version = "1.1"
66
}
77
defaultPrim = "standard_shader_ball_scene"
88
framesPerSecond = 24
@@ -32,12 +32,12 @@ def Xform "standard_shader_ball_scene" (
3232
{
3333
float3[] extent = [(-50, 0, -50), (50, 0, 50)]
3434
int[] faceVertexCounts = [3, 3]
35-
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
36-
uniform token orientation = "leftHanded"
35+
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
36+
uniform token orientation = "rightHanded"
3737
point3f[] points = [(-50, 0, -50), (50, 0, -50), (-50, 0, 50), (50, 0, 50)] (
3838
interpolation = "vertex"
3939
)
40-
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
40+
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
4141
interpolation = "faceVarying"
4242
)
4343
int[] primvars:st:indices = None
@@ -56,15 +56,12 @@ def Xform "standard_shader_ball_scene" (
5656
matrix4d xformOp:transform:tweak_lights_position = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 2, 3, 1) )
5757
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:tweak_lights_position"]
5858

59-
def RectLight "light" (
60-
prepend apiSchemas = ["KarmaLightSettingsAPI"]
61-
)
59+
def RectLight "light"
6260
{
6361
float3[] extent = [(-7.4800005, -7.4800005, -0), (7.4800005, 7.4800005, 0)]
6462
float inputs:height = 14.960001
6563
float inputs:intensity = 9
6664
float inputs:width = 14.960001
67-
bool karma:light:renderlightgeo = 1
6865
rel light:filters = None
6966
matrix4d xformOp:transform = ( (-0, 0, 1, 0), (0, 1, 0, 0), (-1, 0, 0, 0), (0.0010000000474974513, 0, 0, 1) )
7067
uniform token[] xformOpOrder = ["xformOp:transform"]
@@ -74,7 +71,7 @@ def Xform "standard_shader_ball_scene" (
7471
{
7572
float3[] extent = [(0, -10.311456, -10.311456), (0, 10.311456, 10.311456)]
7673
int[] faceVertexCounts = [3, 3]
77-
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
74+
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
7875
float[] height = [0, 0, 0, 0] (
7976
interpolation = "vertex"
8077
)
@@ -84,7 +81,7 @@ def Xform "standard_shader_ball_scene" (
8481
normal3f[] normals = [(1, 0, 0), (1, 0, 0), (1, 0, 0), (1, 0, 0)] (
8582
interpolation = "vertex"
8683
)
87-
uniform token orientation = "leftHanded"
84+
uniform token orientation = "rightHanded"
8885
point3f[] points = [(0, -10.311456, -10.311456), (0, -10.311456, 10.311456), (0, 10.311456, -10.311456), (0, 10.311456, 10.311456)] (
8986
interpolation = "vertex"
9087
)
@@ -108,57 +105,45 @@ def Xform "standard_shader_ball_scene" (
108105
matrix4d xformOp:transform:tweak_lights_position = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 2, 3, 1) )
109106
uniform token[] xformOpOrder = ["xformOp:transform", "xformOp:transform:tweak_lights_position"]
110107

111-
def RectLight "light3" (
112-
prepend apiSchemas = ["KarmaLightSettingsAPI"]
113-
)
108+
def RectLight "light3"
114109
{
115110
float3[] extent = [(-12.18, -12.18, -0), (12.18, 12.18, 0)]
116111
float inputs:height = 24.36
117112
float inputs:intensity = 6
118113
float inputs:width = 24.36
119-
bool karma:light:renderlightgeo = 1
120114
rel light:filters = None
121115
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0, -1, 0), (0, 1, 0, 0), (14.300071716308594, -0.00009999999747378752, -15.162029266357422, 1) )
122116
uniform token[] xformOpOrder = ["xformOp:transform"]
123117
}
124118

125-
def RectLight "light2" (
126-
prepend apiSchemas = ["KarmaLightSettingsAPI"]
127-
)
119+
def RectLight "light2"
128120
{
129121
float3[] extent = [(-12.18, -12.18, -0), (12.18, 12.18, 0)]
130122
float inputs:height = 24.36
131123
float inputs:intensity = 6
132124
float inputs:width = 24.36
133-
bool karma:light:renderlightgeo = 1
134125
rel light:filters = None
135126
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0, -1, 0), (0, 1, 0, 0), (-15.162029266357422, -0.00009999999747378752, -14.300069808959961, 1) )
136127
uniform token[] xformOpOrder = ["xformOp:transform"]
137128
}
138129

139-
def RectLight "light1" (
140-
prepend apiSchemas = ["KarmaLightSettingsAPI"]
141-
)
130+
def RectLight "light1"
142131
{
143132
float3[] extent = [(-12.18, -12.18, -0), (12.18, 12.18, 0)]
144133
float inputs:height = 24.36
145134
float inputs:intensity = 6
146135
float inputs:width = 24.36
147-
bool karma:light:renderlightgeo = 1
148136
rel light:filters = None
149137
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0, -1, 0), (0, 1, 0, 0), (15.162029266357422, -0.00009999999747378752, 14.300069808959961, 1) )
150138
uniform token[] xformOpOrder = ["xformOp:transform"]
151139
}
152140

153-
def RectLight "light0" (
154-
prepend apiSchemas = ["KarmaLightSettingsAPI"]
155-
)
141+
def RectLight "light0"
156142
{
157143
float3[] extent = [(-12.18, -12.18, -0), (12.18, 12.18, 0)]
158144
float inputs:height = 24.36
159145
float inputs:intensity = 6
160146
float inputs:width = 24.36
161-
bool karma:light:renderlightgeo = 1
162147
rel light:filters = None
163148
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 0, -1, 0), (0, 1, 0, 0), (-14.300070762634277, -0.00009999999747378752, 15.162029266357422, 1) )
164149
uniform token[] xformOpOrder = ["xformOp:transform"]
@@ -168,7 +153,7 @@ def Xform "standard_shader_ball_scene" (
168153
{
169154
float3[] extent = [(-31.54725, 0, -31.6542), (31.54725, 0, 31.6542)]
170155
int[] faceVertexCounts = [3, 3]
171-
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
156+
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
172157
float[] height = [0, 0, 0, 0] (
173158
interpolation = "vertex"
174159
)
@@ -178,7 +163,7 @@ def Xform "standard_shader_ball_scene" (
178163
normal3f[] normals = [(0, 1, 0), (0, 1, 0), (0, 1, 0), (0, 1, 0)] (
179164
interpolation = "vertex"
180165
)
181-
uniform token orientation = "leftHanded"
166+
uniform token orientation = "rightHanded"
182167
point3f[] points = [(-31.54725, 0, -31.6542), (31.54725, 0, -31.6542), (-31.54725, 0, 31.6542), (31.54725, 0, 31.6542)] (
183168
interpolation = "vertex"
184169
)
@@ -207,13 +192,13 @@ def Xform "standard_shader_ball_scene" (
207192
{
208193
float3[] extent = [(-50, 0, 50), (50, 75.8639, 50)]
209194
int[] faceVertexCounts = [3, 3]
210-
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
195+
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
211196
rel material:binding:full = </standard_shader_ball_scene/materials/back>
212-
uniform token orientation = "leftHanded"
197+
uniform token orientation = "rightHanded"
213198
point3f[] points = [(50, 75.8639, 50), (-50, 75.8639, 50), (50, 0, 50), (-50, 0, 50)] (
214199
interpolation = "vertex"
215200
)
216-
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
201+
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
217202
interpolation = "faceVarying"
218203
)
219204
int[] primvars:st:indices = None
@@ -226,13 +211,13 @@ def Xform "standard_shader_ball_scene" (
226211
{
227212
float3[] extent = [(50, 0, -50), (50, 75.8639, 50)]
228213
int[] faceVertexCounts = [3, 3]
229-
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
214+
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
230215
rel material:binding:full = </standard_shader_ball_scene/materials/right>
231-
uniform token orientation = "leftHanded"
216+
uniform token orientation = "rightHanded"
232217
point3f[] points = [(50, 75.8639, -50), (50, 75.8639, 50), (50, 0, -50), (50, 0, 50)] (
233218
interpolation = "vertex"
234219
)
235-
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
220+
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
236221
interpolation = "faceVarying"
237222
)
238223
int[] primvars:st:indices = None
@@ -245,13 +230,13 @@ def Xform "standard_shader_ball_scene" (
245230
{
246231
float3[] extent = [(-50, 75.8639, -50), (50, 75.8639, 50)]
247232
int[] faceVertexCounts = [3, 3]
248-
int[] faceVertexIndices = [0, 2, 3, 3, 1, 0]
233+
int[] faceVertexIndices = [0, 3, 2, 3, 0, 1]
249234
rel material:binding:full = </standard_shader_ball_scene/materials/top>
250-
uniform token orientation = "leftHanded"
235+
uniform token orientation = "rightHanded"
251236
point3f[] points = [(-50, 75.8639, -50), (50, 75.8639, -50), (-50, 75.8639, 50), (50, 75.8639, 50)] (
252237
interpolation = "vertex"
253238
)
254-
texCoord2f[] primvars:st = [(0, 0), (0, -1), (1, -1), (1, -1), (1, 0), (0, 0)] (
239+
texCoord2f[] primvars:st = [(0, 0), (1, -1), (0, -1), (1, -1), (0, 0), (1, 0)] (
255240
interpolation = "faceVarying"
256241
)
257242
int[] primvars:st:indices = None
@@ -264,13 +249,13 @@ def Xform "standard_shader_ball_scene" (
264249
{
265250
float3[] extent = [(-50, 0, -50), (50, 75.8639, -50)]
266251
int[] faceVertexCounts = [3, 3]
267-
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
252+
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
268253
rel material:binding:full = </standard_shader_ball_scene/materials/front>
269-
uniform token orientation = "leftHanded"
254+
uniform token orientation = "rightHanded"
270255
point3f[] points = [(-50, 75.8639, -50), (50, 75.8639, -50), (-50, 0, -50), (50, 0, -50)] (
271256
interpolation = "vertex"
272257
)
273-
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
258+
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
274259
interpolation = "faceVarying"
275260
)
276261
int[] primvars:st:indices = None
@@ -283,13 +268,13 @@ def Xform "standard_shader_ball_scene" (
283268
{
284269
float3[] extent = [(-50, 0, -50), (-50, 75.8639, 50)]
285270
int[] faceVertexCounts = [3, 3]
286-
int[] faceVertexIndices = [0, 1, 3, 3, 2, 0]
271+
int[] faceVertexIndices = [0, 3, 1, 3, 0, 2]
287272
rel material:binding:full = </standard_shader_ball_scene/materials/left>
288-
uniform token orientation = "leftHanded"
273+
uniform token orientation = "rightHanded"
289274
point3f[] points = [(-50, 75.8639, 50), (-50, 75.8639, -50), (-50, 0, 50), (-50, 0, -50)] (
290275
interpolation = "vertex"
291276
)
292-
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, -1), (1, -1), (0, -1), (0, 0)] (
277+
texCoord2f[] primvars:st = [(0, 0), (1, -1), (1, 0), (1, -1), (0, 0), (0, -1)] (
293278
interpolation = "faceVarying"
294279
)
295280
int[] primvars:st:indices = None

full_assets/StandardShaderBall/layers/example_materials.usda

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(
33
customLayerData = {
44
string License = "CC BY 4.0"
5-
string Version = "1.0"
5+
string Version = "1.1"
66
}
77
defaultPrim = "standard_shader_ball_scene"
88
framesPerSecond = 24

0 commit comments

Comments
 (0)