Nothing

<camera>

Define a named view that the scene may select.

Read as Markdown

Examples

Download the complete .nothing source · Source on GitHub

Rendered with ncf-preview at 100 × 80.

Bound resources

The red marker sits near (32, 22). The red square inside the referenced child scene is already framed before placement.
Frame 11 · WideThe red marker sits near (32, 22). The red square inside the referenced child scene is already framed before placement.
A held key cuts to the 2× zoom of the tracking camera. The red marker moves to (44, 44).
Frame 12 · TrackingA held key cuts to the 2× zoom of the tracking camera. The red marker moves to (44, 44).
The next held key cuts to a rolled view. The red marker appears at (32, 58).
Frame 24 · RolledThe next held key cuts to a rolled view. The red marker appears at (32, 58).
XML source
<scene width="100" height="80" frame-rate="24" background="#101820FF" camera="wide">
  <camera id="wide"/>
  <camera id="tracking" center-x="30" center-y="20" zoom="2">
    <animate attributeName="center-x" fill="freeze">
      <key frame="0" value="30" ease="linear"/>
      <key frame="24" value="40"/>
    </animate>
  </camera>
  <camera id="rolled" roll="90"/>
  <camera id="beyond" center-x="110"/>
  <animate attributeName="camera" fill="freeze">
    <key frame="0" value="wide" ease="hold"/>
    <key frame="12" value="tracking" ease="hold"/>
    <key frame="24" value="rolled" ease="hold"/>
    <key frame="36" value="wide" ease="hold"/>
    <key frame="48" value="beyond"/>
  </animate>
  <shape>
    <rect anchor-u="0" anchor-v="0" offset-x="30" offset-y="20" width="4" height="4"/>
    <fill><paint><solid color="#E93434FF"/></paint></fill>
  </shape>
  <shape>
    <rect anchor-u="0" anchor-v="0" offset-x="108" offset-y="38" width="4" height="4"/>
    <fill><paint><solid color="#45CF80FF"/></paint></fill>
  </shape>
  <sequence href="child.nothing" begin="0f" dur="49f" source-start="0s"
            translate-x="70" translate-y="12"/>
</scene>

A Level 1 camera frames the composition in its viewport. Name it with an ID and select it on the scene. Center, zoom, and roll can be animated independently of the artwork.

Syntax

Cut to a tracking view

The scene’s held camera track selects tracking at frame 12. By then the horizontal center has reached 35. The red marker covers (44, 44) in the sampled viewport.

<camera id="tracking" center-x="30" center-y="20" zoom="2">
  <animate attributeName="center-x" fill="freeze">
    <key frame="0" value="30" ease="linear"/>
    <key frame="24" value="40"/>
  </animate>
</camera>

Complete .nothing source · Sample checks

Usage context

Allowed parents are <scene>.

The perspective trial proposes additional authoring fields separately from Level 1. Its focus behavior has been ratified under the perspective optics contract. A trial scene may not mix 2D and spatial cameras. The linked RFC also discusses orthographic projection, which is outside this trial.

Attributes

Property animation

id

Value Nonempty ASCII letters, digits, underscores, or hyphens · Required · Keys Static

Case-sensitive name unique among the scene's cameras.

center-x

Value scene units · If omitted viewport center x · Keys Scalar

Scene x coordinate framed at viewport center by a 2D camera.

center-y

Value scene units · If omitted viewport center y · Keys Scalar

Scene y coordinate framed at viewport center by a 2D camera.

zoom

Value factor · If omitted 1 · Keys Scalar

Strictly positive 2D magnification. A value of 2 doubles distances from the framed center.

roll

Value degrees · If omitted 0 · Keys Scalar

Clockwise rotation of the camera axes. At positive 90 degrees in 2D, a point right of the camera center appears above viewport center.

projection

Value 2d, perspective · If omitted 2d · Keys Static

Spatial trial. Select the trial projection profile. Cut between named cameras with held scene selector keys. Proposed projection selection

position-x

Value scene units · If omitted half the viewport width · Keys Scalar

Spatial trial. Horizontal coordinate of the perspective optical center. Proposed spatial camera fields

position-y

Value scene units · If omitted half the viewport height · Keys Scalar

Spatial trial. Vertical coordinate of the perspective optical center. Proposed spatial camera fields

position-z

Value scene units · If omitted 1000 · Keys Scalar

Spatial trial. Depth coordinate of the perspective optical center. Proposed spatial camera fields

rotate-x

Value degrees · If omitted 0 · Keys Scalar

Spatial trial. Perspective camera orientation about the x axis. Proposed spatial camera fields

rotate-y

Value degrees · If omitted 0 · Keys Scalar

Spatial trial. Perspective camera orientation about the y axis. Proposed spatial camera fields

clip-near

Value scene units · If omitted 0.1 · Keys Scalar

Spatial trial. Positive inclusive minimum axial depth. It must be below clip-far. Proposed spatial camera fields

clip-far

Value scene units · If omitted 100000 · Keys Scalar

Spatial trial. Positive inclusive maximum axial depth. It must exceed clip-near. Proposed spatial camera fields

focal-length-mm

Value millimeters · If omitted 50 · Keys Scalar

Spatial trial. Positive effective focal length for the rectilinear perspective lens. Proposed spatial camera fields

sensor-width-mm

Value millimeters · If omitted 36 · Keys Scalar

Spatial trial. Positive active width of the perspective sensor. Proposed spatial camera fields

f-stop

Value dimensionless f-number · If omitted 0 · Keys Scalar with held transitions at zero

Spatial trial. Positive lens f-number or zero for pinhole rendering. A segment between zero and a positive value requires hold. Proposed focus settings

focus-distance

Value scene units · If omitted 1000 · Keys Scalar

Spatial trial. Positive axial distance from the optical center to the focus plane. Proposed focus settings

Children

ElementsCardinalityDeclared byRole and source order
<animate>Zero or moreAnimationA track targets one keyable property on this owner. For equal first-key times, the later track in document order wins. Evaluating animation tracks

Specifications

On this page