Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How do I specify model coordinates in a text file?

How do I specify model coordinates in a text file?

How do I specify model coordinates in a text file?

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):


p,2800, 440, 10900
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!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close