Ball Race – Day 3

The wall generation code has finally taken shape and generates the vertices for the walls exactly like it was meant to be. Vertices are optimally shared between the walls and no polygons are ever generated that the user wouldn’t be able to see. The code also avoids T vertices in order to prevent flickering pixels at the wall junctions.

Screenshot of a wireframe mesh showing a maze forming the letters H I

Nevertheless, I fear I will have to change this code soon. It currently doesn’t generate texture coordinates and the shared vertices will become a problem if I want a continuous surface on my maze walls (which I plan to do by calculating u,v as x+z,y – which doesn’t work for the top of the walls since y [==v] would be the same everywhere).

Plus, the current code generates normals that are diagonally pointing away from the walls. If I would use these normals for ligthing, the walls would look as if they were rounded. I’ll still have to see whether I’m going to use normal-based lighting at all.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please copy the string GkZtNj to the field below:

This site uses Akismet to reduce spam. Learn how your comment data is processed.