Jump to content


Photo

Porting animations from other games


  • Please log in to reply
37 replies to this topic

#1 Sam.

Sam.
  • Administrator
  • 1339 posts

Posted 17 December 2009 - 11:02 PM

These are some of the animation that are in the game called Lionheart. They could be ported into BGII, but the animation would have to be built by hand, one frame at a time (a VERY tedious and time-consuming process). For each MODEL, there are usually Attack01, Attack02, Death, Fidget, GetHit01, GetUp, Idle, SpellCast, and Walk animations. The animations are 3D models, so they can be ported at any size, from any angle, and as many fps as needed. Here are some examples of what is in the game:
FULL.png

Is there any interest in porting any of these animations?

Edited by Sam., 22 December 2009 - 10:22 PM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 21 December 2009 - 06:50 AM

That last one in the third row looks vaguely like an alu-fiend so it would be useful to have that. Maybe some of the others for alternate fiends or undead but it might not be worth the trouble if they're a pain to convert. Have you figured out the .mdl format then, or are these in some other format? Not knowing that format was the main stumbling block in converting the animations to BAMs or even BMPs.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 22 December 2009 - 12:35 AM

I want them all! I don't know if I have a bunch of time to port animations but I would try one or two since I have the game. Also would any animations from Temple of Elemental Evil be usable? I guess it would be the slow process of putting those together by hand but maybe there are some cool creatures in that to use and more in the DandD realm. I have that game also if there are any tools to extract files with or if someone can point me to some programs I can use.
?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#4 Erephine

Erephine

    leit að lífi

  • Member
  • 1912 posts

Posted 22 December 2009 - 02:08 AM

ToEE would be difficult from what I remember. The models can be exported, but not the animations.

崇高滑稽
·


#5 Sam.

Sam.
  • Administrator
  • 1339 posts

Posted 23 December 2009 - 02:43 PM

I don't know if I have a bunch of time to port animations but I would try one or two since I have the game.

I'll give an explanation of how to go about doing it below. If anyone else would like to give porting them a shot who doesn't have the game, just tell me which animations you are interested in and I'll upload the appropriate files (or all of them if desired).
 

That last one in the third row looks vaguely like an alu-fiend so it would be useful to have that. Maybe some of the others for alternate fiends or undead but it might not be worth the trouble if they're a pain to convert.

That one is a Disedira.

Have you figured out the .mdl format then, or are these in some other format? Not knowing that format was the main stumbling block in converting the animations to BAMs or even BMPs.

No, all of the animations and models are Granny 3D files (*.gr2).

How to port animations from Lionheart:

Tools You'll Need:
Granny Viewer
A good .BAM editor (I use BAMWorkshop II) found here.
A screen capture program will also make thing go faster. This AutoHotkey function works well for me, but any screen capture program will do (you could even do it with the "PrntScrn" key and then paste it to MS Paint, but that's REALLY slow.)

Extract the Granny 3D files:
All of the files for Lionheart are contained in the massive ~1.5GB "data.DAT" archive. The entire thing can be opened using a program like WinRAR ('R-Click' -> Open With... -> WinRAR archiver). Now extract the animations you will be porting. The Disedira, for instance, is found in <data.dat\Resources\Models3D\Enemies\Disedira>.

Setting up animation in the Granny Viewer:
Open the creature's model file. "Disedira.MODEL.gr2" for example. Now you need to load the animation files. Go to the "Animation List" tab under the model preview and load all of the creature's animation. Now click on the "Back to Main Menu" button on the menu bar at the left. Go to "Axes" and uncheck "Min Axes". Now click on the "Back to Main Menu" button again and go to "Grids". Click "All Grids Off" and then go back to the main menu. Now go to "Animation Preview". Uncheck play, select the desired animation you loaded before, click on "Zoom to Scene" and then "Orbit Scene" buttons. Now adjust the size and angle of the animation (using the left mouse button and mouse scroll wheel) as needed. To capture the frames, I suggest clicking on "Time Drag" and then dragging the mouse from left to right, taking a screen shot every tenth of a second or so. Do this for every direction of every animation for the type of animation slot you are porting these animations to. Now it's just a matter of building the animation from your screen captures using your .BAM utility of choice, paying close attention to the alignment of the frames.

I may have made the process sound more complicated than it is. It really isn't hard to do, just time-consuming. There have been some efforts to convert the Granny 3D files to other formats (see here), but even if you could successfully convert them, you would still probably have to go through the same ordeal as converting them from NWN.

Here is a VERY quick example for the Rock Titan just to prove my method works:
Attached File  Blue_Titan.bam   94.35K   836 downloads

 

Edit:  The Granny Viewer is no longer available on the RAD Video Tools website.  The most recent version I was able to find online is v2.9.1.0, which I have attached here.  If you have a more recent version, please let me know.

Attached File  gr2_viewer_setup v2.9.1.0.rar   2.16MB   929 downloads

 

Edit:  I tracked down an email from 2010 between me and RAD Game Tools.  Included is some additional information about running the Granny Viewer from the command line which can help automate the setup processes described above.

 

Hi Sam,
  There are a couple of secret settings.  :)  If you run the viewer with:

gr2_viewer -clear PlayAnimation

the "Play" checkbox in the animation preview options will default to
off.  In general, if you hover above an option in the menus, if you can
set or clear it from the command line, there will be a "Var: ..." at the
end of the helpline.  So:

gr2_viewer -clear PlayAnimation -set CoordinateFrames

will turn off "Play", and on "Joint Axes".  It's a little awkward, but
you should be able to use this to build up a couple of .bat files that
will do what you need.  :)

Additionally see http://www.radgameto...nny/viewer.html


Edited by Sam., 10 October 2013 - 06:45 AM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#6 Erephine

Erephine

    leit að lífi

  • Member
  • 1912 posts

Posted 23 December 2009 - 05:54 PM

would you mind if I cut this off into a new porting notes sticky thread?

Definitely very hepful material for people who'd look into porting these.

崇高滑稽
·


#7 Sam.

Sam.
  • Administrator
  • 1339 posts

Posted 23 December 2009 - 06:56 PM

would you mind if I cut this off into a new porting notes sticky thread?

Definitely very hepful material for people who'd look into porting these.

Feel free :) .

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#8 -Guest-

-Guest-
  • Guest

Posted 13 May 2010 - 12:58 AM

Hi, if you're interested in porting "temple of elemental evil" animations, you could find help in the "circle of eight forums". You can find a skm-to-mesh converter there and a modelsviewer.
There is also a "Arcanum" Modding community... perhaps some animations of this game could be useful too.

And, what's with the game "Pool of Radiance 2 - Ruins of Myth Drannor". Never played it, but some screenshots show interesting content and it's Forgotten Realms stuff :)

#9 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 15 May 2010 - 04:36 PM

I haven't looked at the animations from either of those games, but they probably wouldn't be much more different than porting NWN animations (which isn't "easy" but certainly possible).

I mentioned in another thread it should be possible to port animations from Civilization III (earlier ancient/medieval units anyway, rather than later ones like tanks etc.). They even have .wav sounds that should work just fine for BG2 sound slots. Even have .ini files with some of the same sound slots as IE games (ATTACK1, DEATH etc.). Here are some tools that might help with conversion:

Civ3MMToolkit
Flc2Gif

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#10 dabus

dabus
  • Member
  • 1982 posts

Posted 16 May 2010 - 03:42 AM

Since I was in this forum and read this thread, I just wanted to let you know that I might be able to give you a hand on automating some tasks if you can give me detailed instructions.

I used AutoIt3 to do some roll-out installations, build little helpers that are used very often, so I do have some experience when it comes to control applications. If things are time-consuming because you have to do the same things all over again, I can take a look at it and I might be able to help you save some time.
THINK! - It's not illegal.

#11 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 16 May 2010 - 04:59 PM

Since I was in this forum and read this thread, I just wanted to let you know that I might be able to give you a hand on automating some tasks if you can give me detailed instructions.

I used AutoIt3 to do some roll-out installations, build little helpers that are used very often, so I do have some experience when it comes to control applications. If things are time-consuming because you have to do the same things all over again, I can take a look at it and I might be able to help you save some time.

Well, I'll post the instructions I got from Erephine for converting NWN animations. I'm not sure how much of it (if any) could be automated, because it might involve a bit of modder discretion, but it would be great if it could. Certainly, assembling BAMs should be easy enough to automate, which is what BAM Batcher does, but not for creature animations (yet) because they're quite complex - you would need to know exactly which frames go to which sequences. If you know of an automated script that crops BMP or GIF images to the dimensions of their actual data (i.e. ignoring any clear or transparent border pixels) that would be helpful too. At least for the Civ3 animations I looked at, where I would otherwise have to do that manually. Apart from that, you can reduce a lot of animation sequences to animated GIFs, which can be imported directly to BAM Workshop if I recall correctly.

Converting NWN animations

The NWN ones are fairly simple to port. I export the models using NWN Explorer as ASCII (it's in the right click menu), along with all .DDS textures they use. Then I use 3ds Max with the NWMax(?) plugin to import the models.

If it's a model with copied animations (a different SUPERMODEL entry in the .mdl) you'll also have to export the supermodel to get the animations. There's an 'import animations from .mdl' button (or something to that effect).

Next, I check if everything imported correctly (drag through the animation frames). If it has, you can start rendering.

Create a huge box and place it just below 0.0 on the vertical axis (this is needed to project the shadows onto). Set backgrounds/environment/colours to 0,151,151 and make the box matte (I think - just avoid any lighting on it).

Add a spot above the model (with a shadow colour set to 255,101,151) and adjust it until the shadow and lighting are to your liking. Disable the spot's shadow for all objects other than the box (or you'll get pink shadows on them as well).

Place the camera to display the model in the desired distance/angle (make sure it's not cut off in some frames). Do this for all directions and save each separately (9 directions clockwise South-->North for a BGII slot, 8 directions South-->South East for a BG1/IWD slot).

Turn off all edge enhancement filters and render the entire animation to full uncompressed frames (AVI container?) for each direction. Export all frames from all AVI files (I use VirtualDub). Create a palette for your animation using the image editing tool of your choice and convert all frames to that palette. Colour 1 should be background (0,151,151), colour 2 shadow (255,101,151). Make sure all background/shadow ends up using just these two colours after conversion.

Either using 3ds Max or looking at the frames individually, write down the frame ranges for each sequence (walking, attack, etc.) I join these into .gif files, which is much more convenient than importing them frame by frame. I tend to join several NWN animation sequences for the idle sequence since the BGII slot does not have alternating idle/yawn/stretch animations.

Create a .BAM with the same palette.

In BAMWorkshop 1, import all sequences/directions in the proper order*. Optimise (if you haven't) and offset the animation properly; make sure no frames exceed 255x255 in size. The coordinate 0,0 is the centre of the green selector circle. Set the shadow colour of your BAM back to 0,0,0 (you can do this via BAMWorkshop II).

And that is it.

Proper order for the BGII animation slots

(not sure if this is mentioned elsewhere):

===BGII (9 directions each):

###G1.BAM

WALK
SC
SD
GH
DE
TW
SL
GU

###G2.BAM

A1
A2
A3
A4 RANGED 1
A5 RANGED 2
CA
RELEASE


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#12 dabus

dabus
  • Member
  • 1982 posts

Posted 17 May 2010 - 07:47 AM

Ok. I am glad you cannot see me cause I have a huge question-mark above my face.
3dmax seems to be a professional piece of software, and I'm not really willing to pay for something I don't have a use for. I don't see how the lightning of the models could be made accurate by machine. I think this would include some human intuition. (Maybe one can see how it's like with auto-settings, but she would not have this written down if it was not important.) Optimizing with bamshop sound like human labor, too.

I don't use VD or any of those tools either, so it seems like this was just a "a shot in the dark".

Maybe you could make some use of ImageMagick.

Edited by dabus, 17 May 2010 - 07:50 AM.

THINK! - It's not illegal.

#13 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 18 May 2010 - 03:30 AM

Maybe you could make some use of ImageMagick.

Aye, it looks like it can auto-crop via command line at least, and assemble multi-frame images (animated GIFs which can convert fairly easily to BAMs) so who knows, some of it could be automated perhaps.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#14 Sam.

Sam.
  • Administrator
  • 1339 posts

Posted 29 August 2010 - 09:03 PM

And, what's with the game "Pool of Radiance 2 - Ruins of Myth Drannor". Never played it, but some screenshots show interesting content and it's Forgotten Realms stuff :)

Due to a misunderstanding :doh: , I ended up looking into this and here's what I've got. The animations are in the Anims folder. Let's use <\Pool of Radiance\Data\Anims\lizardman> as an example. The .CNB files are some type of archive specific to this (and perhaps similar) games. Using a file analysis utility, I can tell that liz.CNB contains the following files:
  • liz1cast.NAB
  • plizat1.NAB
  • lizat2.NAB
  • \lizdeath.NAB
  • Rxlizdeath1.NAB
  • \lizdeath2.NAB
  • vAlizdeath3.NAB
  • Blizhit.NAB
  • lizidle.NAB
  • lizrdcst.NAB
  • lizwalk.NAB
The only file I have found that can open this type of archive is called MultiEX Commander. On Sourceforge. A download. The downside is that in order to get the functionality necessary to extract the files from the .CNB archive, you have to cough up a $10 "donation". I'll probably never get any farther cause I'm not interested in paying... Once you pay, you'll need the MultiEx BMS Script found here. So far, I have been unsuccessful in identifying a program that can open, import, export, or view the .NAB files once they are extracted.

Additionally, the liz.NAT file in the same folder as liz.CNB seems to call on the following textures:
  • texture lizclaw0.tga
  • texture lizfoot0.TGA
  • texture lizhand0.TGA
  • texture lizhead0.TGA
  • texture lizhndb0.TGA
  • texture lizhnds0.TGA
  • texture lizlarm0.TGA
  • texture lizlleg0.TGA
  • texture lizneck0.TGA
  • texture lizpelv0.TGA
  • texture lizshld0.TGA
  • texture lizskul0.TGA
  • texture liztail0.TGA
  • texture liztors0.TGA
  • texture lizuarm0.TGA
  • texture lizuleg0.TGA
  • texture lizundr0.TGA
and I have no idea where these might be...

...just in case anyone was interested :P .


Edit:

How to extract the animations using MultiEX Commander:

  • Register. If you need further instructions on how to register, drop me a PM.
  • Copy the MultiEx BMS Script (found here) to a text file and save it to your HDD.
  • Run MultiEx Commander
  • Go to BMS->Run MexScript on...
  • Select the text file you saved before
  • Select either a *.cnb or *.cnk file from the PoR:RoMD directory (as these are the only two PoR file formats supported by MultiEx Commander)
  • Select the files you want to extract and press the graphical Extract button
The *.cnb files are a container/archive format that store the character animation files (*.nab). The *.cnk files are a container/archive format that store *.ink (presumably some kind of 2D graphic file).

Edited by Sam., 06 September 2010 - 11:39 AM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#15 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 31 August 2010 - 01:49 PM

I'd guess .cnb is probably just "compressed .nab". As to what .nab is, probably some sort of proprietary animation format. Can't find any details on it either, or anything at all on modding tools for the game.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#16 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 29 January 2011 - 04:55 AM

Since I was in this forum and read this thread, I just wanted to let you know that I might be able to give you a hand on automating some tasks if you can give me detailed instructions.

I used AutoIt3 to do some roll-out installations, build little helpers that are used very often, so I do have some experience when it comes to control applications. If things are time-consuming because you have to do the same things all over again, I can take a look at it and I might be able to help you save some time.

Since you volunteered, maybe you could help. We are finally at a stage of looking into (semi-)automating the conversion process, with the following so far:

1) WeiDU routine that parses the NWN .mdl for animation sequence frame ranges
2) 3ds Max script that outputs those ranges to AVI files for each sequence

So to continue the automation after this, we would need:
3) Batch AVI to animated GIF converter (that can also palette the latter - Animation Shop can do this, but not in batch)
4) Batch GIF auto-cropper that preserves the original canvas offsets (ImageMagick's convert -trim feature can do this)
5) Batch automated GIF to BAM converter (also preserving offsets - BAM Workshop can do this, but not in batch)
6) Batch tool to adjust the BAM offsets (easy part - WeiDU could do it with a few lines of code)

So we could use help mainly with automating #3 and #5. Since the programs don't natively support batch processing (unless alternates can be found) it would need to be some sort of macro/key-logging tool. I guess AutoIt can do this? I tried AutoHotKey (apparently based on AutoIt) but it didn't get great results. Then again, I'm not an expert on the scripting language.

[Incidentally, I don't think that BAM Workshop link works, with teambg.eu being down for some time... maybe we should mirror it here.]

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#17 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 29 January 2011 - 06:49 AM

[Incidentally, I don't think that BAM Workshop link works, with teambg.eu being down for some time... maybe we should mirror it here.]

For live links, both v1 and v2 can be had from Sorcerer's Place.

#18 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 29 January 2011 - 07:08 AM

We are finally at a stage of looking into (semi-)automating the conversion process, with the following so far:

1) WeiDU routine that parses the NWN .mdl for animation sequence frame ranges
2) 3ds Max script that outputs those ranges to AVI files for each sequence

So to continue the automation after this, we would need:
3) Batch AVI to animated GIF converter (that can also palette the latter - Animation Shop can do this, but not in batch)
4) Batch GIF auto-cropper that preserves the original canvas offsets (ImageMagick's convert -trim feature can do this)
5) Batch automated GIF to BAM converter (also preserving offsets - BAM Workshop can do this, but not in batch)
6) Batch tool to adjust the BAM offsets (easy part - WeiDU could do it with a few lines of code)

So we could use help mainly with automating #3 and #5. Since the programs don't natively support batch processing (unless alternates can be found) it would need to be some sort of macro/key-logging tool. I guess AutoIt can do this? I tried AutoHotKey (apparently based on AutoIt) but it didn't get great results. Then again, I'm not an expert on the scripting language.

[Incidentally, I don't think that BAM Workshop link works, with teambg.eu being down for some time... maybe we should mirror it here.]



I take it that the gif has all the frames together and that no 5. is to get each gif frame and convert to a bam frame. Might be easier to convert avi to still bmp frames, adjust palettes for the bmp frames and then import bmp frames into a bam? I dont know if that would help or be useful, or that im not overlooking something else required for the whole operation to succeed.

fearless

 

CM690 II Case, Corsair HX1000 PSU, Asus Maximus V Gene, Intel i5-3750K @ 4.2Ghz, Corsair 8GB DDR3, Asus DirectCU GTX-670, Samsung 256GB SSD, WD Caviar Black 2TB HDD x2

 

https://github.com/mrfearless


#19 Sam.

Sam.
  • Administrator
  • 1339 posts

Posted 29 January 2011 - 06:11 PM

I take it that the gif has all the frames together and that no 5. is to get each gif frame and convert to a bam frame. Might be easier to convert avi to still bmp frames, adjust palettes for the bmp frames and then import bmp frames into a bam? I dont know if that would help or be useful, or that im not overlooking something else required for the whole operation to succeed.

Thing is, the frames need to be trimmed because of the way the animations are exported into AVIs. The creature is in the middle of a ~256x256 px square, and the excess boarders around the creature need to be removed to make the size of the final BAMs as small as possible. If this trimming was done to individual frames (as individual BMPs or whatever), the size of each frame will be completely erratic, and once you import them into sequences in a BAM, it is pretty much impossible to get the offsets correct. We have found a program that will trim the frames in an animated GIF while maintaining the proper offset, and BAMWorkshopII can import animated GIFs directly as sequences. It can also import fully uncompressed AVIs as sequences, but the trimming program doesn't work with AVIs.

Did that make sense?

So really, I guess what I'm saying is that the best possible thing would be to have a BAM program that could import truecolor AVIs as sequences, use all the frames in the BAM to calculate a single optimized palette, apply the palette to all the frames in the BAM, trim all of the frames while maintaining the proper offset for each one, and finally be able to increment/decrement the X and Y components of the offsets for all the frames by the given value.

Edited by Sam., 29 January 2011 - 06:19 PM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#20 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 29 January 2011 - 10:01 PM

Hi Sam,

Yes that does make sense, i did think there was a particular reason for the process flow, but wasn't sure exactly the reason for it. I went looking for a batch image converter program on the assumption that avi to bmp could be an option, and found IrfanView (http://www.irfanview.com), which might still be of use, as it can convert avi to bmp frames (but not to .gif apparently), although that wont solve the trim, palette options that are required.

Ill keep looking for and thinking about possible solutions in the mean time.

fearless

 

CM690 II Case, Corsair HX1000 PSU, Asus Maximus V Gene, Intel i5-3750K @ 4.2Ghz, Corsair 8GB DDR3, Asus DirectCU GTX-670, Samsung 256GB SSD, WD Caviar Black 2TB HDD x2

 

https://github.com/mrfearless