Hi there!!
I’m having problems loading 3d models in android.
At java mode, it works nice :
But using android mode I can’t even load it, and importing it to android studio and adding some code on the manifest I can load it, but without textures:
And trying to load a texture, making a PImage and texture(img), is neither working… I don’t know how to do it well… any help is welcome !!
I remember time ago to try the texture and it worked (with a random image and position), but is not working in my model now, or don’t remember the syntax
public class Modelos3D2 extends PApplet {
PShape car;
PImage color;
public void setup() {
car = loadShape("textured.obj");
color = loadImage("image.jpg");
}
public void draw() {
background(255);
lights();
translate(width/2,height/2);
rotate(radians(180));
rotateX(radians(60));
rotateY(radians(180));
scale((float) 0.75);
texture(color); // tried both, to see if one of it
car.texture(color); // works, but not
shape(car);
}
public void settings() { size(displayWidth, displayHeight, P3D); }
}
Thanks !!