Question

I am using Rajawali for 3d rendering in my augmented reality project in android. I want to add 3d models from remote server on marker detection. I also want to change the texture dynamically after downloading PNG from remote server. Now that 3d initialization will be done only once so how can i add another 3d models to the scene?

Was it helpful?

Solution

The code for downloading and parsing of 3d objects should go into "foundFrameMarker" function since in your case the 3d models are not known during initialization.

Once the marker is recognized you can trigger the 3d model download and move the downloaded objects to the SD card (programmatically‎). There should be an API to load the model from SD card. For Obj files the following API should work!

ObjParser objParser =  new ObjParser(RajawaliRenderer renderer, String fileOnSDCard)
objParser.parse();
BaseObject3D 3dModel = objParser.getParsedObject();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top