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.
Pages: 1 2 
Camera interface (Read 7677 times)
Re: Camera interface
Reply #15 - May 14th, 2005, 3:51pm
 
great! I'll try both.
Really thanks!
Re: Camera interface
Reply #16 - May 14th, 2005, 7:45pm
 
so, I finally found the source of my problems: opengl.

If you try the zoom example using gl instead of p3d, it won't work...

If you have any idea for a hack workaround...

thanks again!
Re: Camera interface
Reply #17 - Jun 1st, 2005, 1:09am
 
Yes, I just stumbled in to this as well. Anyone have any ideas as to how to get OCD camera.zoom() to work in openGL?

Thanks,
Re: Camera interface
Reply #18 - Jun 7th, 2005, 9:04pm
 
hi kristian,
any word on this request (from lunetta, below)  i'm in a similar position - i'm creating a linear animation and want to be able to set up multiple points and animate between them.  i can get my camera where i want it, but without extensive println-ing, i have no way to know where 'it' is once i'm there.

something like Camera.dump() would be great, just a method to expose the private values like cameraX/Y/Z and targetX/Y/Z.

thanks!

lunetta wrote on May 8th, 2005, 4:52am:
hey Damkjer,

I think both modes are fine (relative is even easier to implement the user feedback, absolute is easier to script animations), I was just wondering ways to retrieve the values;
I have a situation where I find a good points of view of my geometry and want to save them for later, to a sketch presentation; it would be great to get camera1.zoom value, camera1.eyeX value, so on so forth...

anyway, I'm an adopter and a fan of OCD. Thanks!


Re: Camera interface
Reply #19 - Jun 7th, 2005, 9:47pm
 
Hi there,

I've been a wee bit negligent in visiting the forums these last few weeks. I've had some requests for OCD that I'm hoping to add in soon (lunetta and depth Wink). I'll also look into the zoom issue with JOGL and see if I can either tweak the behavior or at least advise about the quirk.
Re: Camera interface
Reply #20 - Jun 7th, 2005, 10:24pm
 
another request/suggestion -- is there a reason that methods that involve moving/rotating along camera vectors (truck, boom, dolly, tilt, pan, roll) are cumulative/relative rather than absolute?

for example, roll() does not roll the camera TO an angle specified by the parameter, but BY that angle.  so in order to rotate TO a specified angle, you have to calculate the difference and plug that in.

that makes it difficult to code eased animation.  for example, easing a graphic element in processing would work like this:

Code:

float x = 0;
float tgtX = 100;
float speed = .05f;

void setup () {
size(200, 200, P3D);
}

void draw () {
background(0);
x += (tgtX - x) * speed;
rect(x, 50, 50, 50);
}


however, if i want to ease a camera roll, say from 0 to HALF_PI, i have to do this:

Code:

import damkjer.ocd.*;

Camera cam;

float rollVal = 0;
float tgtRV = HALF_PI;
float speed = .05f;

void setup () {
size(200, 200, P3D);
cam = new Camera(this, width/2, height/2, (height/2)*sqrt(3), width/2, height/2, 0); //default processing view
}

void draw () {
background(0);
rect(0, 50, 50, 50);

float dRV = (tgtRV-rollVal) * speed;
rollVal += dRV;
cam.roll(dRV); //use delta, instead of new value (as in ease example above)
cam.feed();
}


the current setup works, but it doesn't seem quite in-line with the rest of processing.  just something to consider...

-d
Pages: 1 2