Anim8or Community

General Category => ASL Scripts => Topic started by: Simon on August 07, 2008, 06:52:07 am

Title: Exporting Scripts Help
Post by: Simon on August 07, 2008, 06:52:07 am
Hey, Long time since I have been here.
I have been in the process of creating my own MMORPG but I want to create my own 3D file type but I have no idea how to make export scripts.
What I want is for it to read the object point by point then face by face.
And print the X,Y,Z of the point and for the faces to print the ID of the points creating it.
I also want the faces to all be triangles.
So it will create an output like:
Code: [Select]
10, 10, 10
12, 10, 10
10, 12, 10
10, 10, 12
How would I go about doing this?
An example script would be nice if possible.
And just as a little extra, is it possible for it to read the texture of each face and if it is [0,255,0](green) then it will print a ",1" at the end of the face?
This just makes it that it tells my program that it can be walked on.

Any help is greatly appreciated,
Title: Re: Exporting Scripts Help
Post by: Steve on August 16, 2008, 09:10:16 pm
Simon, take a look at the two export scripts on the scripts page.  One writes out a C source file and the other writes the .obj file format which is similar to what you want to do.