We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Update: PeasyCam 0.3.0
Pages: 1 2 3 
Update: PeasyCam 0.3.0 (Read 8241 times)
Re: Update: PeasyCam 0.3.0
Reply #30 - Jul 6th, 2009, 6:10pm
 
Here is an example using ControlP5 on how I currently run a GUI over PeasyCam.
Code:

import peasy.*;
import controlP5.*;
PeasyCam cam;
ControlP5 controlP5;
PMatrix3D currCameraMatrix;
PGraphics3D g3;

int buttonValue = 1;

void setup() {
 size(400,400,P3D);
 g3 = (PGraphics3D)g;
 cam = new PeasyCam(this, 100);
 controlP5 = new ControlP5(this);
 controlP5.addButton("button",10,100,60,80,20).setId(1);
 controlP5.addButton("buttonValue",4,100,90,80,20).setId(2);

}
void draw() {
 
 background(0);
 fill(255,0,0);
 box(30);
 pushMatrix();
 translate(0,0,20);
 fill(0,0,255);
 box(5);
 popMatrix();
 
 gui();
 
}

void gui() {
  currCameraMatrix = new PMatrix3D(g3.camera);
  camera();
  controlP5.draw();
  g3.camera = currCameraMatrix;
}

void controlEvent(ControlEvent theEvent) {
 println(theEvent.controller().id());
}

void button(float theValue) {
 println("a button event. "+theValue);
}
Re: Update: PeasyCam 0.3.0
Reply #31 - Jan 31st, 2010, 9:02am
 
This is a peasycam feature suggestion.
I often use peasy cam when creating movies for showcasing some of my 3d work. I really like it cause i can easily move arround and zoom in and out.
But it would be great if there would be a feature that would turn the camera movement into some kind of elastic movement. so when moving and zooming it would have a little delay and then smoothly move to the new camera position and ease the speed at the end.
This way you would get a really smooth camera movement that would look great in videos...

Just a thought.

Re: Update: PeasyCam 0.3.0
Reply #32 - Jan 31st, 2010, 11:59am
 
this is a nice idea. have often wondered how i'd implement it whilst watching, say, the gantz graf video.

it's probably a simple velocity / acceleration thing with a start and an end point and a cubic curve between the two. the 3d coords make it interesting though...
Re: Update: PeasyCam 0.3.0
Reply #33 - Feb 1st, 2010, 1:54am
 
@ Cedric :
nice suggestion.
But could you post the code you actual use for the camera-movement?
That would already be interesting!!!  Roll Eyes

Greetings,

CHirs
Re: Update: PeasyCam 0.3.0
Reply #34 - Feb 1st, 2010, 3:34am
 
i dont use any code. i move it by hand/mouse. thats why i would love to have a optional smoother movement.
Re: Update: PeasyCam 0.3.0
Reply #35 - Feb 1st, 2010, 6:56am
 

Hello Cedric,

thanks for your reply. It was a misunderstanding.

I have a simple rotation by rotateY

e.g. here

http://www.openprocessing.org/visuals/?visualID=7112

You can switch it on and off with a Flag (generally speaking, not in this sketch, I think).

But this is not what you want, I figure.  Wink

Greetings,

Chrisir

Pages: 1 2 3