Skip to main content

3D Basic Conversion Pipeline

The 3D Basic Conversion pipeline converts 3D mesh files between common interchange formats using the Trimesh library. It runs as a containerized AWS Lambda function, making it a lightweight and fast option for format conversion without requiring a VPC or AWS Batch infrastructure. This pipeline is enabled by default in new VAMS deployments.

Supported Formats

The pipeline supports conversion between any of the following formats:

FormatExtensionDescription
STL.stlStereolithography -- widely used in 3D printing and CAD
OBJ.objWavefront OBJ -- common mesh interchange format
PLY.plyPolygon File Format -- supports vertex colors and normals
GLTF.gltfGL Transmission Format -- open standard for 3D scenes
GLB.glbBinary GLTF -- single-file variant of GLTF
3MF.3mf3D Manufacturing Format -- 3D printing standard
XAML.xamlXAML 3D -- Microsoft 3D format
3DXML.3dxmlDassault Systemes 3D XML format
DAE.daeCOLLADA -- collaborative design activity format
XYZ.xyzPoint cloud text format -- simple ASCII coordinate data
Bidirectional Conversion

Any supported format can be converted to any other supported format. For example, you can convert STL to GLB, OBJ to PLY, or DAE to GLTF. The pipeline uses Trimesh's import/export capabilities to handle the translation.

Architecture

Execution Type

This pipeline uses the Lambda execution type with synchronous invocation. It does not require an AWS Step Functions task token callback because the Lambda function returns results directly. The pipeline is registered in VAMS as a synchronous pipeline.

No Task Token

This pipeline must be registered as NOT needing a task token callback. If a workflow passes a TaskToken to this pipeline, it will reject the request with an error.

Processing Flow

  1. The Lambda function receives the request body containing the input Amazon S3 URI, output Amazon S3 URI, and target output format.
  2. The input file is downloaded from the asset bucket to the Lambda container's /tmp directory.
  3. Trimesh loads the mesh file, performing automatic format detection based on the file extension.
  4. The mesh is exported to the specified target format using Trimesh's export capabilities.
  5. The converted file is uploaded to the output path in the asset bucket using multipart upload for large files.

Configuration

Enable this pipeline in infra/config/config.json:

{
"app": {
"pipelines": {
"useConversion3dBasic": {
"enabled": true,
"autoRegisterWithVAMS": true
}
}
}
}

Configuration Options

OptionDefaultDescription
enabledtrueDeploy the 3D basic conversion pipeline. This is the only built-in pipeline enabled by default.
autoRegisterWithVAMStrueAutomatically register the pipeline and workflow during CDK deployment.
Enabled by Default

Unlike other built-in pipelines, the 3D Basic Conversion pipeline is enabled by default (enabled: true) because it is a lightweight Lambda-based pipeline that does not require a VPC or additional compute infrastructure.

Input Parameters

When executing the pipeline through a workflow, the following parameters are provided:

ParameterRequiredDescription
inputS3AssetFilePathYesAmazon S3 URI of the input file (e.g., s3://bucket/key/model.stl)
outputS3AssetFilesPathYesAmazon S3 URI of the output directory (e.g., s3://bucket/key/)
outputTypeYesTarget file extension including the dot (e.g., .glb, .obj, .ply)

Output Naming

The output file retains the original filename but with the new extension. For example, converting pump.stl to GLB produces pump.glb in the output directory.

Prerequisites

No VPC Required

This pipeline runs as a containerized Lambda function and does not require a VPC. It operates independently of the global VPC setting, although it will be placed in the VPC if app.useGlobalVpc.useForAllLambdas is set to true.

Container Image

The Lambda container image is built during CDK deployment from backendPipelines/conversion/3dBasic/lambdaContainer/Dockerfile. It includes:

  • Python 3.12 -- Lambda runtime
  • Trimesh -- 3D mesh loading and export library
  • boto3 -- AWS SDK for Amazon S3 operations

Infrastructure Components

ResourceServicePurpose
Container Lambda FunctionAWS LambdaMesh conversion execution
Container ImageAmazon ECRTrimesh container image
Step Functions State MachineAWS Step FunctionsWorkflow orchestration
Lambda Function (vamsExecute)AWS LambdaPipeline coordination

Limitations

ConstraintDetails
Maximum file sizeLimited by Lambda container /tmp storage (10 GB)
Execution timeout15 minutes (Lambda maximum)
Geometry onlyConverts mesh geometry; complex materials, animations, or scene hierarchies may not transfer between all formats
No texture bakingTexture references are preserved where both input and output formats support them, but textures are not embedded or converted