[ad_1]
Prospects typically have present 3D CAD (Laptop-aided Design) property that they want to use with AWS IoT TwinMaker. CAD recordsdata are both proprietary codecs optimized to be used in proprietary functions or interchange codecs designed for transferring CAD knowledge from one software to a different. They aren’t often suitable with realtime WebGL viewports like these utilized in AWS IoT TwinMaker, which helps the glTF format. Prospects might want to convert their CAD property to the glTF format earlier than importing these property to AWS IoT TwinMaker.
On this submit, I’ll reveal a workflow for utilizing Pixyz Situation Processor to transform a CAD file within the STEP format to a realtime 3D file within the glTF format. Pixyz Situation Processor is an answer supplied by Pixyz that’s obtainable in AWS Market. It may be configured for a number of totally different eventualities. On this instance, I can be utilizing the GenericPolygonTarget state of affairs. This state of affairs makes use of the commonest settings for changing CAD property to realtime property to be used in recreation engines and WebGL views. It has choices for setting the specified polygon depend, figuring out if objects ought to be merged collectively, and figuring out if hidden objects ought to be deleted.
Overview of resolution
On this walkthrough, you’ll setup Amazon Elastic Container Service (ECS) to run the Pixyz Situation Processor on a file saved in Amazon Easy Storage Service (Amazon S3).
You’ll create an Amazon S3 bucket and add your CAD file for conversion. Additionally, you will create and run an AWS Fargate Job that makes use of the Pixyz Situation Composer container picture to transform the CAD file to glTF. After working the duty, you’ll obtain the ensuing file from Amazon S3 to examine it in a glTF suitable viewer.
Walkthrough
On this walkthrough I’ll reveal the creation of an AWS Fargate Job that may seize a CAD file from an S3 bucket, convert it to a GLB (binary glTF format) file and retailer it again in that S3 bucket. The Fargate Job will use the Pixyz Situation Processor from the AWS Market. This requires adjusting the default IAM coverage for working duties on Amazon ECS to permit for metering utilization of the AWS Market resolution.
We are going to run by way of the next steps:
- Add the supply recordsdata to an S3 Bucket
- Create an IAM Function for working Amazon ECS Duties with the Pixyz Situation Processor
- Create the Community Solely Cluster
- Create the Job Definition
- Run the Fargate Job
- Study the Logs
- (Non-obligatory) Obtain the glTF file and consider it
Stipulations
For this walkthrough, the next are conditions:
- An AWS account
- Amazon S3 to retailer your CAD file
- AWS IAM
- Amazon ECS and AWS Fargate
- A subscription to Pixyz Situation Processor on AWS Market.
- For this instance, you may be charged for utilizing Pixyz Situation Processor with utilization based mostly pricing. Present pricing info is accessible on the AWS Market product web page for Pixyz Situation Processor. Estimated price of finishing this train is $0.25 – $1.00.
- A CAD file to transform. I can be utilizing the file, Waste_Container.step, however you need to use your individual visible property.
Rendering of Waste_Container.step
Step 1: Add the supply recordsdata to an S3 Bucket
- Navigate to the Amazon S3 Console.
- Create a brand new bucket to make use of. I can be utilizing the us-west-2 area for this instance.
My bucket identify is: pixyz-example-20211117. - Create an enter and an output folder contained in the bucket.
- Add the CAD file you need to convert into the enter folder.
I’m utilizing a STEP file: Waste_Container.step.
Waste_Container.step uploaded to Amazon S3
Step 2: Create an IAM Function for working Amazon ECS Duties with the Pixyz Situation Processor
- Navigate to the AWS IAM Console Web page.
- Select the Roles part and press the Create Function button.
- Choose Elastic Container Service, then Elastic Container Service Job, then choose the Subsequent:Permissions button.
- Connect the next Permissions:
- AWSMarketplaceMeteringRegisterUsage (permits AWS Market to Meter utilization)
- AmazonS3FullAccess (permits Amazon ECS to entry the S3 bucket)
- AmazonECSTaskExecutionPolicy (permits Amazon ECS to execute Duties)
- Choose the Subsequent:Tags button.
- Choose the Subsequent:Evaluate button.
- Title the position, I used pixyz-example-role-20211117.
- Add an outline, I used “Function created for Pixyz Situation Processor instance.” Choose the Create position button.
It is best to now have a job that appears much like:
Permissions insurance policies utilized to IAM Function pixyz-example-role-20211117
Step 3: Create the Community Solely Cluster
- Navigate to the Amazon ECS console.
- Navigate to the Clusters part and choose the button to Create Cluster.
- Choose Networking Solely after which the Subsequent step button.
- Configure the Cluster with:
- identify: pixyz-example-cluster
- Allow Create a brand new VPC for this cluster.
- Use default CIDR and subnet blocks.
- Allow Cloudwatch Container Insights.
- Choose the Create button.
Step 4: Create the Job Definition
- Navigate to the Amazon ECS console.
- Navigate to the Job Definition part and choose the button to Create new Job Definition.
- Select the Fargate choice and choose the Subsequent step button.
- Configure the Job:
- Give it a reputation, I used: pixyz-example-task
- For Job position, use the IAM position you created above: pixyz-example-role-20211117
- Working system household: Linux.
- For Job Execution position, once more, use the IAM position you created: pixyz-example-role-20211117
- Job Reminiscence: 4 GB
- Job CPU (vCPU): 1 vCPU
- Create a container with the Add container button and configure with:
- identify: pixyz-example-container
- picture url: 709825985650.dkr.ecr.us-east-1.amazonaws.com/pixyz-software/scenario-processor:2021.1.0.79
- take away port-mappings
- Surroundings Command:
The command template supplied within the Pixyz Situation Processor Fast-Begin is:
In our model we’ve changed:
my-input-bucket-name with pixyz-example-20211117
my-input-bucket-region with us-west-2
enter/inputFile.step with enter/Waste_Container.step
my-output-bucket-name with pixyz-example-20211117
my-output-bucket-region with us-west-2
outputFolder/resultFile.xxx with output/Waste_Container.glb
Step 5: Run the Fargate Job
- Navigate to the Amazon ECS console.
- Navigate to the Job Definition part.
- Choose the Job Definition and from the Actions button choose Run Job.
- Configure the Run Job with:
- Launch Kind: Fargate
- Working System Household: Linux
- Cluster: pixyz-example-cluster
- Add the each of the obtainable Subnets to the Cluster VPC.
- Press the Run Job button to run the duty.
Step 6: Study the Logs
You need to use the Amazon CloudWatch Console to observe the Fargate activity in progress. Because the Pixyz Situation Processor runs it outputs logs to a CloudWatch Log Group.
- Navigate to the Amazon CloudWatch Console.
- Navigate to the Log Teams part and select the ecs/pixzy-example-task log group.
- Choose the Log Stream that may look much like ecs/pixyz-example-container…
- Learn by way of the logs generated by the duty.
Widespread errors are:
- Register error: AccessDenied Exception. The IAM position used doesn’t have the suitable insurance policies. The duty is utilizing an autogenerated ecsTaskExecutionRole as a substitute of the IAM position we created above. You’ll must replace the Job Definition with the right position.
- Bucket Not Discovered. There’s a typo within the Surroundings Command the place the buckets and recordsdata outlined within the command string don’t exist. You’ll must replace the Job Definition with the right bucket names an enter and output folder/filenames.
Step 7: (Non-obligatory) Obtain the glTF file and consider it
- Navigate to the Amazon S3 Console.
- Navigate to the bucket pixyz-example-20211117 and folder output.
- Choose the file generated by the duty, for me that is Waste_Container.glb, and press the Obtain button.
To view glTF and GLB recordsdata on my native pc, I exploit Visible Studio Code with the glTF Instruments extension.
Waste_Container.glb rendered in Visible Studio Code.
Cleansing up
To keep away from incurring ongoing storage fees for objects in Amazon S3 or logs in Amazon CloudWatch, it is best to delete the assets created on this walkthrough. You must also take away the IAM position, AWS Fargate Job Definition and Cluster. Lastly, unsubscribe from the Pixyz Situation Processor to complete cleansing up from this walkthrough.
Take away the S3 bucket, folders, and recordsdata
- Navigate to the Amazon S3 Console and the bucket, pixyz-example-20211117.
- Delete the S3 objects enter/Waste_Container.step and output/WasteContainer.glb.
- Delete the folders enter and output.
- Delete the S3 bucket, pixyz-example-20211117.
Take away the IAM position
- Navigate to the AWS IAM Console.
- Select the Roles part and delete pixyz-example-role-20211117.
Take away the AWS Fargate Job Definition and Cluster
- Navigate to the Amazon ECS console.
- Within the Job Definitions part, use the Actions button to de-register the Job, pixyz-example-task.
- Within the Clusters part, use the Delete Cluster button to delete your cluster, pixyz-example-cluster.
Take away the Logs from Amazon CloudWatch
- Navigate to the Amazon CloudWatch Console.
- Within the Log Teams part, use the Actions button to Delete log group(s), ecs/pixzy-example-task.
Unsubscribe from the Pixyz Situation Processor subscription
- Navigate to the AWS Market Console.
- Choose the Pixyz Situation Processor and use the Actions button to Cancel subscriptions.
Conclusion
On this walkthrough you used the Pixyz Situation Processor to transform a CAD asset to a glTF file that is able to use with AWS IoT TwinMaker. You possibly can modify the AWS Fargate Job to transform another CAD recordsdata you want to use with AWS IoT TwinMaker.
Now that you’ve got a glTF asset, you need to use it with AWS IoT TwinMaker to create digital twins of real-world programs to optimize operations.
In regards to the creator
![]() |
Jeremiah Habets is a Sr. Spatial Marketing consultant with Amazon Net Companies (AWS) Skilled Companies. Jeremiah helps prospects resolve issues in AR/VR, Simulation, Visualizations utilizing realtime 3D know-how. |
[ad_2]

