File size: 3,480 Bytes
c7ec147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#usda 1.0
(
    defaultPrim = "asset"
    metersPerUnit = 1
    upAxis = "Z"
)

def Xform "asset" (
    prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI", "PhysxRigidBodyAPI", "MaterialBindingAPI"]
)
{
    rel material:binding:physics = </asset/PhysicsMaterial> (
        bindMaterialAs = "strongerThanDescendants"
    )
    bool physics:kinematicEnabled = 1
    float physics:mass = 0.1
    int physxRigidBody:solverPositionIterationCount = 16

    def Material "PhysicsMaterial" (
        prepend apiSchemas = ["PhysicsMaterialAPI"]
    )
    {
        float physics:dynamicFriction = 0.65
        float physics:restitution = 0
        float physics:staticFriction = 0.8
    }

    def Cube "box_1" (
        prepend apiSchemas = ["MaterialBindingAPI", "PhysicsCollisionAPI", "PhysxCollisionAPI"]
    )
    {
        rel material:binding = </asset/Looks/steel>
        float physxCollision:contactOffset = 0.001
        float physxCollision:restOffset = 0
        double size = 1
        float3 xformOp:scale = (0.18, 0.13, 0.003)
        double3 xformOp:translate = (0, 0, 0.0015)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:scale"]
    }

    def "Looks"
    {
        def Material "steel"
        {
            token outputs:surface.connect = </asset/Looks/steel/Surface.outputs:surface>

            def Shader "Surface"
            {
                uniform token info:id = "UsdPreviewSurface"
                color3f inputs:diffuseColor = (0.48, 0.51, 0.54)
                float inputs:metallic = 0.75
                float inputs:roughness = 0.25
                token outputs:surface
            }
        }
    }

    def Cube "box_2" (
        prepend apiSchemas = ["MaterialBindingAPI", "PhysicsCollisionAPI", "PhysxCollisionAPI"]
    )
    {
        rel material:binding = </asset/Looks/steel>
        float physxCollision:contactOffset = 0.001
        float physxCollision:restOffset = 0
        double size = 1
        float3 xformOp:scale = (0.09, 0.003, 0.15)
        double3 xformOp:translate = (0.045, -0.0635, 0.075)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:scale"]
    }

    def Cylinder "tube_3" (
        prepend apiSchemas = ["MaterialBindingAPI"]
    )
    {
        double height = 0.09
        rel material:binding = </asset/Looks/steel>
        double radius = 0.002
        quatf xformOp:orient = (0.70710677, 0, 0.70710677, 0)
        double3 xformOp:translate = (0.045, -0.0635, 0.15)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient"]
    }

    def Cube "box_4" (
        prepend apiSchemas = ["MaterialBindingAPI", "PhysicsCollisionAPI", "PhysxCollisionAPI"]
    )
    {
        rel material:binding = </asset/Looks/steel>
        float physxCollision:contactOffset = 0.001
        float physxCollision:restOffset = 0
        double size = 1
        float3 xformOp:scale = (0.09, 0.003, 0.15)
        double3 xformOp:translate = (0.045, 0.0635, 0.075)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:scale"]
    }

    def Cylinder "tube_5" (
        prepend apiSchemas = ["MaterialBindingAPI"]
    )
    {
        double height = 0.09
        rel material:binding = </asset/Looks/steel>
        double radius = 0.002
        quatf xformOp:orient = (0.70710677, 0, 0.70710677, 0)
        double3 xformOp:translate = (0.045, 0.0635, 0.15)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient"]
    }
}