April Speight

Posted on

# 2D vs. 3D

As you build Extended Reality (XR) experiences, you'll find yourself working in a 3D space. This can become a challenge for some beginners as there's now a whole new dimension to consider when building scenes and interactions. Before you dust off the ol' keyboard and open your favorite engine for development, take a moment to learn the difference between 2D vs. 3D.

## What is a Dimension?

A dimension is a measure of one direction. In our every day lives, we're surrounded by examples of the first three dimensions (some may argue first four). These dimensions are defined by width (x), height (y), and depth (z). Although scientists believe that there are 10 dimensions (hello time and parallel universes!), when working with XR, we focus mostly on the second and third.

## What is 1D?

The first dimension is defined by width (x). For example, consider a straight line on a piece of paper. The line only goes in 1 direction.

## What is 2D?

The second dimension is defined by width (x) and height (y). Starting to sound like math? This concept may sound familiar if you've ever looked at a chart with plotted points. Taking the straight line from earlier, we can add another direction to reflect width.

We often see 2D in retro video games such as Pac-Man. Objects in a 2D space are flat in the sense that there's no depth to the object. 2D objects only have a width and height.

## What is 3D?

The third dimension is defined by width (x), height (y), and depth (z). Depth is the direction of going from front to back. Using the lines from earlier, we can add a third dimension to the line to reflect depth.

Let's look at this in a practical example - Donkey Kong! In the original arcade version of Donkey Kong, Donkey Kong is presented as a 2D gorilla. He has no depth to his design. However, if we look at his character in Donkey Kong Country, well, we can view the gorilla from all sides. He has height, width, and depth.

As this all relates to XR, you can have both 2D and 3D objects in a XR experience. More often, UI elements such as text is displayed in 2D (although you could include 3D text). The holograms in which users interact with are in 3D.

Curious to learn more about realities? Follow the #MixedReality tag!