Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: Script request: export a 3d model from sequence mode  (Read 4524 times)

Miatpi

  • Newbie
  • *
  • Posts: 15
    • View Profile
Script request: export a 3d model from sequence mode
« on: March 10, 2013, 06:00:43 pm »

Hi, I've got a request for a script that allow you to export a 3d model from sequence mode.
 
Currently the only way for me to export a 3d model from sequence mode is by exporting it as a 3ds file.
The problem is that there is a "point" limit for the 3ds file exportation, I cant export big or detailed models.
Thats why I need a script so I can export a certain frame from the sequence as a 3d model.

Another solution is a script what makes a certain frame in the sequence mode into a morph-target in the models morph-target list. Then you could switch to it in object mode and export it as a 3d model if you want to.

I understand if its too much I ask for, but I'm glad if someone can help me. Thanks! :)
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: Script request: export a 3d model from sequence mode
« Reply #1 on: March 11, 2013, 12:55:04 am »

I don't know about script but I am working on a simple application that will take an anim8or file and extract the skeletal information from it.
Though I would not expect it to be finished until at least a month or two, even at that I am still being optimistic.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1448
    • View Profile
Re: Script request: export a 3d model from sequence mode
« Reply #2 on: March 11, 2013, 03:36:27 am »

Script functionality in the sequence editor hasn't been implemented yet, so only 3rd party tools can be made, which is a lot more work than when simply developing a plugin.

At some point I'd like to take Texel's liban8 library, extend it, and write some tools for Anim8or (or at least an FBX exporter), but time's not on my side right now.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1448
    • View Profile
Re: Script request: export a 3d model from sequence mode
« Reply #3 on: March 11, 2013, 05:16:57 am »

And so...I thought about it a little more and recalled some experimentation that I did with GLIntercept when I was thinking of figuring out how to hook into Anim8or for 3rd party manip tools. Anyway, I remembered the whole DirectX ripping deal with video games, looked it up for Opengl and found this method for you to capture your 3D model in exactly whatever state you have it in Anim8or. I originally installed GLIntercept & OGLE and did it all manually with the configs, but Chello (or whoever it is) made a nice, painless toolkit for easy use. Note that you need the .NET 2.0 framework installed to run it.

  • Download and install GLXtractor into any folder
  • Open GLXtractor.exe
  • Hit 'Choose App', select your Anim8or.exe file with it.
  • In the 'Capture' tab, keep everything unchecked and change the capture shortcut if you want. Don't worry about the Filename or folder, they won't be useful.
  • In the 'Ogle Plugin' tab, have the 'Capture Texture Coords' and 'Capture Normals' options checked. Keep everything else as they were.
  • Save the profile, then hit Start Application
  • Navigate to your sequence at the frame you want to export, hide the bones, then hit the shortcut key to capture it. By default it's ctrl+shift+f unless you changed it.
  • Now in the same directory as where Anim8or.exe is, there should be some file named Anim8or.#.obj. That is your perfectly copied .obj file that you can use for whatever you want.

Or you can use CrashDrive's method here, though it may be a little more work and your results will differ.

For archiving purposes, I'm putting GLXtractor as an attachment as well.
Logged

CrashDrive

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Script request: export a 3d model from sequence mode
« Reply #4 on: March 11, 2013, 09:38:05 pm »

That's great Raxx. Works perfect.
I cross referenced these two methods.

The problem with Ani2Pov is, it turns Quads to Tris, so you can't get an exact copy.
Your method (GLXTractor) works perfect for static models.
The Ani2Pov method works best for animated game models as most engines use Tris anyway.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: Script request: export a 3d model from sequence mode
« Reply #5 on: March 12, 2013, 12:01:39 am »

Script functionality in the sequence editor hasn't been implemented yet, so only 3rd party tools can be made, which is a lot more work than when simply developing a plugin.
I thought it was the other way around, making a 3rd party application would be easier than trying to make a plugin that is limited to only what the program can do with.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1448
    • View Profile
Re: Script request: export a 3d model from sequence mode
« Reply #6 on: March 12, 2013, 02:19:57 am »

cooldude234, I think you missed the point of the statement I had made (also, have you never made a plugin before?).

Example for this case:

3rd Party Tool - Programmer has to parse the .an8 file, interpret the mesh deformation at a specific point in the sequence using skeletal info, weights, envelopes, and morph targets, and then export the mesh information into the desired format, and develop a user-centric interface for the program. The user then has to import his .an8 file into the 3rd Party Tool and hope it works, while navigating in a foreign interface to locate the exact frame in the sequence and then export it.

Plugin - Using ASL, programmer codes it to export the mesh information into the desired format, using functions that already do all the work of capturing the mesh data at that specific frame. User clicks Sequence->Export (or similar).

There may be some limitations to simply using ASL. But then, there's also a reason why there are more ASL plugins than 3rd Party tools. The features you're thinking of that is made only possible by using lower-level programming are not worth the work in the first place since they are either already available in alternative software or there's a low demand for it, or the original software is no longer being updated.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 901
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: Script request: export a 3d model from sequence mode
« Reply #7 on: March 12, 2013, 06:35:14 am »

cooldude234, I think you missed the point of the statement I had made (also, have you never made a plugin before?)
I've tried.

3rd Party Tool - Programmer has to parse the .an8 file, interpret the mesh deformation at a specific point in the sequence using skeletal info, weights, envelopes, and morph targets, and then export the mesh information into the desired format, and develop a user-centric interface for the program. The user then has to import his .an8 file into the 3rd Party Tool and hope it works, while navigating in a foreign interface to locate the exact frame in the sequence and then export it.

Plugin - Using ASL, programmer codes it to export the mesh information into the desired format, using functions that already do all the work of capturing the mesh data at that specific frame. User clicks Sequence->Export (or similar).

There may be some limitations to simply using ASL. But then, there's also a reason why there are more ASL plugins than 3rd Party tools. The features you're thinking of that is made only possible by using lower-level programming are not worth the work in the first place since they are either already available in alternative software or there's a low demand for it, or the original software is no longer being updated.
Besides a few things you threw in there that aren't necessary, all of that you have said there is actually quite easy, just a lot more code, whereas usually with scripting lessens the code but also lessens your flexibility and decreases your run-time speed.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1448
    • View Profile
Re: Script request: export a 3d model from sequence mode
« Reply #8 on: March 12, 2013, 11:16:44 am »

[edit] You know what, I'm just going to stop there so as to stay on topic. If you say it's easy for you then it's easy for you. By all means code as you will.
« Last Edit: March 12, 2013, 11:55:55 am by Raxx »
Logged