Hello! can someone help me with big image in P3D?

I’m writing code using P3D, but I can’t save a file larger than 48cm wide by 30cm high. can someone help me save images in large sizes?

Like this:

PImage nome;
float angle;
void setup(){
  size(600,600,P3D);
  background(0);

  nome = loadImage("ffff.png");

  
}

void draw(){
  background(0);
  noStroke();
  
  float da = (float)frameCount/3.0;
  
  float s = 25;
  for(float x = 0;x<=width;x+=s){
    for(float y= 0;y<=height;y+=s){
      pushMatrix();
        
        float f = radians(pmouseY + pmouseY);
        float f2 = radians(pmouseX + pmouseX);
        f = map(f, -1,1,0,255); //texto??
        fill(f,f);
        
        translate(x,y,x);
       
        rotateY(f); 
        rotateX(f2);
        image(nome, 0,0);
        
        popMatrix();
        

    }
      

  
  }
  saveFrame("output/obra_####.png");
}

did you try to scale it??, try scale();, if i understand you correctly.
pushMatrix();
float f = radians(pmouseY + pmouseY);
float f2 = radians(pmouseX + pmouseX);
f = map(f, -1,1,0,255); //texto??
fill(f,f);

    translate(x,y,x);
   
    rotateY(f); 
    rotateX(f2);
   scale(0.9);
    image(nome, 0,0);
    
    popMatrix();
1 Like

Thanks for your help. But my problem is another. I cannot save large images. If I increase the size, for example: ‘’‘size (2600,2800, P3D);’’’ , the player disappears from the screen and the saved image is mostly black.
I need to save images using P3D in large sizes.

Use an offscreen PGraphics and do all drawing to that / saving from that. Then draw it scaled down to screen if you want to see it. See https://processing.org/reference/PGraphics.html

Make sure to use createGraphics(2600,2800,P3D); or the offscreen will be Java2D.

2 Likes

Thanks a lot Neil, but still I don’t know how to do what you suggest, I tried following the script https://processing.org/reference/PGraphics.html but it didn’t work out.
Could you show me more specifically how to do this?