Any way to export 3D interactive to .obj or other 3d format?

please format code with </> button * homework policy * asking questions

Hi There

Project :slight_smile: I want to scan old family photographs, front and back, make them an interactive “3D” (you can look at back or front). I managed to do that. Then I want to NFT that (yea i know…) in order to “immortalize” and not have the weight of keeping the original only.

Issue : I understand ultimately I would have to get a .glb file. I understand from Processing I could export as .OBJ and them convert. But I do not find any way to do that. I tried the nervous system OBJexport but it does not even remotely extract the object correctly.

Do you have any recommendation / way to do this ?
Starting to wonder if Processing was the right way to do this ?

Thanks a lot for your help

Here is the code of my thing :slight_smile:

PImage pix;
PImage picback;
PImage picfront;
int picheight;
int picwidth;

void setup(){
  
  
picfront=loadImage("MauriceFrontCrop.png");
//picfront.resize(200,0);
picfront.resize(0,displayHeight/3+25);
picback=loadImage("MauriceBackCrop.png");
picback.resize(picfront.width,0);

size(displayWidth,displayHeight,P3D);

//get picture size
picheight = picfront.height;
println(picfront.height);
picwidth= picfront.width;
println(picfront.width);

//frameRate(10);

}

//draw background colors
void drawBG(){
  //middle color
    background(131,150,153);
  float l=width/255/2;
  for (int i=0; i<width/2;i++){
    //side color
    stroke (28,37,39,255-i/(l));
    line(i,0,i,height);
    line(width-i,0,width-i,height);
  }}

void draw() {
  
drawBG();
  
//center and rotate draw coordinates
translate(width/2,height/2);
rotateY(map(mouseX,0,width,-PI,PI));
rotateZ(map(0,0,height,0,TWO_PI));

//draw cube
pushStyle();
noFill();
noStroke();
textureCube(pix);
popStyle();
}
 //apply textures
 void textureCube(PImage pix){
   textureFace(picback,0,0,0);
   rotate(PI);
   textureFace(picfront,-PI,0,0);
 }
  
  void textureFace(PImage pix, float rx, float ry, float rz){
    //rotate then draw a face
    pushMatrix();
    rotateX(rx);
    rotateY(ry);
    rotateZ(rz);
    beginShape();
  texture(pix);
  vertex(-picwidth,-picheight,0.1,0,0);
  vertex(picwidth,-picheight,0.1,picwidth,0);
  vertex(picwidth,picheight,0.1,picwidth,picheight);
  vertex(-picwidth,picheight,0.1,0,picheight);
  vertex(-picwidth,-picheight,0.1,0,0);
  endShape();
  popMatrix();
  
  //save pictures to make movie
  //saveFrame("data/photo####.png");
}