https://github.com/petrbroz/forge-extra-derivatives-aws
AWS SAM template for the Forge Extra Derivatives service.
https://github.com/petrbroz/forge-extra-derivatives-aws
autodesk-forge gltf usdz
Last synced: 6 months ago
JSON representation
AWS SAM template for the Forge Extra Derivatives service.
- Host: GitHub
- URL: https://github.com/petrbroz/forge-extra-derivatives-aws
- Owner: petrbroz
- Created: 2022-05-05T08:28:36.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-07T14:44:34.000Z (about 3 years ago)
- Last Synced: 2025-02-12T20:37:29.197Z (8 months ago)
- Topics: autodesk-forge, gltf, usdz
- Language: JavaScript
- Homepage: http://forge-extra-derivs-client.s3-website-us-west-2.amazonaws.com/
- Size: 816 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# forge-extra-derivatives-aws
Experimental AWS serverless architecture for post-processing 3D models from [Autodesk Forge](https://forge.autodesk.com)
to additional formats such as [glTF, glb](https://www.khronos.org/gltf), or [Usdz](https://graphics.pixar.com/usd/release/wp_usdz.html).
## Experimental Usage
### REST API
1. Use the `POST https://m5ey85w3lk.execute-api.us-west-2.amazonaws.com/Prod/jobs/{urn}/{guid}` request to process a specific Forge model viewable.
2. Use the `GET https://m5ey85w3lk.execute-api.us-west-2.amazonaws.com/Prod/jobs/{urn}/{guid}` request to check the status of the processing.
3. Use the `POST https://m5ey85w3lk.execute-api.us-west-2.amazonaws.com/Prod/jobs/{urn}/{guid}/signedurl` to generate temporary, read-only
signed URLs for downloading the different artifacts.In all the requests listed above, replace `{urn}` with the Model Derivative URN of your model, and
`{guid}` with the GUID of the specific viewable you want to process, and provide an `Authorization`
header with the same token you would use in requests to the Model Derivative service.> Tip: viewables are listed in the Model Derivative manifest with `"mime": "application/autodesk-svf"`.
### Demo App
Go to [http://forge-extra-derivs-client.s3-website-us-west-2.amazonaws.com](http://forge-extra-derivs-client.s3-website-us-west-2.amazonaws.com),
log in with your Autodesk account, browse through your hubs, projects, and designs. After selecting a specific viewable of a design,
start the conversion process (unless you have already done so in the past), wait for it to complete, and then download or preview
the conversion outputs.## Architecture

Here's a quick description of the different resources used in the AWS SAM template:
- _JobsTable_ - DynamoDB table storing the status of conversion jobs and their artifacts
- _ArtifactsBucket_ - S3 bucket storing the conversion artifacts
- _RestApi_ - REST API definition with CORS settings
- _GetJobFunction_ - Lambda function (Node.js) handling `GET` requests
- _PostJobFunction_ - Lambda function (Node.js) handling `POST` requests
- _GenerateArtifactUrlsFunction_ - Lambda function (Node.js) handling `POST` requests that generate temporary signed URLs for artifacts
- _ConversionStateMachine_ - Step Function orchestrating individual steps of the conversion
- _DownloadSvfFunction_ - Lambda function (Node.js) handling the downloading of SVF assets from Forge
- _ConvertSvfToGltfFunction_ - Lambda function (Node.js) converting SVF assets to glTF
- _ConvertGltfToGlbFunction_ - Lambda function (Node.js) converting glTF to glb
- _ConvertGltfToDracoFunction_ - Lambda function (Node.js) converting glTF to glb with Draco compression
- _ConvertGltfToUsdzFunction_ - Lambda function (Python) using a custom Docker image to convert glb to usdz
- _SharedLayer_ - Lambda layer with shared code and dependencies for all Node.js-based Lambda functionsThe _ConversionStateMachine_ consists of the following states:
