Flip (flop?) texture in a 3d .obj loaded. (java)

Hello everyone. long time no see… : )
I.m loading an file.obj but the texture is flipped or flopped, not sure.
Can I flip it?

I’m using the example code for loading shapes so far.
The model has this files:
Screenshot 2024-03-03 at 09.51.40

so the code is like this so far.

PShape terreno;


  
public void setup() {
  size(1920, 1080, P3D);   
  terreno = loadShape("Mariana_simplified_3d_mesh.obj");
}

public void draw() {
  background(0);
  lights();
  
  translate(width/2, height/2 + 100, -200);
  shape(terreno);
}

I just did:

PShape terreno;


  
public void setup() {
  size(1920, 1080, P3D);   
  terreno = loadShape("Mariana_simplified_3d_mesh.obj");
  
  // HERE ! :)
  terreno.scale(1, -1, 1);
}

public void draw() {
  background(0);
  lights();
  
  translate(width/2, height/2 + 100, -200);
  shape(terreno);
}

and worked…

so simple : )

1 Like