need to record video
in
Contributed Library Questions
•
10 months ago
hey everyone,
I'm very green with the whole coding experience, only just started a few days ago by trying out other people's codes and visualising.
I have this code and I need to know if there's a way I could record the output of my sketch? I've been trying to use processing.video but some of the code doesn't work (I get an error about void setup for example, saying "unexpected token")
I'd appreciate it if anyone could help me sort this out? I'll include the code as well.
Cheers! It feels good (potentially) joining your community :)
- import com.onformative.screencapturer.*;
- import peasy.*;
- ScreenCapturer capturer;
- PeasyCam cam;
- PImage capture;
- void setup() {
- size(1024, 768,P3D);
- cam = new PeasyCam(this,200);
- capturer = new ScreenCapturer(width, height, 30);
- capture = createImage(width,height,RGB);
- }
- void draw() {
- background(0);
- translate(-width/2,-height/2);
- capture = capturer.getImage();
- //image(capturer.getImage(), 0, 0);
- int steps = 3;
- for ( int i = 0; i<width/steps; i++) {
- for ( int j = 0; j<height/steps; j++) {
- pushMatrix();
- color c = capture.get(i*steps,j*steps);
- float z = brightness(c);
- fill(c);
- stroke(c);
- translate(i*steps,j*steps,z);
- // box(steps-2);
- point(0,0,0);
- popMatrix();
- }
- }
- }
1