Chapter 2 Nodes

2-2. Links to Nodes in NIFF

7. Handling of a Camera in NIFF

With a game application, the camera must be handled in a much different way from the camera in a movie. In games, a camera is influenced by the user's input directly and indirectly, and does the animation. And, some games require the camera to have collision detection. NIFF makes this possible by specifying the camera position, a focal point, and a Y direction vector specified by indicating an object. Consider the following camera:

Figure: A Camera Following an Object

In this case, if Man_Object runs on the land and the camera follows it, the camera is following Man_Object a little bit behind. So, NULL_Obj0 and NULL_Obj1 are made as follows:

Figure: NULL Object Following an Object

And, links are made toward NULL_Obj0, NULL_Obj1, and Man_Object as follows:

Figure: Links From a Camera

In this manner, when defining an image point (camera position), a focal point, and an up direction, a parameter for changing a camera viewing is set by specifying and linking some object or NULL objects.

If used this method, it is possible to represent a static camera by linking to a static object, and if you want to represent a camera which follows some object, you can do so by linking to the object. Also, it is possible to represent an independent camera motion by linking the motion to NULL object and linking a camera to the NULL object.

In other words, as for representing a camera position, a focal point, and an up direction, it is possible by linking to some object as shown below.

Figure: Links to Objects From a Camera