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: Using a script to aid rendering operations.  (Read 2591 times)

Aethelwulffe

  • Newbie
  • *
  • Posts: 7
    • View Profile
Using a script to aid rendering operations.
« on: September 02, 2009, 04:36:11 pm »

I am rendering images of models to create isometric sprites.  Ideally, I would love to have an object in object editor, run the script, and have it render an image, rotate the model 30 degrees, and render again until the model was rotated all the way around.  I have been doing this manually, and it takes about 108 images to create a 12 direction walk cycle, plus a standing position, plus more for special actions.  This ain't easy.  I know that I can do this better (I hope) in the studio, but if there is some way to use a script to assist this process, it would be a better way to go in my opinion.  I have not used ASL, but in looking through the API of functions, it did not seem to have any dedicated functions for automating rendering, just the tools for manipulating shapes and exporting the data files.  Am I correct in this or am I missing something?  I plan on starting with a simple script that simply rotates the model a certain number of degrees (30 as a default), but I was hoping for suggestions that might lead me to the correct idea to attack this issue. 
  Here is the thread where we have been discussing this:  http://www.anim8or.com/smf/index.php?topic=2593.0

Thanks guys.  I usually do all my own proof of concept theorizing, but I would rather jump-start my usual multi-month discovery process.
Logged

ENSONIQ5

  • Sr. Member
  • ****
  • Posts: 928
    • View Profile
    • Mission Backup Earth
Re: Using a script to aid rendering operations.
« Reply #1 on: September 07, 2009, 03:01:40 am »

This should already be possible, using keyframe animation.  If you set the scene length to 12 frames, define the object as rotating fully once in those twelve frames either by keyframing or (preferrably) using a simple rotation script, you should then be able to render the movie.  If you select the option of rendering to still frames rather than direct to AVI you will automatically have your 12 images.

To produce all 108 frames for the full walk cycle, you could keyframe the model to rotate 30 degrees every 12 frames (assuming the walk cycle is 12 frames long), with the keyframes set to the "corner" type, so there is no movement in the "tweener" frames.  Again rendering to still frames you could have all 108 frames rendered automatically.
Logged

Aethelwulffe

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Using a script to aid rendering operations.
« Reply #2 on: September 07, 2009, 01:37:08 pm »

Thank you very much for that process sir!
  I am doing a lot of heavy coding for my game right now, but as soon as I finish fleshing out the RPG side of the engine some more (There are stations on the planet, planetary orbital environs, system charts, star charts, space stations etc... where the character must move between reliably, not to mention save games and the like) I will need to re-create some of my animated characters.  Unfortunatly, I lost one of my best models as well as a lot of other data in a double hard-drive failure.  Since I also lost my scaling data for some of the other models, it will be hard to add sprites to the existing characters (holding items and special actions) as well, so if I can get a studio set up, it will greatly help this process.  Each character is going to have some 160 images all in all.  Rough!
Of course if anyone out there likes big projects... I have a doozie!  I released this game a couple of years ago.   It is called VECTOR.  It is a Star Frontiers (old TSR RPG + space combat) game that I have some trademark rights to.  I did the multiplayer space combat version first, and have been adding the RPG element to it as I go along.  I am using World Creator software in addition to Anim8or and some other utilities.  I have a lot of movies in the game, but those are mostly rendered in a free game called Orbiter that I put ships and characters into, then capture using FRAPS.  My stuff rendered from Anim8or looks great, but my work with tiles and the like is pretty crude.  There is a lot of "room creation" that is needed, so if any of you guys are interested in that sort of interior decoration..... or anyone interested in helping with setting up and scripting a studio to do this job, or anyone interested in doing any modeling, story writing etc.. PuhLEEZ!
« Last Edit: September 07, 2009, 01:39:19 pm by Aethelwulffe »
Logged