Chat Log: What defines a RV polygon?

Listed in: Technical backgrounds
Date: 2000-05-01
Author: ali
16:22 Antimorph: I've begun to wonder exactly how many numbers
16:22 Antimorph: are used to define a single polygon
16:23 ali: one polygon. easy. wait a second, I'll look it up not to forget something...
16:24 ali: We have:
16:24 ali: [1] a set of flags that can be ON or OFF. Those include:
16:25 ali: "is it four-sided (quad) or three-sided (triangle)", and "is the whole polygon excluded from env mapping", and some more
16:25 Antimorph: lets stick with a triangle
16:25 ali: [2] one number. Either between 0 and 9 to indicate texture sheet A to J, or -1 which indicates an untextured, solid-colored polygon
16:26 Antimorph: the env mapping, if all the numbers are understood is less important
16:26 ali: [3] four coordinates to describe it's position in space
16:26 Antimorph: k
16:27 ali: [4] four X-Y-coordinates to describe what pixels of the texture becomes mapped to the edges of the poly
16:27 ali: [5] Four RGBA-values, one for each poly-edge
16:27 ali: For an untextured poly:
16:28 ali: rgb-values are the colors in the edges, the area itself gets interpolated
16:28 ali: for textured ones:
16:28 ali: The "filtering" or "shading" to apply to it. Again, one for each edge, interpolated over the thing.
16:29 Antimorph: ok
16:29 Antimorph: A triangle surely has three edges?
16:29 ali: (Are you familar with the #ff00ff-format?) Here, pure white (#ffffff) lets the texture look exactly as in the bitmap, while #808080 would dim it by 50%
16:29 ali: Yup.
16:30 ali: BTW - With "edges" I mean the points (or "vertices")
16:30 ali: Not the border lines
16:30 Antimorph: ok, but still three vertices for a triangle
16:31 Antimorph: so why four xy coordinates to describe what pixels are mapped
16:31 Antimorph: I'm perhaps being stupid
16:31 ali: just for memory alignment. Some polys are quads, and need 4 of everything.
16:31 Antimorph: ok dokey
16:32 ali: And, if triangles would have only three, they would take up less memory, and you couldn't do easy calculations as
16:32 ali: "The 100th poly in this scene lies 2200 bytes after the first one, because everyone is 22 bytes large".
16:33 ali: That would slow down memory handling extremely (I do really mean extremely!),
16:33 ali: so for triangles there some waste carried around.

Back to: Technical backgrounds

Or Main Index