Game Development Reference
In-Depth Information
2.3D IEGETIC I NTERFACES
The term diegetic comes from its use in film, where it is used to describe the internal world
that the film's characters experience, for example, a diegetic sound refers to a sound, or per-
haps, music that the characters can hear, while a non-diegetic sound would not be relevant
to the action.
In games, the term diegetic also applies, it can be used to describe the game's universe as
experienced by the character in the game. When we talk about a diegetic user interface, we
arereferringtoauserinterfacethatexistswithinthegame'suniverseandthatitsupportsthe
immersion that the characters are able to see and interact with these user interfaces as part
of their experience.
Diegetic interfaces are any in which the user interface is not bound to the two dimensional
plane of the player's screen, but that can exist as part of game objects or the environment,
keypads,computerscreens,theinteriorofvehiclesoftenusediegeticinterfaces,inparticular
those in which the player is able to look around freely.
There is no real recipe to follow for creating diegetic interfaces as they depend a lot on the
underlying game design. We will discuss some ways in which diegetic interfaces may be
implemented and set a basic framework in place to support them.
2.3.1 Render To Texture
In very broad terms, when we render the game we are rendering it into a memory buffer,
a buffer that will then be rasterized onto the screen by the graphics hardware. We have the
ability to specify a different memory buffer into which to render, this is known as a render
target. The render target is a type of texture that the graphics hardware knows may be used
as an output for the rendering stage, but that also may be used as an input in a later part of
the rendering stage.
Rendering to a texture, or to a render target is a common way to implement diegetic inter-
faces . At some moment in the rendering pipeline, we set the graphic's device render target
from the frame buffer, to our own. We then proceed to render some user interface elements
into it, progress bars, text displays, a radar, basically any user interface element we need.
With the finished render target in hand, we can then provide it as an input texture when ren-
dering a game model, such as a virtual computer display.
Search WWH ::




Custom Search