MTM2.com

A forum for mtm2 discussion
FAQ :: Search :: Members :: Groups :: Register
Login
It is currently Mon Jun 18, 2018 5:40 pm



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Import list of vertex coordinates?
PostPosted: Fri Jun 20, 2003 6:36 am 
Member

Joined: Sun Sep 08, 2002 2:01 pm
Posts: 205
Location: Switzerland
:?:
Is there a way to import list of vertices (e.g. from a tab-separated text file)?

I ask because I work on 3D animated water surface model. I have calculated the coordinates for all vertices in a spreadsheet and wonder if there is an easier way than entering these one by one into binedit (for each of the bins making up the animation).

Thanks for your help


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 03, 2003 8:00 am 
Are you aware that BinEdit imports .OBJ files, which are plain text? It imports vertices and polygons only, no texture coordinates. Perhaps you should examine the <a href=http://netghost.narod.ru/gff/graphics/summary/waveobj.htm> wavefront format</a>


From BinEdit.txt

* APPENDIX A - Wavefront/Digital Arts format *


Wavefront/Digital Arts is a very simple format that stores three dimensional models as ASCII files. BINEdit implements only two Wavefront/Digital Arts commands:

v #x #y #z
define a vertex at coordinates #x, #y, #z
Examples:
v 0.34445 -12 133.4
v 1 1 1

f #1 #2 #3
f #1 #2 #3 #4
define a face using the vertices #1 #2 #3 (triangle) or #1 #2 #3 #4 (rectangle)
NOTE 1: Wavefront numbers the vertices 1, 2, 3... but BINedit starts with vertex 0.
NOTE 2: Wavefront supports faces with any number of vertices, BINedit only 3 or 4.
Examples:
f 12 33 4
f 1 2 3 4
f 0 1 2 3 is invalid (vertex 0)

I use this format to define my model shapes "off line". Its easier than using the menu commands to add each vertex and face. I've included the BARREL.OBJ that I've used to define the orange barrels for Derailed. View/Edit it with Notepad.

barrel.obj:

v 427 -640 246
v 490 -640 -51
v 366 -640 -330
v 102 -640 -482
v -200 -640 -450
v -427 -640 -246
v -490 -640 51
v -366 -640 330
v -102 -640 482
v 200 -640 450
v 427 640 246
v 490 640 -51
v 366 640 -330
v 102 640 -482
v -200 640 -450
v -427 640 -246
v -490 640 51
v -366 640 330
v -102 640 482
v 200 640 450
v 0 640 0
v 0 -640 0
f 1 2 12 11
f 2 3 13 12
f 3 4 14 13
f 4 5 15 14
f 5 6 16 15
f 6 7 17 16
f 7 8 18 17
f 8 9 19 18
f 9 10 20 19
f 10 1 11 20
f 11 12 13 21
f 13 14 15 21
f 15 16 17 21
f 17 18 19 21
f 19 20 11 21
f 2 1 22 3
f 4 3 22 5
f 6 5 22 7
f 8 7 22 9
f 10 9 22 1


Top
  
 
 Post subject:
PostPosted: Sat Jul 05, 2003 7:50 am 
Member

Joined: Sun Sep 08, 2002 2:01 pm
Posts: 205
Location: Switzerland
Thanks Wint
That's exactly what I was looking for. [tu][tu][tu]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group