Lecture 5: Texture (6)
he-yilan

how are the screen space, world space and texture space created and how we convert among them (ie, given a point in texture space, find its corresponding location in screen space)?

MillerHollinger

TLDR: 3D objects are colored by textures, which is flattened to display on our 2D monitors. Conversion between spaces is a mathematical process.

Screen space is defined by your computer's physical monitor. For example, most modern monitors are 1920x1080px, while smartphones often fall around the range of 720x1280. You can think of each pixel on your screen as having an (X, Y) coordinate, where pixel (0, 0) is your bottom-left corner and e.g. (1920, 0) is the top-left corner. So, screen space is two-dimensional, and represents what the user sees.

World space, on the other hand, represents the imaginary computational space that 3D objects exist inside of. If you were in Blender, a common 3D rendering software, for example, your objects would have positions with 3 axes, like (0, 1, -2). We, of course, cannot truly "see" this space, because any time you observe world space, you're just seeing your screen attempting to represent that 3D space on your 2D screen.

Texture space is another 2D space, and represents what the surface of a 3D object will look like. At the most basic level, when a renderer shoots a ray and hits a 3D object, it accesses a file, that object's texture file, for information about how that object should look. The texture file uses a UV Map to decide which part of the texture file to look at when telling the renderer how to color a part of the 3D object.

So, in broad terms, when the renderer wants to know how to color a pixel on your screen, it sees what 3D object is there. That point on the 3D object has an equivalent spot in the object's texture. The pixel in that spot in the texture file then determines the object's color when shown on the screen. Of course, once we add in the various interpolation methods described later in the lecture, that simplicity gets thrown out the window. Regardless, this process is the foundation from which more complex methods build off of, and so it's still worthwhile to have this process mentally modeled.

s3kim2018

Is there a reason why we keep a separate texture space with (u, v) coordinates? What is the harm of just saving the texture data in world space (x, y ,z). Is there an optimization that could be done by removing the z axis? Or is it just convention to define texture in a 2d plane?

YiweiIvy

Not sure if this is correct, but I think storing textures in 3D (x, y, z) would probably be unnecessary sometimes as it increases memory consumption and computational complexity.

spegeerino

This is kind of a tangential question, but there was a question in lecture about how map projections can't map surfaces of equal area to equal areas on the globe. Does this affect the quality of most textures at, say points of high curvature on 3D models or things like that?

eugene-yoojin-han

In practice (or at least for 3D modeling software), I'm pretty sure that 3D artists take the objects' geometry into account and create texture maps based on the geometry. This means that any coordinates with high frequency (i.e. points of high curvature) will be taken into account beforehand, ensuring the best quality possible for the textured objects. I might be wrong from the engineering perspective, but this is at least how it works for 3D modeling from my knowledge!

antony-zhao

I find this really interesting because I remember watching a while back all about making maps, so I wonder if some of the issues that arise (such as preserving sizes) matter as much for computer graphics.

diandestroyer

I also had a little bit of a tangential question, and it is about my understanding of the Mercator projection, or the map of the world being shown on the slide. I have heard that this projection is misrepresentative in a lot of ways when it comes to the actual size of countries and continents, and what I've read and been taught is that this misrepresentation stems from the fact that displaying a sphere on a flat surface would always distort it in some ways. Since in graphics we are presumably trying to most accurately display our texture space onto the world space I was wondering if there was a way to have an accurate globe depiction, and if there is why it has not been more widely adopted.

llejj

@diandestroyer I think any map of the world would be distorted in some way, thus not being "accurate". But there are different maps that preserve different properties of the globe. For example, this video describes a map that pilots use because it preserves the direction of take-off. https://www.youtube.com/watch?v=23IgKIx9Gow

AlsonC

I found this really interesting, I was wondering how this distorts the actual size of countries on maps versus on globes.

You must be enrolled in the course to comment