Import list of vertex coordinates?

Homepage: http://binedit.com
Post Reply
rocketalces
Member
Posts: 205
Joined: Sun Sep 08, 2002 2:01 pm
Location: Switzerland

Import list of vertex coordinates?

Post by rocketalces »

:?:
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
Wint

Post by Wint »

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
rocketalces
Member
Posts: 205
Joined: Sun Sep 08, 2002 2:01 pm
Location: Switzerland

Post by rocketalces »

Thanks Wint
That's exactly what I was looking for. [tu][tu][tu]
Post Reply