Graphics Programs Reference
In-Depth Information
Figure 4-50 . Output text file
Using the Mesh Data
Before we discuss how to use the contents of this output text file, we describe the
blocks of mesh data inside this file. So, open the file tankFence5.txt in your
favorite text editor and start reading through.
1. Scroll down at the end of this file, until you reach the “color:” block.
Recall the colors we used inside Blender for the game objects—red for
Enemy, blue for Player, and white for Plane. These colors are written as
per-vertex colors in the output text file. The “color:” block is important,
as it helps determine the order of objects across various blocks in this
file. Inside the “color:” block, per-vertex white color appears first for
the Plane object. So, all other blocks also begin with mesh data for
Plane object. The mesh data for Player follows this, and finally Enemy
object.
2. The “color:” block contains rows of
"1.000000f,1.000000f,1.000000f,1," ; this represents per-
vertex white color for the Plane object. Then, this block contains rows
of "0.000000f,0.000000f,1.000000f,1," , which represent
per-vertex blue color for the Player object. Similarly, it contains the per-
vertex red color for the Enemy object.
 
Search WWH ::




Custom Search