Building Interactive Worlds in 3D: Advanced Virtual Camera Development for The Diner Project — Part 2


This is the last in a series of excerpts from Building Interactive Worlds in 3D by Jean-Marc Gauthier.

Step 2: Cameras and Ways to Navigate Inside the Virtual World

1. Designing a new virtual camera called Dialogue camera. The Dialogue camera uses a stabilization system that is similar to the one described in Chapter 6. Once the camera is attached to a character, the stabilization system keeps the camera stable around its target. We can detach an orbital camera from a character — the camera’s center of rotation — by increasing the distance between character and camera. At a given distance the camera moves out of the character’s range. The camera breaks the Keep at Constant Distance behavior and becomes a free camera. The viewer can also choose to detach the camera from a character by pulling the camera away from the character. We chose to pull the camera away from a character because we thought that pushing a camera inside a character was a counterintuitive way to move a camera. We created a possibility for the camera to slide when getting close to the character.

The Dialogue camera is triggered by sound coming from the viewer or the space of the installation. Sound input, a great way to replace the keyboard and the mouse in interacting with a computer, is discussed in detail in Chapter 8. The volume of sound coming from the sound sensor, a microphone, is tested for values; above a given threshold, the Test building block triggers a message telling the camera to change its target. This is the starting point of a sequence of adjustments in space that will take the camera from one character to the other. The following diagrams illustrate the architecture of the behaviors created for the Dialogue camera.

 

The Dialogue camera behavior receives a message from the sound sensor and activates two strings of behaviors. The string on the top controls the translation and orientation components of the camera’s motion in space. The string at the bottom picks up a new target, which is the other character.







Comments

  No comments. Be the first to comment below.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Use <!--pagebreak--> to create page breaks.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
5 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Elsewhere on AWN