I'm not familiar with Rajawali, however as I just checked it out, it seems fairly easy to load a remote texture and apply it to a model.
I presume that you've loaded your 3D model and can show it fine. If so, you should take the following basic steps (which apply generally to all 3D modeling apps):
- Prepare texture
- Prepare material
- Apply material to a model
There's a class called Texture
in Rajawali, which creates a texture object from a bitmap image. So, you should first download that image from your server. Downloading process is apart from Rajawali concepts, so you can get it done via many existing libraries.
Once you're finished downloading the image, you can feed it to the Texture
class.
Texture mytexture = new Texture("texture", /*address to the downloaded image*/);
Then, you should add it to a material
try {
material.addTexture(mytexture);
} catch (ATexture.TextureException error){
Log.d(TAG, "Error Occurred");
}
Now, you can apply this material to a model
model.setMaterial(material);