Zhehuan commited on
Commit
16e4eae
·
verified ·
1 Parent(s): 4d96c35

Upload nodegraph.usda

Browse files

Upload unitest for PR #1800

Files changed (1) hide show
  1. usd/nodegraph.usda +62 -0
usd/nodegraph.usda ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #usda 1.0
2
+ (
3
+ defaultPrim = "Root"
4
+ metersPerUnit = 1.0
5
+ upAxis = "Z"
6
+ )
7
+
8
+ def "Root"
9
+ {
10
+ def Material "MatDirect"
11
+ {
12
+ token outputs:surface.connect = </Root/MatDirect/Preview.outputs:surface>
13
+
14
+ def Shader "Preview"
15
+ {
16
+ uniform token info:id = "UsdPreviewSurface"
17
+ token outputs:surface
18
+
19
+ # A touch of realism: a base color input
20
+ color3f inputs:diffuseColor = (0.8, 0.2, 0.2)
21
+ }
22
+ }
23
+
24
+ def Material "MatGraph"
25
+ {
26
+ token outputs:surface.connect = </Root/MatGraph/Graph.outputs:surface>
27
+
28
+ def NodeGraph "Graph"
29
+ {
30
+ token outputs:surface.connect = </Root/MatGraph/Graph/Inner.outputs:surface>
31
+
32
+ def Shader "Inner"
33
+ {
34
+ uniform token info:id = "UsdPreviewSurface"
35
+ token outputs:surface
36
+ color3f inputs:diffuseColor = (0.2, 0.6, 0.9)
37
+ }
38
+ }
39
+ }
40
+
41
+ def Xform "Geom"
42
+ {
43
+ def Mesh "MeshDirect"
44
+ {
45
+ # A simple square made of 2 triangles
46
+ int[] faceVertexCounts = [3, 3]
47
+ int[] faceVertexIndices = [0, 1, 2, 2, 3, 0]
48
+ point3f[] points = [(-1, -1, 0), (0, -1, 0), (0, 0, 0), (-1, 0, 0)]
49
+
50
+ rel material:binding = </Root/MatDirect>
51
+ }
52
+
53
+ def Mesh "MeshGraph"
54
+ {
55
+ int[] faceVertexCounts = [3, 3]
56
+ int[] faceVertexIndices = [0, 1, 2, 2, 3, 0]
57
+ point3f[] points = [(0, 0, 0), (1, 0, 0), (1, 1, 0), (0, 1, 0)]
58
+
59
+ rel material:binding = </Root/MatGraph>
60
+ }
61
+ }
62
+ }