|
Camera Objects
are created using the Camera() constructor. This constructor, given no
arguments will create a Camera Object from the first camera in the scene.
A name argument can be passed to designate a specific camera to be used.
camera = Camera();
//
Create a Camera Object
//
from the first camera.
camera = Camera(3);
//
Create a Camera Object
//
from the third camera.
camera = Camera("camera1");
//
Create a Camera Object
//
from the camera named "camera1".
Note: Remember that not all of the common
Data Members and Methods apply to Camera Objects.
Methods
zoomFactor(time)
zoomFactor(time)returns a floating-point
number that represents the Camera zoom factor at the specified 'time'
index.
globalResolution() (LW>9.0)
Returns an integer value that represents the state of the camera's global-redirection
setting for resolution. A value of 1 indicates that the setting is active (resolution
settings for the camera come from the "global" camera); a value of 0 means that the
camera's own resolution settings are active.
globalBlur() (LW>9.0)
Returns an integer value that represents the state of the camera's global-redirection
setting for motion blur. A value of 1 indicates that the setting is active (motion
blur settings for the camera come from the "global" camera); a value of 0 means that
the camera's own motion blur settings are active.
globalMask() (LW>9.0)
Returns an integer value that represents the state of the camera's global-redirection
setting for mask boundary. A value of 1 indicates that the setting is active (mask
boundary settings for the camera come from the "global" camera); a value of 0 means that
the camera's own mask boundary settings are active.
focalLength(time)
focalLength(time)returns a floating-point number that represents the Camera
focal length at the specified 'time' index.
focalDistance(time)
focalDistance(time)returns a floating-point number that represents (in
meters) the Camera focal distance at the specified 'time' index.
fStop(time)
fStop(time)returns a floating-point number that represents the Camera f-stop
setting at the specified 'time' index.
blurLength(time)
blurLength(time)returns a floating-point number that represents (in meters)
the Camera blur length at the specified 'time' index.
fovAngles(time)
fovAngles(time)returns an array of two floating-point numbers that represent
the Camera's field-of-view angles at the specified 'time' index. The first
element [1] represents the horizontal angle, the second element [2] represents
the vertical angle. These angles (measured in radians) are centered around
the direction of the Camera.
Examples:
This example creates a Camera Object and displays some of its properties.
@version 2.2
@warnings
@name CameraObjectAgent
@script generic
//Set Globals
frame =
0;
generic
{
camera
= Camera();
//
Display some Data Members.
info("Name:
", camera.name);
//
Display some Methods.
info("Position:
", camera.getPosition(frame));
info("Rotation:
", camera.getRotation(frame));
info("zoomFactor:
", camera.zoomFactor(frame));
info("focalDistance:
", camera.focalDistance(frame));
info("fStop:
", camera.fStop(frame));
}
Layout Commands
AdaptiveSampling();
AdaptiveThreshold("<threshold>");
AddCamera("<name>");
AdjustRegionTool();
Antialiasing("<level>");
ApertureHeight("<height>");BlurLength("<length>");
CameraMask();
CameraView();
CameraZoomTool();
ClearAllCameras();
DepthOfField();
DrawAntialiasing("<level>");
EditCameras();
EnhancedAA();
EyeSeparation("<separation>");
FocalDistance("<distance>");
FrameSize("<width>","<height>");
GlobalFrameSize()
GlobalResolutionMultiplier()
GlobalPixelAspect()
GlobalApertureHeight()
GlobalMotionBlur()
GlobalParticleBlur()
GlobalBlurLength()
GlobalMaskPosition()
LensFStop("<f-stop>");
LimitedRegion();
MaskColor("<red>","<green>","<blue>");
MaskPosition("<left>","<top>","<width>","<height>");
MotionBlur("<type>");
ParticleBlur();
PixelAspect("<aspect>");
ReconstructionFilter("<level>");
RegionPosition("<left>","<top>","<width>","<height>");
ResolutionMultiplier("<multiplier>");
SelectAllCameras();
Stereoscopic();
UseGlobalResolution()
Sets the of the camera's global-redirection for resolution settings.
A value of 1 will redirect these settings to the global camera; a value of 0 will
make the camera's own settings effective.
UseGlobalBlur()
Sets the of the camera's global-redirection for motion blur settings.
A value of 1 will redirect these settings to the global camera; a value of 0 will
make the camera's own settings effective.
UseGlobalMask()
Sets the of the camera's global-redirection for mask boundary settings.
A value of 1 will redirect these settings to the global camera; a value of 0 will
make the camera's own settings effective. (Note: the "Use Mask" setting must be
enabled for a camera's mask boundary settings to be effective.)
ZoomFactor("<factor>");
|