3D Model management with Object Store Service on SAP Cloud Platform
This blog will help you understand how we can manage the 3D model using Object Store (S3 bucket) on SAP Cloud Platform (SCP). Using this approach users can organize 3d models that can be used later to render into your custom applications or share with your customers.
Please take some time to read my previous blog which will explain why there is a need to have 3D model vault – Retail with AR
- Enable Service: ObjectStore
- Install Visual Studio code to modify the code sample
This is an ideal architecture that one can use but this blog will focus on the red highlighted block. Let’s check how we can achieve this.
Create Object store instance on SCP
Login to your SCP account and browse to your CF space. Select Object Store and create one instance.
Now that you have created an instance we need to create a service key to get the access details.
Copy the following items from the service key to your notepad. We will need this later to access the S3 bucket.
Middleware to access Object store and expose services –
To make your task simple I have uploaded my project on GitHub which you can download and start working on it. You need to modify few things before you use this project.
- Download the project – https://github.com/jayadnure/S3-Bucket.git
- Navigate to S3-Bucket/S3-VOContainer/.vscode/launch.env
- Enter the credentials which you had copied from the service key in the previous step.
- Open your terminal and change your working directory to the current project
- Run “npm install” to install all the dependencies
- You can test it by running “node ./src/app.js” to validate if the node server is up and running
Test the Services using the node server –
Now that we have created a node server that communicates with Object Store (S3 bucket)to manage your 3d model. I have uploaded a test POSTMAN collection which you can use to test the service.
- Download S3-Bucket/S3.postman_collection.json
- Import in your Postman client
- Upload – Select a 3D model to upload into the bucket
- You can use the test 3d model from the project folder with the name “Bottle_s.obj”
We have successfully created an Object store instance and made it available using the node js server. It’s time to push the app to cloud foundry so that we can consume this service in our custom applications. You create your own Admin dashboard using UI5/HTMl5/React to manage the models.
Client application –
We have created an iOS application using Unity3d that consumes these services to download the 3d model and render it in any environment. Let’s check out a small video to see this magic –
When you launch the app it gets a list of models you uploaded and later on-demand it downloads and renders on the screen.
I hope you enjoyed this blog post! Please feel free to contact me and let me know your thoughts on using this approach to build custom applications using 3d models.
Hi Jay Adnure
Thanks for writing this blog.
Just want to know .. will this object store service work with BTP, ABAP ?
any references will be helpful
Thank you for referring my blog. Yes you can use Object store service on BTP-
Hope it helps you.