Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Custom Export Script  (Read 8283 times)

Frozenwounds

  • Newbie
  • *
  • Posts: 3
    • View Profile
Custom Export Script
« on: March 15, 2009, 02:02:04 pm »

I've made up my own format for the models in a game I'm making.
I'd like to use Anim8or to make models and I'm pretty sure it's possible to make a script to export to my format. Can anybody make such a script or at least give me some pointers on how to do so?

The format is like this:
Code: [Select]
1,1,1,
1,1,1,
1,1,
The above code defines one vertex.
First line: position relative to origin.
Second line: normal.
Third line: texture co-ordinates.
The format is a triangle list so there should be three of those for each triangle in the model.
There can be spaces (empty lines) between each vertex but not between the three lines.
Each number is allowed to be positive or negative and can be a decimal.
All of the commas are necessary.

I have quite a bit of programming experience but I'm not sure how to work with Anim8or so thanks to anybody who can help or even make the script for me.

Frozenwounds.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: Custom Export Script
« Reply #1 on: March 15, 2009, 03:23:50 pm »

Easiest way I learned it was to take a look at the ASL specifications: http://www.anim8or.com/scripts/spec/Anim8or_Scripting_Language.html and look at the export obj plugin made by Steve: http://www.anim8or.com/scripts/export_obj_plugin.a8s

Then I'd just break down the export obj plugin and use it as a reference for building any basic export script. Since you have a bit of programming experience, this should be a piece of cake ;)
Logged