Cutscenes Part 2: Splines and Camera Movement

From The DarkMod Wiki
Revision as of 20:13, 2 September 2010 by Grayman (talk | contribs)
Jump to navigationJump to search

NOTE: This article is under construction until this NOTE goes away.


Splines

Moving cameras can add a nice touch to a scene if not overused. Splines provide a path a camera can follow.

Download the file [snitch2.zip.txt], remove the ".txt" from the filename, and extract it into your darkmod folder. This includes our Snitch set with all the cameras we created in Part 1.

The first shot we want to create is to have the camera slowly rise from the porch to the south of the bulletin board while pointed in the direction of the bulletin board. To accomplish this, we'll need to add a spline (NURBS curve), a func_mover, a func_cameraview, a target_null, and, of course, a script function.

In Dark Radiant, open snitch2.map. In the XY view, shift the view so the porch south of the bulletin board (in front of the tall door) is near the center of the view. From the main menu, select Curve->Create NURBS Curve. This creates a spline curve with its origin over the porch.

Give this spline the following key/value pair:

  • "name" "Spline5"
Spline5 in XY View
Spline5 in Camera View

Movement along this spline will begin at its origin and follow its path. At the moment, the path curves away from the origin, and lies in the XY plane. Since we want the camera to rise straight up, we need to change the control points of the spline to create a straight rising path.

With Spline5 selected, press the V key to enter Vector mode. Two green dots will appear along the path. These are control points, and we're going to adjust them. In the YZ view, drag the leftmost control point so it's 16 units directly above the spline's origin. You might need to set the grid size to 1 to do this.

Now drag the rightmost control point so it's 48 units above the spline's origin.

In the camera view, the spline's path has changed, but it's still a curve, so we have to make two more adjustments.

Switch to the XY view, drag both control points so they're directly over the origin, and the spline path is finished.

Spline5 Halfway There
Spline5 Finished


Camera Movement