We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Here is what I am trying to do:
Have a video playing as my background on loop. Check.
Import a custom OBJ object into my 3DP environment. Check.
Set up a camera system (in this case peasy cam) to orbit and move around the OBJ object BUT NOT the video background.
The code I have below I feel like I'm getting close but I'm running into issues trying to get the peasy cam to ignore the video.
Try running this program and see what you end up with. Things get funky when you add the peasy cam.
THANKS
import peasy.*;
import processing.video.*;
PShape s;
String PATH = "/Users/brendanwilson/Desktop/Vidoe_Processing/video/data/comp.mov";
Movie mov;
PeasyCam cam;
void setup() {
size(800, 800, P3D);
smooth();
s = loadShape("rise.obj");
frameRate(30);
mov = new Movie(this, PATH);
mov.loop();
//CAMERA Click & Drag for rotation - Command & Drag for panning
cam = new PeasyCam(this, 100);
cam.setMinimumDistance(0);
cam.setMaximumDistance(1800);
}
void movieEvent(Movie m) {
m.read();
}
void draw() {
lights();
pushMatrix();
translate(-50, -50, -80);
image(mov, 0, 0, width+100, height+100);
popMatrix();
pushMatrix();
translate(280,380);
shape(s, 10, 10, 180, -180);
popMatrix();
}
Answers
Edit post, highlight code, press Ctrl-o.
There is a hud() method in peasycam, head-up display. It draws things without the peasycam transformation applied to them. It might do what you want.