Multitexture problems with procedural geometry

Here is the random dungeon generator. No collisions have been set up. The core of the script is directly derived from a Blender script by Piichan under his open license. Details about sources are in the script. This also includes a modified version of consultit’s mouselook camera script, found here: [url]1st person camera, "free view" style].

My coding may not be of the highest quality, but this shows how to generate normals, binormals, and tangents at runtime, as well as how to set up multiple textures on a procedurally-generated model, as noted above. It shows how to use OnscreenImage to create a level map and how to display a player sprite on that map to show player location. I had a hard time digging up information about how to do most of this, so it seems like an example like this might be useful for the Panda community.

I had to reduce the .zip file size to post this, so I dumped most of the textures from the zip. I added to the script a function to generate the textures at runtime, so perhaps this script now illustrates how to do that, as well.
random_dungeon.zip (38.5 KB)