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.controll er = 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
)
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.controll er = 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
)
Comment