Skip to content

Latest commit

 

History

History
87 lines (66 loc) · 6.06 KB

File metadata and controls

87 lines (66 loc) · 6.06 KB

USDSTL

Supported features

Feature Import Export
Scene up axis
Scene units
Node hierarchy
Node transform matrix
Node TRS
Node animations
Cameras
Mesh positions
Mesh normals
Mesh uvs
Mesh vertex colors
Mesh skinning
Mesh blend shapes
Mesh instancing
Mesh bounding box
Nurbs
Skeletons
Skeleton Animations
Materials

Translation Notes

Geometric normals will calculated and used on both import and export. Custom per-face normals will be ignored and are not supported at this point.

Import:

The generated USD will be set with up axis = +z as that's the most common for stl files.

File Format Arguments

Export:

  • exportAscii: If true, the stl file will be in ascii format, otherwise in binary format. (Note: there is currently a known bug, where the file may still export in binary regardless of this setting)

Example:

#usda 1.0
(
    doc = "Blender v3.1.2"
    metersPerUnit = 1
    upAxis = "Z"
    customLayerData = {
  	bool exportASCII = false
  }
)

def Xform "Cube_001"
{
    matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1.4112299680709839, 0), (0.9483106136322021, 0, 1.1584662199020386, 1) )
    uniform token[] xformOpOrder = ["xformOp:transform"]

    def Mesh "Cube_002"
    {
        int[] faceVertexCounts = [4, 4, 4, 4, 4, 4]
        int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 7, 6, 6, 7, 5, 4, 4, 5, 1, 0, 2, 6, 4, 0, 7, 3, 1, 5]
        point3f[] points = [(-1, -1, -1), (-1, -1, 1), (-1, 1, -1), (-1, 1, 1), (1, -1, -1), (1, -1, 1), (1, 1, -1), (1, 1, 1)]
        uniform token subdivisionScheme = "none"
    }
}

Debug codes

  • FILE_FORMAT_STL: Common debug messages.