Previous | Next --- Slide 53 of 78
Back to Lecture Thumbnails
amywuwho

In this case, we can see all edges of the cube. How would we be able to make the back panels not visible like it would be if it were solid?

xTheBHox

I saw this at first as a pyramidal structure before realising that the large face is in front, not behind.

keenan

@amywuwho Terrific question. This task was traditionally known as hidden surface removal and there are a lot of different solutions. The modern approach is to use a Z-buffer, which we'll talk about a lot in our lectures on rasterization.

One piece of food for thought here: do we even have enough information to know which lines should be hidden? In other words, if we just know the vertices and the edges connecting them, does that tell us enough about the geometry to know where the faces (squares) of the cube are? (And can you write an algorithm to recover the faces from the edges? :-))

keenan

@xTheBHox Totally. You see right away how human perception creeps into graphics, and it may not always be obvious how to correct this kind of optical illusion. There are a lot of cues we could try to add here to improve our perception of the cube, such as occlusion (as @amywuwho mentions), shadows, or even stereo vision (in VR).

ChrisZzh

Following up the discussion above, I'm wondering what is the typical data structure used in nowadays' rendering software for such a 2D cube? Is it the coordinates of all vertices + some information about which vertices are up front?

keenan

@ChrisZzh Great question. The short answer is: there is no one single answer; each piece of software may in fact use many different data structures to represent geometry, and may even switch between representations in-flight for different tasks (editing, tessellating, rendering, ...). We'll talk about this kind of issue starting in our lectures on geometric modeling.