166 11.Making3DStereoscopicGames
Figure 11.3. The view volume for an asymmetric frustum. The left and right values rep-
resent the minimum and maximum x values of the view volume, and the bottom and top
values represent the minimum and maximum y values of the view volume, respectively.
Having the ability to alter the camera properties every frame provides a much
larger degree of freedom for controlling the 3D scene. For instance, we can ad-
just the convergence of the cameras to control the depth and size of the objects
within the environment. The convergence corresponds to areas of the left and
right projected images that superimpose perfectly and therefore have zero paral-
lax, appearing in the plane of the screen. We can also adjust the interaxial dis-
tance, which is the separation between both cameras, in order to push back
foreground objects. This is very important because it allows us to offer a much
more comfortable experience.
11.4SafeArea
When creating a stereoscopic scene, we need to take into account where objects
are located within the 3D space. To make it more comfortable to watch, it is im-
portant that we take into account the zone of comfort, shown in Figure 11.4.
The screen acts as a window, and most of the content usually resides inside
the screen space, which is the volume of space behind the screen. Content that
comes out of the screen is usually small and fast. This also affects the heads-up
display (HUD), which can be moved slightly inside the screen space since, oth-
erwise, it might be difficult to focus on the main scene. To reduce eye strain, it is
also important to avoid any window violation that occurs when an object touches
the edges of the stereo window, resulting in an object being cut off more in one
eye than the other. A trivial solution is to alter the frustum culling so that the ob-
jects visible to a single eye are properly culled, as illustrated in Figure 11.5. Here,
the frustum origin is moved closer to the screen by the distance
given by
2tan 2
d
z
dfov
,
bottom
righ
top
left