android-3D-model-viewer icon indicating copy to clipboard operation
android-3D-model-viewer copied to clipboard

I want to load a single model directly from REPO_URL

Open PiyushKumarDongre opened this issue 2 years ago • 1 comments

Hi, I want to load a single model directly from REPO_URL, which is in obj format along with texture files. It works fine the default way, by setting the REPO_URL in MenuActivity, LoadModel->Repository->Select the one from chooser dialog. I want to avoid the "Chooser Dialog" which lists the name of fetched files having "obj|stl|dae|index" extension and directly load the model.

If I bypass the chooser, and try to launch it directly by calling launchModelRendererActivity(Uri.parse(files.get(0))); , I get the model without any texture.

Kindly help me with this.

PiyushKumarDongre avatar Oct 23 '22 02:10 PiyushKumarDongre

Hello buddy That is the correct method for loading the model. But you need to provide the material or texture files into the ContentUtils component beforehand. Please check the API of ContentUtils in order to preload those files. Please mind that you may probably need to set the Android Context as well into this ContentUtils component. Regards

andresoviedo avatar Oct 25 '22 07:10 andresoviedo