Optimization.
Web browsers are highly optimized pieces of software that allow users to view 2D content on the web. This usually includes blog posts, videos, images, etc.
In most web browsers, developers can display various forms of media using a series of stylish divs, lists, and artwork.
Eventually, the developer begins to wonder. Why stop at rectangles? Why not use different shapes or effects? What are SVGs? Why not make it pop with 3D?
If you have attempted to make a video game before, you know how difficult it is, but what makes working in the third dimension so difficult?
Well, web browsers optimize for web pages. If you want to make a game in the browser, you need to use the HTML5 canvas element or leap to a game engine like Unity or Unreal.
A game engine is an extensive library or web framework built for making games. Game engines make drawing sprites, playing audio, and creating cool visual effects more accessible. If I had an affiliate link, I'd link it here.
For example, when you use React or TypeScript, sometimes you have to change the z-index, but the browser is orthographic, so you are effectively changing which layer an element is on. Getting that 3D perspective to work without a canvas is tedious.
Yet, a developer could transform, scale, and warp 2D elements to provide a 3D look and feel, but then the DOM would constrain them, which could be better for SEO.
There is something about that extra dimension that adds a lot of complexity.
For example, did you know some game engines have different "up" directions? The Y and Z axes can point up, but both could quickly point down.
That's one reason perspective is essential. A game engine enables developers to quickly change a camera's perspective.
If you were to do the same thing in a 2D world, only three sides of an object would be visible at once. You would need a camera swivel to see the other side of an object. Think about how you would visualize the z-index from the side.
They realize that different perspectives may limit one's ability to think of planes in a 3D space. On paper, there is a one-point, two-point, and three-point perspective. Are any of those correct?
Art is where things get tricky. People define 3D differently.
3D could mean popping off the screen, making an FPS game, or simply doing a barrel roll.
In short, drawing a vanishing point looks weird. Instead, engines provide small node-like components so developers can add a camera object to a scene.
The camera is responsible for translating 2D to 3D. If you want to get really good at 3D, having some knowledge of photography or film can go a long way.
Unfortunately, my knowledge falls off. When I take a picture on my phone, I know that light reflects a certain way, like it does with your eyes. Otherwise, I'm clueless.
Thankfully, through the advancement of technology, it is possible to project vertices onto a screen.
Top comments (0)