Hey guys. I recently downloaded the source to a pretty nice 3D engine. I've incorporated some smooth sound events and enhanced the control of the player, but now I've started the process of adding 3D objects to the game. There are currently 3 objects included with the game, but I can't seem to figure out how they work. Rather than a .X or .3DS file, these models are simple text files which specify information about the models. As much as I've tinkered with the files, I still cannot understand how to create my own. Let's say we have a metal sign. It looks like a stop sign, except the actual face of the sign is a triangle rather than an octagon (8 sided is octagon right?) Here's the coordinates for the sign, right from the text file (Sign.emp):
Now I can only presume that any line starting with t is a set of vertices (3 lines where t is the first character and 3 sides to the triangle). I guess p is the actual location of the object in the "world". Obviously m specifies the textures used for the object. Now here's what throws me off - There are 3 lines that start with "t", but these 3 lines control the way the sign (3 sides) AND the pole (2-4 sides?) are rendered. The pole probably has 2 sides because it's paper thin, so I guess specifying the thickness of it isn't needed.
So the question is, how are those 3 lines of coordinates used to determine the shape and size of the sign? I would LOVE to see a generator out there that allows you to draw an object with the mouse and it automatically generates the text file with these coordinates. If one doesn't exist, could someone please try to explain to me how this file works with an application? I will most definitely create a generator (if one doesn't exist) to automate however this file was created. Thank you very much for any input you can provide!
Code:
t,-25,100,0,0,150,0,25,100,0,0,1,0.5,0,1,1,1
t,-2,0,0,2,0,0,-2,100,0,0,0,1,0,0,1,2
t,-2,100,0,2,100,0,2,0,0,0,1,1,1,1,0,2
p,2800, 440, 10900
m,"\objects\sign.mtx"
m,"\objects\stand.mtx"
So the question is, how are those 3 lines of coordinates used to determine the shape and size of the sign? I would LOVE to see a generator out there that allows you to draw an object with the mouse and it automatically generates the text file with these coordinates. If one doesn't exist, could someone please try to explain to me how this file works with an application? I will most definitely create a generator (if one doesn't exist) to automate however this file was created. Thank you very much for any input you can provide!