PDA

View Full Version : Mini-Challenge: Camera Rig


AlexK
02-26-2006, 04:25 PM
Ok, then here comes a little bit more info on the rig.

As there has been some discussion in the Messiah IRC, if a camera shaker is usefull in a 3D application at all, I'd like to point out, that we will be building a shaking node that has controls for all kinds of controlable noise and jitter. Of course, no one forbids using this shaker node (once build) and apply it to other things.

For example:

A shivering, freezing character
Objects that start to jitter because the earth is trembling
etc.


You get my point.



Task Description

The challenge is to build a camera rig, that has all features of a motion control plus a shaking control. That means, you need to have:

a base that can be freely transformed in X and Z (not in Y, because that's what the rigs "arm" is for)
the same base can also rotate in heading (but normally not in pitch or bending, because it is "standing" on the floor)
an arm, that can be pitched to get the camera into higher altitudes
a realistic camera head (that means the rotational order should be the same as in a real camera mount)
a node/control/whatever to get a natural jitter/shaking


In addition to that it would be nice, if your rig had a way to control all rotational axis seperately to avoid gimbal locking.

Make you rig easily controlable and you will get extra points. ;)



More info on the shaking node:

Well, I didn't come up with this all on myself. There is a nice tutorial out there that describes the methods used in this challenge. It needs a lot of adapting to make it work for Messiah, but I will post the link only if you guys insist on it. I guess it depends, if this is a challenge to make it work from scratch or to make it work at all. That's up to you.

I will post the relevant descriptions though. The shaking node consists of controls for four kinds of jittering/noise:


shake
destabilisation
wander
jitter


All of them are individually controlable on every axis seperately, but have a master controller (one for each of the four types of noise), too.

Shake
Shake is designed to produce a random movement and rotation at each frame. It is not just driven by a random number however. Imagine a camera shaking - to a certain extent there would be a certain distribution of movement as opposed to a completely random motion. i.e. most offset from the camera's true position would occur within a more local area of worldspace about the camera. Larger deviations ( really big shakes) would happen less frequently.

The property of shake therefore creates translation and rotation by generating a random gaussian number of another random number.

Destabilisation
The best example is too imagine someone holding a camera and that person is standing on something which is vibrating or is in a vehicle going over a bumpy road. Through the lens you will see lots of violent shake but also, over time, there will be another offset. The person holding the camera will also have his limbs and body moved locally over time as a result of the initial shaking.

If a camera was firmly attached to a rollercoaster then there would be no secondary movement as a result of the initial shake (unless the bracket fixing the camera to the coaster was loose or flexible). In this example, Destabilisation would be of no use.

The Destabilise property represents this second random movement and is created by using the 'noise (time)' random number generator.

Wander
If an object is the subject of a lot of shaking or vibration, it is quite likely that a third type of movement - wander - would be seen. That is, the object would tend to actually move its overall position as a result of the initial shake.

During an earthquake, the pair of shoes you left by the front door would vibrate and shake about but also, after a while, they may well end up in the living room. This is what I call Wander.

Wander is simulated simply by using a 'rand (x,y)' function which returns a random number between x and y at every frame but it is applied cumulatively to the translation and rotation channels.

Jitter
Jitter is the simplest property of the four. It is the same as shake, but does not use the gaussian distribution. It just creates an offset of movement and/or rotation with the
rand (x,y) function.

I am not quite sure if I can post images or playblasts showing any of the functionality without showing the internal workings. If you have suggestions, please be my guest.

Also if the above text is unclear, incomplete or just plain wrong, please correct me.

Read this first post from time to time, as I will incorporate corrections and suggestions here. All changes will be highlighted in Cyan for easy recognizability.

Well, that's it so far. I hereby open this mini challenge. Have fun guys! *fires his imaginery gun* :applause: :bounce: :buttrock:

EDIT:
I uploaded my version of the camera rig. See this post. (http://forums.cgsociety.org/showthread.php?p=3475967#post3475967)

dobermunk
02-26-2006, 04:45 PM
Some more great features or perhaps a point of departure is this great rig by BorderEquals0.
http://www.zoogono.com/setups.cfm (hit the camera setup)

Nichod
03-02-2006, 01:11 PM
Anyone taking up this challenge? I'd love to attempt. But I'm a big beginner and was hoping this would spark some sharing of knowledge in the community. Perhaps this post shouldn't be a sticky?

AlexK
03-02-2006, 01:31 PM
Well, it seems the the outcry for support and an active community is only valid, when other users want something. :banghead:

Seems we don't have anyone interested in participating in the community after all. Just taking and not giving. A typical problem in our times. :cry:

If you don't like this challenge, then just open a better one and we close this one. I am by no means the official challenge authority here.

Nichod
03-02-2006, 01:53 PM
Lets get this going by pointing to a good starting point. Perhaps having something to start from would get things going.

AlexK
03-02-2006, 02:07 PM
I am not quite sure if I can post images or playblasts showing any of the functionality without showing the internal workings. If you have suggestions, please be my guest.

Also if the above text is unclear, incomplete or just plain wrong, please correct me.

Well, I already said I am open for suggestions, but even they don't find their way in here obviously.

What would you suggest Nichod? If I'd show you the rig, then you already have it. It really is very easy to build. Just a matter of parenting and a couple of simple expressions.

The shaker is a more complex beast, but we should start with he rig first, cause if we don't, we don't have something to test it with. ;)

And I am not entirely sure how much more I can explain without just showing you how it is done. The different noise types are decribed in their sections already. The "only" thing that is missing is a formula, but that's part of the challenge isn't it? Otherwise it would only be a tutorial.

dobermunk
03-02-2006, 02:46 PM
Okay, okay.... I'll try it.
(aside note for the historians: I've been provoked!)

You KNOW how much I love expressions!

And yes, Alex - you tease - I insist on the links. As well as any tips about messiah expressions I might avail myself of. Currently reading up on "double Noise (double x, double y, double z )" and motion. No idea why its "double" and not just noise - but hey, you prodded me into this, now didn't you!

AlexK
03-02-2006, 03:03 PM
:applause:
Thanks for taking part so willingly David. :twisted:

Here is the link for the shaker tutorial (http://www.jackals-forge.com/tutor/tut2_1.html). It will cost you points in the final valuation, though, so choose carefully. ;)

If you need more help, just say so. And I will drop more hints. :twisted:

Nichod
03-02-2006, 03:11 PM
Okay. When I get home...I'll dive my cold hands into the heart of Messiah and rip out the most daring and impressive camera rig possible...:wise:

dobermunk
03-02-2006, 03:15 PM
LoL! Well, to be hponest I'm happy to cross the finish line.
So, not sure how effective your threats about points will be with me.

Maybe you can help me with this:
I'm trying to have a slider control amplitude and speed of a noise function, but noise(x,y,z) doesn't seem to offer these. Right now I'm thinking of animating a shake and having the slider access this. I mean, it would work, right? Go with what you know.

OR....

I could have a dummy null with a sin curve, and have that spit out numbers....
Eww. That sounds like maths.

AlexK
03-02-2006, 03:39 PM
LoL! Well, to be hponest I'm happy to cross the finish line.
So, not sure how effective your threats about points will be with me.

Maybe you can help me with this:
I'm trying to have a slider control amplitude and speed of a noise function, but noise(x,y,z) doesn't seem to offer these. Right now I'm thinking of animating a shake and having the slider access this. I mean, it would work, right? Go with what you know.

OR....

I could have a dummy null with a sin curve, and have that spit out numbers....
Eww. That sounds like maths.
It's a lot more easier than that David. You can access a sliders value.
The sliders channels are labeled the same as all other objects channels internally. So the first silder (from the top) becomes Slider01:xpos in an expression.

Let's say you want to controll your noise with the first slider of your Slider01 the expression would go like this:
noise(2,2,2)*[Slider01:xpos]

In some occasions you might need to convert your value to Radians first, because that is what Messiah calculated with internally (not Degree).
Like for example if your expression outputs a value of 120 and you put that into a rotation field you have a problem because Messiah thinks that value is in Radians, but that's like 6975 Degrees. So you will get WAY to fast rotations.

To convert between these two ways of expressing angle values you use:
(noise(2,2,2)*[Slider01:xpos])*RTOD
or back again
(noise(2,2,2)*[Slider01:xpos])*DTOR

Understood?

dobermunk
03-02-2006, 03:40 PM
Well, sheesh - I have a camera rig with the arm and aiming pretty much like you've outlined. No armatures yet, nor the cleaned up animation group....

(zwischenfrage: is there a null-shape option in messiah?)

And I've got an xpos and ypos jitter.
But gaussian-distributed shake? (I didn't see "gauss" in the messiah drop-down :-!) Wander? I mean, sheesh! I jus' wanna animate here!

okay - serious. I have limited brainpower here. I managed to get noise working on the slider, but not evenly (I have to re-map the values to saddle 0 instead of moving from 0 to 1). Anyone wanna jump in here and have a look-see?

edit: forgot the link - camJITTER.mpj (http://www.stickman.de/content/temp/camJITTER.mpj)

edit2: hooboy. I did it with this Noise((Rand(0,[cam:xpos])),0,0)
I thought the rand command was a switch. (0 or 1). And very helpful to see how you wrote the slider in. I'm thinking inside out.
About the DTOR: how do you know when you need which version? Angle is always DTOR internally?

dobermunk
03-02-2006, 04:05 PM
Hi Alex,
I just tried your expression. (Noise(1,1,1)*[cam:xpos])
But it only creates a value, offsetting the camera but not an animated value shift.

Am I missing something?


_______________________

Ha! Okay, I warned you, but you poked the hornet's nest anyway!
Check this out:
1) offset a null's pivot (like I did in the camera's arm)
2) attach an armature to it.

When you select the armature, it pushes the null to its true pivot position. Anyway to stop this from happening?

AlexK
03-02-2006, 04:20 PM
Well, sheesh - I have a camera rig with the arm and aiming pretty much like you've outlined. No armatures yet, nor the cleaned up animation group....
Congrats! It's a first start.

(zwischenfrage: is there a null-shape option in messiah?)
What is a null-shape option?
And I've got an xpos and ypos jitter.
But gaussian-distributed shake? (I didn't see "gauss" in the messiah drop-down :-!) Wander? I mean, sheesh! I jus' wanna animate here!
Hehe, well, I did come up with this only to train some expressions, but someone else could post an animation challenge (it just isn't the area of Messiah I work in).
okay - serious. I have limited brainpower here. I managed to get noise working on the slider, but not evenly (I have to re-map the values to saddle 0 instead of moving from 0 to 1). Anyone wanna jump in here and have a look-see?
It doesn't do that by default? Hmm, I just remember that I used the same value for all the slots of the noise function like:
noise(value1,value1,value1)
not like
noise(value1,0,0)
maybe that's what makes the difference?

edit2: hooboy. I did it with this Noise((Rand(0,[cam:xpos])),0,0)
I thought the rand command was a switch. (0 or 1). And very helpful to see how you wrote the slider in. I'm thinking inside out.
Great. And you solved it completely different than I did. Nice.
My version reads like this:

Noise([shaker_destabilize:heading],[shaker_destabilize:heading],[shaker_destabilize:heading])*[shaker_main:ypos]*0.0004


About the DTOR: how do you know when you need which version? Angle is always DTOR internally?
Er, actually I always use the wait and see approach for that one. does it act funky? Try to convert Degree to Radians (DTOR) or Radians to Degree (RTOD) and see which one looks more correct. :D

AlexK
03-02-2006, 04:25 PM
Hi Alex,
I just tried your expression. (Noise(1,1,1)*[cam:xpos])
But it only creates a value, offsetting the camera but not an animated value shift.

Am I missing something?
That was just an example with no real values. For this thing to work here you have to bring in a time component. Try to multiply the Noise variables with NOW and use the sliders value as the noise value.


_______________________

Ha! Okay, I warned you, but you poked the hornet's nest anyway!
Check this out:
1) offset a null's pivot (like I did in the camera's arm)
2) attach an armature to it.

When you select the armature, it pushes the null to its true pivot position. Anyway to stop this from happening?
Hmm I don't have Messiah available righ tnow, so I am not able to look into that right now. And I have to quit for today. There is still a move waiting to be done. :hmm:

dobermunk
03-02-2006, 07:36 PM
What is a null-shape option?

Like Lightwave's null-shape: being able to make a null appear to be a disc or sphere or whatever...

Er, actually I always use the wait and see approach for that one. does it act funky? Try to convert Degree to Radians (DTOR) or Radians to Degree (RTOD) and see which one looks more correct. :D

Ha! Cool. I do the same!

Wow. This really was a welcome kick in the butt. I'm definitely getting closer to defeating my rig-o-phobia. I couldn't get your script to work, unfortunately - but I'll try again later.

I've updated my camera rig - same location (http://www.stickman.de/content/temp/camJITTER.mpj). It now has some armatures to make selecting the right object easier. You could also make them drags - I prefer select... because I get the edit sphere to work with.

Anyway - for anyone interested, my version is the "jitter lite" camera that suits my needs. And thank you, Alex, for the very horizon-expanding experience - no departure here, I plan to continue my exploration. And maybe have a look at my leech (http://forums.cgsociety.org/showthread.php?t=323375) and tell me what you would do differently.

Layer01
03-03-2006, 01:27 AM
Woo Alex! :thumbsup:
nice one, i'm a little late but i'm in :D

dobermunk
03-05-2006, 12:03 PM
Okay Layer, you've thrown your glove in the ring. Too late go into hiding now ;-)

AlexK
04-21-2006, 09:05 PM
Well, as this challenge has kind of died and I was asked in another thread about my setup, I decided to upload it for your playing and working pleasure.

Have fun guys!! :bounce:

This is a saved setup. Never did that before in Messiah and have therefore no idea if it works. EDIT: Just drop it into your messiah/modules/setups directory.
http://rapidshare.de/files/18601997/FreeCamera.mst.html


...in case it doesn't here is the fxs. It contains only the camera setup, nothing else.
http://rapidshare.de/files/18601933/StandardFreeCamera.fxs.html

The usage is pretty simple.
EDIT:The first thing you should do is to right click on your new camera in your item list, to make it the active camera.
The camera is setup so that you have a rotation order like in a real camera and you control it via the item list. Naming is pretty self-explanatory. The shaker node contains the sliders for your personal adjustments. You have global controls and the additional ability to adjust every noise type on all axes individually. Have fun with it.


And an additional goodie for all interested parties.
I present to you the same as before only in a MotionControl version.

EDIT: This rig lacks some nice little control objects like a real arm that is extending with the rig. But I just never came to do the "fancy" part. It works great but one has to use the item list.

http://rapidshare.de/files/18602708/MoCoCamera.mst.html
EDIT: Just drop it into your messiah/modules/setups directory.

and again as fxs, for the case of the mst not working.
http://rapidshare.de/files/18602766/StandardMoCoCamera.fxs.html

EDIT: One thing I never tried is to use several of these in one scene. I have no idea if it works or if the expressions make problems with different naming (like the added "_1" that gets added when you duplicate something)

Hope you like it. :bounce:

dobermunk
04-22-2006, 08:05 AM
thanks ALex! I'll take it apart as soon as I'm back (tomorrow)...

CGTalk Moderation
04-22-2006, 08:05 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.