AgeCamera
From Alcugs
Note: Anything extracted from any Plasma Resource Files is property of Cyan Worlds, Inc. You may not use these assets without recieving written permission from Cyan Worlds, Inc.
Please read this Notice from Cyan about Age Creation before continuing.
|
Contents |
Cameras
To make various highlights of your age stand out more, or make certain actions seem intuitive to the user, you'll often need to resort to cameras.
This tutorial will show you the various cameras that are currently implemented, and how to use them.
Camera Detector Regions
Before a camera will be used by the engine, you must first pass a detector region that links to a specific camera.
To add such a detector region, you must use Scripts->Add->PyPRP->Add a Camera Region (in the Scripts window)
This will result in an object with the following properties:

Two properties are of note:
"camera"
This String property must hold the name of the camera object to activate.
"setDefCam"
If set to other than 0, "false", or "False", it will make this region's camera the default camera for the age. This means that he camera will be active after leaving the area as well.
It will be clear by now, that to correctly link this region to a camera, you must put the name of that camera in the "camera" property field.
Cameras
To add a camera, use [space bar]->Add->Camera in a blender 3d edit window.
You now have a normal camera. Change to the edit tab (buttons window) and change the name to something useful.

Next, add the following logic property:
string "cambrain" value "fixed"
This property will determine the type of camera used. It will now be set to a fixed camera, but you can change it anytime you want.
General Camera settings
One of the first settings that are the same for all cameras, is one you've already encountered.
That is of course the "cambrain" property.
There are two more general settings for each camera though
Field Of View (focal distance)
The Field Of View is the angle of vision from the camera. Think of it as different kinds of lenses on a regular camera. Like if you have a WideAngle lens, you'll get a large part of the area on your picture, and if you have atele-lens, only a small section of the view will end up on your photograph.
Setting the Field of View is really as simple as selecting a lens for your photo camera!
Go to the Edit tab in the buttons window, while your camera is selected.

You'll notice the "Lens" property.
This property defines the focal distance of the used lens in mm. You can change this value here, and the Field Of View it represents will be used in your camera in plasma.
A default photo camera lens is about 35mm - the default in blender.
For a FOV of about 52 degrees vertical, you'll need to use about 25mm
For more information on camera lenses and FOV, check out [1]
Point On Avatar (camera focal point)
The POA (presumably Point On Avatar) is the focal point of the camera.
As you know, the camera always points at your avatar. But the POA determines exactly where on your avatar!
By default (if you don't explicitly set it) the POA is at the avatars head.
To correctly set the POA, you need to add the following properties:
float POA_X float POA_Y float POA_Z
These 3 float values set the coordinates in blender units (feet) of the POA
The following image should illustrate how the POA is determined:
Blue arrow: Z+ axis, Green arrow: Y+ axis, Red arrow: X+ axis

The cylinder in this image represents the avatar. The avatar is always facing the Y- direction, zo positive Y values are always on the avatars backside.
The avatar is exactly 6 feet high, so if we set the POA as in the image (X=0,Y=0,Z=6), the camera will point to the avatars head.
To point the camera to the avatars middle use Z=3, and for his feet, use Z=0
You can also make the POA a little more exotic:
By setting the POA_Y to a positive value, the camera points at a point behind the avatar.
And by setting the POA_X, you can make the camera points at a point to the avatars side.
Fixed Cameras
string "cambrain" value "fixed"
Fixed cameras are cameras that do not move from their spot, but they will follow the avatar.
To set a fixed camera, select your camera set the "cambrain" property to "fixed".
Seriously, that's all there is to it. You might want to set your POA if you want to point anywhere else than the avatars head though.
Circle Cameras
string "cambrain" value "circle"
Circle cameras are cameras that move within a certain circle.
By default, circle cameras stay as far away from the avatar as their circle allows.
You can change this behaviour though advanced settings though.
To set a circle camera, select your camera and set the "cambrain" property to "circle".
Now, go to the camera's edit properties tab, and make sure that "limits" is pressed, like below:

In the image above, you can see how the camera is placed. After you press the "limits" button, a line will appear from your camera.
Now change the "Clipping End" property, to the radius of the circle you want.
The "loose" end of this clipping line, defines your circles center, while the camera is now at the edge of this circle.
This way, you have defined both the center point, and radius of your camera's Circle of Operation
In the image above, the circle of operation is roughly the red circle in the upper-left corner.
After you did this, the camera is fully functional
Advanced Settings
To fully unlock the potential of the circle camera, you'll need to add the following property:
string "circle_flags" value "00000044"
The value given above is the default value. This causes th camera to stay as fat away of the avatar as the circle of operation allows.
The one other value that is currently known is 00000040. This value, will make the camera follow the avatar, as much as possible, within the circle of operation.
Overview:
circle_flags 00000040 - Unknown 00000004 - Keep far away from avatar - if not set, camera will get close to avatar
Avatar Cameras
string "cambrain" value "avatar"
Avatar cameras (or Follow Cameras) are cameras that follow the avatar around everywhere.
They stay on a point relative to the avatar, and point at the POA.
The point on which the camera is , relative to the avatar is defined by the following 3 properties:
float "AvCam_X" float "AvCam_Y" float "AvCam_Z"
The position of the camera is defined similar to how you define the POA.
So in order to set the avatarcam at 12 feet above and 5 feet behind the avatars feet, you'd set:
AvCam_X = 0.0 AvCam_Y = 5.0 AvCam_Z = 12.0
You can set it to any point relative to the avatar this way.
First Person Cameras *untested*
string "cambrain" value "firstperson"
First Person cameras are just what the name says: First person Cameras
Current support for first person cameras is untested. They have 3 float properties, which are assumed to be the point relative to the avatar on which the first person camera is seated
These 3 properties are named:
float "FpCam_X" float "FpCam_Y" float "FpCam_Z"
This point is probably determined just as the avatarcamera's position, and the POA are.
If that is the case, you could make a first person cam from the avatars face wiht the following settings:
FpCam_X = 0.0 FpCam_Y = 0.0 FpCam_Z = 6.0
It is uncertain whether a first person camera is influenced by the POA
|

