The SceneGraph3D Description Language

Home About EaZD Deferred renderer API SceneGraph3D API SceneGraph3D scene description language

Index

| Scene file structure | camera | character | directory | eventmessage | group | input | light | linearmotion | material | node | object | proximitytrigger | skylight | spinner | surface | transformation | user | world |

camera

Derived from: Node3D
Class name: Camera3D
Placement: Anywhere
Description: It implements a view to the virtual world. It can be configured to follow a specific user or any other node, to be left standing alone or to be transformed as a normal geometric node in a kinematic chain. Multiple cameras can be defined but only one acts as the primary (rendered) output.
Special notes: -
Inherited attributes: name, active, visible
New attributes:
attribute type description
apperture FLOAT The full end-to-end apperture of the camera lens in degrees, corresponding to the vertical direction. The horizontal apperure is determined by the aspect ratio of the window. Default value is 90.0 (degrees).
near FLOAT The near clipping plane distance. Must be a positive number. Default value is 1.0.
far FLOAT The far clipping plane distance. Must be a positive number. Default value is 1000.0.
focal_distance FLOAT This is the distance from the camera center at which the image is in focus (sharp), when the depth of field effect is enabled (world attribute). Used in conjunction with the focal_range attribute. Default value is 200.0.
focal_range FLOAT The range, measured from the focus distance at which the image is completely blurred. Points at focal_distance will be sharp, points at focal_distance-focal_range and focal_distance+focal_range and beyond will be completely blurred and points within this range will be partially defocused.
primary BOOLEAN Denotes that this camera is currently active for outpout in the framebuffer.
follow STRING The name of the node to attach the camera to. Usually this is a user node, but can actually be anything.
Events:
event name condition
follow Issued whenever the camera attachment is changed.
Inherited events: -
New messages:
attribute value description
follow STRING Follow the named node, if the name given is valid.
apperture FLOAT Change the apperture of the camera
focal_distance FLOAT Change the focal distance of the camera
focal_range FLOAT Change the focal range of the camera
near FLOAT Change the near clipping plane distance of the camera.
far FLOAT Change the far clipping plane distance of the camera.
Inherited messages: -
Redefined messages: -
Obsolete messages: active, visible, hide, show, deactivate, enable, activate, disable


Example

<world ambient_occlusion="ssao" bloom="yes" shadows="disk" 
       ao_radius="6" ambient="0.3 0.3 0.3" defocus="yes">
  
    <camera name="first_person" apperture="50.0" 
            focal_distance ="30.0" focal_range="30.0"
            near="2.0" far="1000" follow="Myself" primary="true">
    </camera> 

    <transformation name="environment" scale="1.0,1.0,1.0" translation="0,0,-10">
        
        <object name="geom2" file="arena.obj"></object>
    
    </transformation>
 
    <user name="Myself" control="navigate" speed="2.0" turn="0.5"
          position="0,10,100" lookat="0,10,0" input="Console">
    </user>

    <input name="Console" type="mousekeyboard">
    </input>
</world>

Last update: 6 Feb. 2009