Camera and Light Puzzles
The puzzles from this category perform operations with cameras or light sources.
- Camera Puzzles Reference
- Light Puzzles Reference
Camera Puzzles Reference
Smoothly animates the active camera so that it finally targets a specified object. The numeric parameter specifies the time period over which the animation is performed (in seconds).
Smoothly animates the active camera so that its position finally changes to the position of a specified object / 3D point, and the camera targets another specified object / 3D point.
The position and the target parameters can be specified either by scene objects or arrays of X, Y and Z coordinates.
The numeric parameter specifies the time period over which the animation is performed (in seconds).
The move parameter specifies the interpolation between the starting and the ending points: linear or spherical.
The optional when finished do slot may be used to detect the moment when the tweening is finished.
zoom camera to object
Smoothly zooms the active camera in or out so that the specified object or a group of objects will be properly fit into the camera view. The numeric parameter specifies the time period over which the zooming is performed (in seconds).
The optional when finished do slot may be used to detect the moment when the zooming is finished.
set active camera
Makes a specified camera active. This can be used to change camera control mode ("orbit" vs "flying" vs "no controls"), field of view and other settings on the fly.
Retrieves the active camera.
Smoothly animates the active Orbit camera by rotating it around the target.
In the following example, the camera starts to rotate after 3 seconds of user inactivity. When the user clicks a mouse button (or touches the screen), he or she regains the control over the camera until further 3 second period of inactivity.
To rotate camera in reverse direction set negative speed value, e.g -2.
get camera direction
Returns a list of X, Y and Z components of the active camera's world direction vector. If from mouse/touch is checked, this puzzle casts a ray from the camera to the cursor's screen position and returns the direction of that ray. If additionaly inverted is checked, then the cursor's screen position coordinates are negated.
In the following example, an object looks at the mouse cursor. This can be achived by mapping the position of an empty/dummy object to mouse cursor with some simple math.
In order to setup such behavior in 3ds Max, make your object follow a dummy object by utilizing the Rotation Controllers / LookAt Constraint. In Blender, this corresponds to the TrackTo constraint.
Light Puzzles Reference
set light param
Set light parameter:
- color (vector)
- Set light color using vector, where X, Y, Z represent R, G, or B color component accordingly. For example [0, 1, 0] vector represent pure green color.
- color (css/rgb)
- Set light color using CSS style string such as rgb(255, 0, 0) or magenta.
- color (css/hex)
- Set light color using CSS hex string such as #FF0000.
- Set light intensity.
- use shadow
- Enable / disable light's shadow casting.
This puzzle also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.
get light param
Get light parameter. See description on set light param puzzle for the list of parameters.
Having Troubles with Puzzles?
Seek help on the forums!