[sharing] 3D Camera Movements in Max 6
I came up with this really simple patch that shows how to use jit.anim.drive to make really smooth, totally nice-looking 3D camera movements in Jitter, with easing and everything. As a bonus, I also included a little subpatch that connects to a Space Navigator mouse. Now, go create some galaxies to explore!
nice, can't wait for your gen recipes :)
thank you Andrew!!!
Hello Andrew,
First i want to thank for this wonderfull example !
But i have a litte problem:
I am trying to stare and recall different views of the camera.
I am grabbing the position and the rotatxyz attributes.
But the stored and the recalled views are not the same.
Is there an other attribute as position and rotatxyz, which
is set, when moving the camera with "move" and "turn" ?
Thanks for any help,
TT
here is my example patch:
hi timtom. the views are the same. it's just that every time you bang your preset, it is causing the scene to be randomly regenerated, because your preset is including the main toggle that triggers the scene randomization.
thank you very much for looking into the patch robert.
now it works !
one little thing is not clear from my point of view.
the pattr oblect, which is bind to the rotatexyz attribute of the camera
is not outputting the attribute if you change it with the mouse
(using the jit.anim.drive)
also the cameras attrui object does not update.
here is a smal example:
hi andrew - is there any way to set limits on an axis of camera rotation? - I'd like to be able stop the camera from looking too far up or down.
i am considering adding limits as a feature to jit.anim.node, so your request is registered.
in the meantime, you can to this yourself simply by keeping track for the current camera x and y rotation, and not allowing additional rotations when you've reached your limits.
the example patch Max6/examples/jitter-examples/render/anim/anim.camera.advanced.maxpat
give one way to do this in the "limit-orient" sub-patch.
Robert - thanks, but unfortunately the anim.camera.advanced.maxpat example you gave uses mouse movement as input, unlike Andrew's example, which uses jit.anim.drive, and so it's not at all obvious how the 'limit-orient' sub-patch could be repurposed for jit.anim.drive -- since jit.anim.drive has to be connected directly to the object/node that it's controlling.
actually, jit.anim.drive does not need to be directly connected.
it simply outputs animation messages (anim_turn, anim_move, anim_grow).
however, note that the fourth argument to the animation message is speed, and needs to be multiplied with the first three args for proper scaling of the animation.
you can set the @targetname attribute manually, and bypass the need for direct connections.
but yes, i agree limit attributes would be useful.
by god - it actually works - a bit of a hiccup now and then, but it works!
thanks Robert!
although I just realized I left out the fourth speed argument, and when I put it back in, the limits don't work correctly any more - what am I doing wrong?
okay, so I tried this and it worked alright, but for some reason my SpaceNavigator setup is vastly different - "hi" reports different indexes for the values, and even the device name is different on mine.
If others are having the same problem, here's my edit of the innards of the space navigator subpatch:
Also worth noting: I've added change filtering and switched some polarities on the controls, so navigation is very different - and to me a bit more intuitive. I had the same issues with the original aka.spacenavigator and the jit.gl.handle version of it, too.
Andrew,
I am trying to apply this patch to an object as opposed to a camera.
Picture this: A model of a Camera on a Dolly travelling on a Dolly Track. I am rotating it around an anchor point at the proper radius.
I want to define ~10 positions along that track and be able to save them. I am looking for Hold time, Position, Ease Out and Speed.
After the "Scenes" are saved, I would like to hit a Go button and have the 3dD Camera perform the defined motions.
I've copied your Patch into mine and routed the output to the Camera Rotation. Several things became clear right away. One is the fog. I got rid of it and now my scene renders without all the crazy things it was doing.
Another question is - what does the noise stuff do? Is it applicable to an object vs a camera?
My request is - an annotated patch that explains the struct and the usage in detail.
You sure would be helping us Animators out in Jitter.
I am somewhat new to Jitter, so anything you could do along these lines would be greatly appreciated.
I know I'm asking a lot.
Thanks for what you've already done - it's given me the inspiration to take it to the next level.
The working Patch:
Richard
Andrew,
We decided to go another route. Thanks for your patch. I'll be using it for other things I'm sure.
Richard
This in fascinating - thanks Andrew.
Thanks!