Jump to content


Photo

Centering frames in a BAM animation correctly?


  • Please log in to reply
23 replies to this topic

#1 What is the Matrix?

What is the Matrix?
  • Member
  • 114 posts

Posted 24 March 2011 - 03:00 PM

Hello :)

I was working on an edit of a fantastic animation of Mr Bubble who was making animations for RPGMaker.
I successfully made an animation for my item in BG2, but the frames are cropped and resized when I've done so. Since the frames are cropped - the animation doesn't show up properly when the cycle is played.

Now I need to get the animation looking smoothly, and not each frame here and there.
Is there any good animators here, or anyone who can tell me how to solve this problem? :)

I did click Center button on DLTCEP's BAM editor... but it didn't help much.
Thanks in advance!

Edited by What is the Matrix?, 24 March 2011 - 03:02 PM.

Neo: Why do my eyes hurt?
Morpheus: You've never used them before.

#2 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 24 March 2011 - 04:28 PM

My favorite for centering item BAMs is definitely Miloch's BAM Batcher.

"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


#3 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 24 March 2011 - 05:51 PM

Is this an inventory icon? If so, there are some instructions here on what the offsets should be (same further down for description icons etc.) or as Sam said, the tool will set them automatically. It's pretty simple as inventory icons have only two frames, and other icons only one.

But this talk of "cycles playing properly" and "each frame here and there" has me wondering if it's something more complex - like an actual weapon animation (or creature animation)? If so, you may need something like Sam's as-yet unreleased unnamed "BAM Builder" or something like that (which in fact I've been waiting for too - at least the latest beta :D).

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


#4 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 24 March 2011 - 07:10 PM

If so, you may need something like Sam's as-yet unreleased unnamed "BAM Builder" or something like that (which in fact I've been waiting for too - at least the latest beta :D).

<_< Well it was kicking my butt yesterday, but I've made some good progress today. By the time I'm done (hopefully soon?) you'll be able to position each sequence (or all of them based on the first) by moving the still image via the arrow keys until it is lined up on top of the foot circle as desired. Something like this:
untitled.jpg
Looking okay so far or should it be done differently?

"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


#5 What is the Matrix?

What is the Matrix?
  • Member
  • 114 posts

Posted 25 March 2011 - 02:52 AM

Hey all :)

@ Sam: Just downloaded his program. :) Though I noticed that it's for centering spell icons, and inventory stuff. :D Haha, I will need this one too, as DLTCEP really doesn't always get it right. Especially smaller BAMs. Your program looks intressting too really. Would love to try it out when you release it. :)

@ Miloch: Yeah, it's a bit more complicated. xD You see, it's a kind of energy explosion which occurs when the target gets hit. When a successful blow is landed, this BAM is played over the target. But yeah... in the .GIF I have, all the frames are one size... when I imported them in BAM Workshop 2, they got cropped. I tried adding frame by frame instead, but the colors don't get right (even though I USE correct palette).

Ok, so I will post up the BAM file to let you know what I mean. :) Again, I have to credit Mr Bubble for his fantastic work of art. I just re-colored it.

Attached Files


Edited by What is the Matrix?, 25 March 2011 - 03:06 AM.

Neo: Why do my eyes hurt?
Morpheus: You've never used them before.

#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 25 March 2011 - 11:34 AM

By the time I'm done (hopefully soon?) you'll be able to position each sequence (or all of them based on the first) by moving the still image via the arrow keys until it is lined up on top of the foot circle as desired.

Looks cool. (But how do you move it vertically?)

You see, it's a kind of energy explosion which occurs when the target gets hit. When a successful blow is landed, this BAM is played over the target. But yeah... in the .GIF I have, all the frames are one size... when I imported them in BAM Workshop 2, they got cropped. I tried adding frame by frame instead, but the colors don't get right (even though I USE correct palette).

Wow, I didn't know BAM Workshop 2 autocropped GIFs - we've been using ImageMagick for that. It looks like it might be offset more or less properly when I open it in BAM Workshop 1, because the offsets get larger as the image gets larger. I don't know if it's exact though. Maybe Sam's thing will help for that.

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


#7 What is the Matrix?

What is the Matrix?
  • Member
  • 114 posts

Posted 01 April 2011 - 10:11 AM

By the time I'm done (hopefully soon?) you'll be able to position each sequence (or all of them based on the first) by moving the still image via the arrow keys until it is lined up on top of the foot circle as desired.

Looks cool. (But how do you move it vertically?)

You see, it's a kind of energy explosion which occurs when the target gets hit. When a successful blow is landed, this BAM is played over the target. But yeah... in the .GIF I have, all the frames are one size... when I imported them in BAM Workshop 2, they got cropped. I tried adding frame by frame instead, but the colors don't get right (even though I USE correct palette).

Wow, I didn't know BAM Workshop 2 autocropped GIFs - we've been using ImageMagick for that. It looks like it might be offset more or less properly when I open it in BAM Workshop 1, because the offsets get larger as the image gets larger. I don't know if it's exact though. Maybe Sam's thing will help for that.


Yeah it does, which is pretty annoying when putting in GIFs. :/ I haven't tried the original BAM WorksShop... I thought that perhaps since BamWorkshop 2 has an "2" in it, it should be fixed of bugs and such... but that's far from the truth. :P It's reeeeally buggy.

As for offsets, I do have the whole series of images in exact the same size. The thing is, when I have put them in my BAM WorkShop 2... the result is auto cropped image... which give wrong offset results. Instead of just keeping the original size of the image. Strange stuff this is. LOL But I would also like to try out Sam's program too though. :)
Neo: Why do my eyes hurt?
Morpheus: You've never used them before.

#8 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 01 April 2011 - 11:42 AM

I haven't tried the original BAM WorksShop... I thought that perhaps since BamWorkshop 2 has an "2" in it, it should be fixed of bugs and such... but that's far from the truth. :P It's reeeeally buggy.

They are two different programs, so don't be fooled by the '1' and '2'. I actually prefer Bam Workshop (1) for most things.

But I would also like to try out Sam's program too though. :)

I have a beta (or maybe alpha) I plan to test this weekend, so maybe he can release it after that if all goes well.

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


#9 Ulb

Ulb
  • Modder
  • 373 posts

Posted 14 April 2011 - 01:13 AM

Hey there,

don´t know if your problem is still acute, but I might be able to offer some help as I encountered similar problems while porting animations from D2 recently.

First off: I downloaded your .bam but at least Bamworkshop doesn´t recognise transparency (though maybe there is a way to set a specific color to be transparent in bamwrkshp .. I alway suspected that there must be a option like that ;) )


Anyway, the solution I could offer is rather simple but click-intensive ;)

1. Save your .gif files in a way Bamworkshop won´t recognise their transparency. (I did this with gimp, as I had to edit those files anyway. - Make sure to have gimp use the right frame delay settings)
2. The good news: Bamworkshop shouldn´t crop your frames anymore on importing them.
3. The bad news: All your frames are lacking transparency - if there is a mysterious way to have Bamworkshop accept an other color as transparent: do that.. else you'll have to recolor every single frame by hand.
4. If your file had the right size from the start you should be done.
5. If your file does not show at the right position you'll have to set its x-y position manually via DLTCEP.
(To get the right position without try&error you could load one of your .gif files to Creature Bam-it and use the center animation tool.)

good luck with your work :)
Ulb

Ps.: As you might have to do a little work with Bamworkshop I might as well note that this otherwise great tool doesn´t seem to like it's own "undo" function.. if you missclicked better try to recolor manually as most of the time "undo" meant "start over from scratch" for me..

#10 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 14 April 2011 - 07:43 AM

3. The bad news: All your frames are lacking transparency - if there is a mysterious way to have Bamworkshop accept an other color as transparent: do that.. else you'll have to recolor every single frame by hand.

BAMWorkshop II will let you set the transparency to whatever color you want. Be aware that the tool has bugs, though.

"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


#11 Ulb

Ulb
  • Modder
  • 373 posts

Posted 14 April 2011 - 01:11 PM

3. The bad news: All your frames are lacking transparency - if there is a mysterious way to have Bamworkshop accept an other color as transparent: do that.. else you'll have to recolor every single frame by hand.

BAMWorkshop II will let you set the transparency to whatever color you want. Be aware that the tool has bugs, though.


If you refer to that "Set Transparency" option in the color menu; though I did notice that and tried a few things I could come up with, that option was greyed out and un-clickable no matter what I did.
Still, its good to know that I could have saved a few hours of mind-numbing work IF I had solved that problem ;)

#12 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 14 April 2011 - 02:56 PM


3. The bad news: All your frames are lacking transparency - if there is a mysterious way to have Bamworkshop accept an other color as transparent: do that.. else you'll have to recolor every single frame by hand.

BAMWorkshop II will let you set the transparency to whatever color you want. Be aware that the tool has bugs, though.

If you refer to that "Set Transparency" option in the color menu; though I did notice that and tried a few things I could come up with, that option was greyed out and un-clickable no matter what I did.
Still, its good to know that I could have saved a few hours of mind-numbing work IF I had solved that problem ;)

No, go to Edit->Settings and change the transparent color. Now open and re-save the BAMs to modify the transparent color index in each file. The shadow color works the same way.

"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


#13 Ulb

Ulb
  • Modder
  • 373 posts

Posted 14 April 2011 - 05:41 PM

No, go to Edit->Settings and change the transparent color. Now open and re-save the BAMs to modify the transparent color index in each file. The shadow color works the same way.


Wow.. that really works.
Can you imagine how such a discovery feels after manually editing the transparency for 3 whole animations.. frame per frame, pixle per pixle :wacko:

Anyway thanks for the tip, will make any future animation port SOOOOOO much easier :)

#14 What is the Matrix?

What is the Matrix?
  • Member
  • 114 posts

Posted 24 April 2011 - 07:02 AM

No, go to Edit->Settings and change the transparent color. Now open and re-save the BAMs to modify the transparent color index in each file. The shadow color works the same way.


Wow.. that really works.
Can you imagine how such a discovery feels after manually editing the transparency for 3 whole animations.. frame per frame, pixle per pixle :wacko:

Anyway thanks for the tip, will make any future animation port SOOOOOO much easier :)


@ Ulb: Thansk Ulb! I'll try it out! As for the transparency - you can also just leave the color as it is, and display the BAM as a .VVC file, if it's an effect and not an inventory BAM. There you can set blending mode, making the BAM look half transparent. :))

@ Sam: And yes mate... BAM WorkShop II is buggy - extreeeeeeeeemly buggy! :D
Neo: Why do my eyes hurt?
Morpheus: You've never used them before.

#15 salomonkane

salomonkane
  • Member
  • 166 posts

Posted 28 February 2016 - 01:01 PM

Bam Offset Resizer/Adjuster in WYSIWYG :

 

@Miloch, @Sam, & The Gang :

 

Hey guys , I'm looking to re-sizing automatically Bam. Sprite offset (displacement circle) for some of my custom animations (vanilla & 3d pre-rendered), did you have some nifty tool to share to facilitate this task ?

 

T.Y .

 

About :

 

249292GreatOwl1.gif308966garweb.gif , 3688571928.gif

 

http://www.baldursga...tegrations.html

http://forums.blackw...?showtopic=5053


Edited by salomonkane, 28 February 2016 - 01:37 PM.

Quo Vadis ?

#16 Ulb

Ulb
  • Modder
  • 373 posts

Posted 28 February 2016 - 06:15 PM

You could ask Gwendolyne here on the forums about resizing your bams, he has done a lot of animation work/porting and might have an automated tool for that and might be willing to share.

As for moving the animation relative to the feed-back circle, you can do that with DLTCEP if memory serves.


Edited by Ulb, 28 February 2016 - 06:15 PM.


#17 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 28 February 2016 - 07:00 PM

I think BAM Resizer does everything you want.  In order to adjust the frame offsets relative to the foot circle (without resizing the frames), your syntax will look something like:

bamresize.exe --percentw 100 --percenth 100 --modxoffset -5 --modyoffset 25 filename.bam

Frames in filename.bam retain the same dimensions, but frame X-Offsets are decreased by 5, and frame Y-Offsets are increased by 25.  This essentially moves the animation 5 pixels to the right and 25 pixels up. It is not WYSIWYG (obviously), but it is a hell of a lot better than adjusting offsets manually with BAM Workshop, DLTCEP, etc. It can also SET the frame offsets for frames instead of incrementing/decrementing them. Check the documentation.


Edited by Sam., 28 February 2016 - 07:05 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


#18 Argent77

Argent77
  • Administrator
  • 1419 posts

Posted 29 February 2016 - 03:28 AM

If you need some visual feedback beforehand you can use the BAM Converter from Near Infinity. You can easily resize BAMs or manually adjust frame center coordinates with it.



#19 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 29 February 2016 - 04:00 AM

Does NI support gif -> bam conversion? The .bam converter is a really fine tool, especially where palette preservation is concerned. I have been for a long time looking for a good .gif -> bam converter that is better than the one in bamw 2.

Edited by Galactygon, 29 February 2016 - 04:01 AM.

Posted Image

#20 Argent77

Argent77
  • Administrator
  • 1419 posts

Posted 29 February 2016 - 05:06 AM

GIFs are currently not officially supported. The converter does load files of this type even though it's not listed in the file dialog yet, but only the first frame of animated GIFs are added to the frames list.

I'll look into it further. The Java documentation is unusually vague when graphics formats are coming into play. If there are ways to import animated GIFs I'll add it.