3D Model Collection App
Hello everyone,
In this article, I will introduce you to the Huawei Mobile Services 3D Modeling Kit, and I will explain how we can create a application with this kit.
What is 3D Modeling Kit?
I want to give general information about 3D Modelling kit.
This kit automatically generate 3D object models and PBR texture maps and capture motion in the real world, for remarkably efficient and cost-effective 3D content production. Our 3D collection app automatically generates a 3D model with a texture for an object using images. Its mean we will take some photos of 3D object than we will upload the cloud after that cloud will return us 3D object file.
3D Modelling Kit:
Setting up the 3D Modelling Integration
You’ll need to do setup before you can use the 3D Modelling Kit. You can follow the official documentation on how to prepare app and enable kit on App Gallery Connect and start the project with details.
Also you can follow this blog post to integrate your apps with Huawei HMS Core:
So until here we should finish this steps:
- Register a developer account on HUAWEI Developers and configure AGC.
- Create your app on Android Studio and create your signature.
- Add the AppGallery Connect Configuration File of Your App.
- Configuring the Maven Repository Address for the HMS Core SDK.
- Add permission to manifest file.
Prerequisites
- We are using 3D Object Reconstruction and this capability runs on the cloud and is available only for devices connected to the Internet.
- Just internet not enough for uploading images we need to sign with Huawei account before upload request, it will give us permission to interact cloud.
3. 3D models can be stored for seven days at most after being generated. You can configure the data retention period in AppGallery Connect.
Before start development i want to show summary of Build Dependencies, you can find detail in our project link.
Project Overview
This project has two part one part is showing object that stored on your phone and other part is creating object from real world. For first part I use Android 3D Model Viewer and its using OpenGL ES 2.0. In this tutorial we will focus second part.
Below image is from our main page. Show button is for first part and create button is for second part.
Project Development
- First step sign in with Huawei ID, our LoadActivity class will handle this part.
- We need to create a 3D object reconstruction engine and configurator and initialize the engine.
- Create a listener callback to process the image upload result.
- Create a listener callback to process the model file download result
- Use the configurator to initialize the task, set the upload listener for the engine, and upload collected images.
- Query the status of the 3D object reconstruction task and if it succes load the page.
- We already create a listener callback to process the model file download result, no we will pass the download listener to the engine to download the model file.
Result
Thank you for reading this article.
I hope this gives you a starting point for HMS 3D Modelling Kit.
References:
My 3D Modelling App: