1.11M Members

dat to obj model converter (needs to know)

 
0
 

ok...
so I've decided to start work on a model converter...

I'm a lousy Py programmeer and I'm trying to understand a few things...
but first off:

I want to store vert XYZ data in 'verts' as a list...
say we have 3 verts, the var would look like this:

verts = [X,Y,Z , X,Y,Z , X,Y,Z]

#done with this:
while (count > 0):
    verts.append(vec(),vec(),vec())
    count -= 1

now how would I read from the 'verts' as 1 vert at a time??
I'm thinking something like:
verts[0], verts[1], verts[2]

but that would just return the first offset...

can someone help :/

 
0
 

You can't append 3 values to a list

TypeError: append() takes exactly one argument (3 given)

Further, what is this vec() function ?

 
0
 

You can't append 3 values to a list

TypeError: append() takes exactly one argument (3 given)

Further, what is this vec() function ?

I know...
didn't feel like typing the entire code...

(I'm on Wii)

 
0
 

So you want to read verts from a file and write it in your own format? You just need to be able to read a line from a file, delete any un-needed characters and split the string up into three parts. Then you can convert them to int and make a list of these. Just do google searches for the above bits and pieces. Should turn something up.

 
0
 

So you want to read verts from a file and write it in your own format? You just need to be able to read a line from a file, delete any un-needed characters and split the string up into three parts. Then you can convert them to int and make a list of these. Just do google searches for the above bits and pieces. Should turn something up.

dat is hex... (from a GCN game)
obj is ascii

the dat format is complex...
it has a header that takes you to a relocation table...

I want my converter to store everything in a var before prompting to save an obj :/

btw, I'm tired of 0 results on google D:

 
0
 

ignore that last post :/

I've just thought of a better way...
just rename the obj after the dat :/

^whith doing that, I can do 'per vert' conversion

EDIT: @ any admin that spots this
don't delete this thread...
there will be times I'll need to bring up something about this :/

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article