Camera Shack

I have a script that keys a camera to be unsteady, which works great, but it doesn’t work for the v-ray camera. I tried to link the v-ray cam to the max camera, but it isn’t following the shake. Has anybody successfully attempted this?

Here is the script…

------------------------------------------------------------------------------------
-- BRobot_handHeldCam.mcr
-- created 04.01.04
-- by steev kelly
-- steev@beautifulRobot.com
-- http://www.beautifulRobot.com
-- DESCRIPTION: creates a camera that simulates the slight shake of a handheld camera.
-- USAGE: switch to perspective mode and align your viewport how you want it & run the script
-- the camera will automatically align itself to the view and switch to camera view.
-- NOTES: tested in max 6 with dispaly unit scale set to metric/meters and system unit scale set to 1 unit= 1.0 centimeters
------------------------------------------------------------------------------------

macroScript BRobot_handHeldCam
    category:“BeautifulRobot”
    internalCategory:“BeautifulRobot”
    toolTip:“BRobot_handHeldCam - creates a camera that simulates the slight shake of a handheld camera”
    Icon:#(“BRobot_handHeldCam”,1)

(
    --create the camera and add the noise controllers
    FreeCamera()
    $Camera01.name = “Camera_HandHeld”

$Camera_HandHeld.pos.controller = Position_List()
    $Camera_HandHeld.pos.controller.Available.controller = Position_XYZ()
    $Camera_HandHeld.pos.controller.setname 2 “HandHeld”

$Camera_HandHeld.pos.controller[2].controller.X_Position.controller = Noise_float ()
    $Camera_HandHeld.pos.controller[2].controller.X_Position.controller.frequency = .005
    $Camera_HandHeld.pos.controller[2].controller.X_Position.controller.noise_strength = 2

$Camera_HandHeld.pos.controller[2].controller.Y_Position.controller = Noise_float ()
    $Camera_HandHeld.pos.controller[2].controller.Y_Position.controller.frequency = .003
    $Camera_HandHeld.pos.controller[2].controller.Y_Position.controller.noise_strength = 2

setTimeRange $Camera_HandHeld.pos.controller[2].X_Position.controller -500 2000
    setTimeRange $Camera_HandHeld.pos.controller[2].Y_Position.controller -500 2000
    --------------------------------
    $Camera_HandHeld.rotation.controller = Rotation_List()
    $Camera_HandHeld.rotation.Available.controller = Euler_XYZ()
    $Camera_HandHeld.rotation.controller.setname 2 “HandHeld”

$Camera_HandHeld.rotation.controller[2].controller.X_rotation.controller = Noise_float ()
    $Camera_HandHeld.rotation.controller[2].controller.X_rotation.controller.frequency = .008
    $Camera_HandHeld.rotation.controller[2].controller.X_rotation.controller.noise_strength = .0349

$Camera_HandHeld.rotation.controller[2].controller.Z_rotation.controller = Noise_float ()
    $Camera_HandHeld.rotation.controller[2].controller.Z_rotation.controller.frequency = .006
    $Camera_HandHeld.rotation.controller[2].controller.Z_rotation.controller.noise_strength = .0349

setTimeRange $Camera_HandHeld.rotation.controller[2].X_rotation.controller -500 2000
    setTimeRange $Camera_HandHeld.rotation.controller[2].Z_rotation.controller -500 2000
    --------------------------------

--align the camera to the viewport
    max vpt persp user
    vptview = Inverse(getViewTM())
    $Camera_HandHeld.transform = vptview
    max vpt camera
)

have you tried doing animation contrants, i.e. constraining position and orientation of vray camera to your scripted one?

Camera

I tried that… the same premise behind locking the v-ray sun to the max daylight, prior to v-ray 1.5.

im not sure what you are talking of..did it work?
the other thing i thought of was you can link a dummy to your shake cam and bake keys on it, then link your vray cam to that.

Just tried it. Works fine just with the normal “select and Link”.. You do however have to use a non-targeted vray cam otherwise the effect is lost.

Camera

The non-target thing is probably it so I’ll try that.

Camera

My targeted is grayed… how do I disable?

Camera

Du… modify the camera enabled it.

create the shaky camera with the script, then convert it to physcam with my scriptpack.
that’ll parent it, and should create it targetless as the one created by the shaky script.

there is a typo error on the posted script! downloaded the original and it works.