Howdy, Stranger!

We are about to switch to a new forum software. Until then we have removed the registration on this forum.

  • UnsatisfiedLinkError in Eclipse

    I think what matters for this calculation is the buffer size and not so much the sampling rate. I will guess the buffer size of your app could be 1024 bins. Maybe you could lower it to 256 and see if this helps. I would suggest using the default sketch size of 100x100 is the lowest you can go but should reduce overhead. Unfortunately, these changes might not make any major improvement and you are truly limited by your platform.

    @jeremydouglass Do you know anything about running processing in headless mode? I believe I saw a post talking about his mode, running processing in a server where there was no graphical support. I might be using the wrong terminology.... or I might be wrong and I could have seen it in another forum.

    *****EDIT: More about headless mode:
    https://forum.processing.org/two/search?Search=xvfb
    https://forum.processing.org/two/search?Search=headless

    Kf

  • PGraphics in P2D mode renders only black color.

    @Patakk --

    If you are doing long runs with hundreds of thousands of images then you may want to disconnect from a running session and reconnect later.

    In that case, you should probably use the second option from the "Running without a Display" discussion that @koogs linked above:

    sudo Xvfb :1 -screen 0 1024x768x24 </dev/null &
    export DISPLAY=":1"
    

    ...and when you run the sketch from the command line as per those instructions:

    /home/<username>/processing/processing-java --sketch=/path/to/sketch/folder --run
    

    ...do so with something session-reconnection-friendly like screen

  • Rendering 3D scenes correctly from headless Processing instance

    I have the following test sketch, which aims to render a cube with perspective and shading, and write the rendered scene to a PDF file:

    import processing.pdf.*;
    
    void setup() {
      size(640, 360, P3D);
      noStroke();
      fill(204);
    }
    
    void draw() {
      beginRaw(PDF, "output.pdf");
    
      // Do all your drawing here
      background(0);
      lights();
    
      float fov = PI/3.0;
      float cameraZ = (height/2.0) / tan(fov/2.0);
      perspective(fov, float(width)/float(height), cameraZ/2.0, cameraZ*2.0);
    
      translate(width/2, height/2, 0);
      rotateX(-PI/6);
      rotateY(PI/3);
      box(160);
    
      endRaw();
      println("Finished.");
      exit();
    }
    

    If I render this scene from a headless instance of processing-java via an Xvfb frame buffer, then I get a cube with the wrong background color and no shading (lighting):

    If I modify the code so that I don't exit from the script, e.g.:

    import processing.pdf.*;
    
    void setup() {
      size(640, 360, P3D);
      noStroke();
      fill(204);
    }
    
    void draw() {
      beginRaw(PDF, "output.pdf");
    
      // Do all your drawing here
      background(0);
      lights();
    
      float fov = PI/3.0;
      float cameraZ = (height/2.0) / tan(fov/2.0);
      perspective(fov, float(width)/float(height), cameraZ/2.0, cameraZ*2.0);
    
      translate(width/2, height/2, 0);
      rotateX(-PI/6);
      rotateY(PI/3);
      box(160);
    
      endRaw();
      //println("Finished.");
      //exit();
    }
    

    Then the "headed"-display renders with correct shading:

    So I think the script itself is correct, insofar as it creates the scene I want so long as I don't call exit(), but I'm not doing something correct to get a rendering into a PDF file. Is there something I am missing or doing incorrectly here? Thanks for any advice.

  • Running headless on Raspberry Pi

    I'm trying to run an exported Processing app on my Raspberry Pi, but I'm getting an error when running headless. I tried following the suggested Processing instructions but I get this error when running the Xvfb command:

    sudo Xvfb :1 -screen 0 1024x768x24
    _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
    _XSERVTransOpen: transport open failed for inet6/botserver:1
    _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
    [dix] Could not init font path element /usr/share/fonts/X11/misc, removing from list!
    [dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
    [dix] Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list!
    [dix] Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list!
    [dix] Could not init font path element /usr/share/fonts/X11/100dpi, removing from list!
    [dix] Could not init font path element /usr/share/fonts/X11/75dpi, removing from list!
    [dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!
    

    After which it just hangs until I control-C out.

    Any help is most appreciated!

  • using processing as a web server and upload files from a browser

    KevinWorkman, from the feedback of those having tried, even Processing as a library needs a display. The workaround they used is to simulate such display with xvfb.

    secondsky, there are lot of small free web server software available, it is simpler and more efficient to choose one for what you describe. A nice one is Mongoose, for example.

  • installing and running processing on yocto linux

    People wanting to run Processing on an headless server mention they use Xvfb

  • Using Processing2 as backend video processing library (no graphical user interface)

    OK, you did your search, and I agree it isn't necessarily an easy topic to search if you don't know the keywords to search (and even if you know them!).

    This topic has been asked a few time, eg. to run Processing on a Web server. One keyword is headless. Another one is Xvfb, if you run on a Unix-like system.