Jump to content


Photo

Beginner questions to animation and paperdoll


  • Please log in to reply
28 replies to this topic

#1 jastey

jastey
  • Administrator
  • 3218 posts

Posted 13 April 2013 - 02:51 AM

What I would like to have is:

 

-the DOG_MOON animation increased in size (as big as possible before it gets pixelated)

 

-this animation combined with a paperdoll for party members (e.g. the existing wolf paperdoll)

 

I have absolutely no experience with how animations work, what files I need, how the coloring is handled (although this is of no importance for this question, I still would like to understand how it is organized), and how the paperdoll is connected to the animation. Would someone be so kind to explain / point me to a tutorial / a mod that I could use as an example study?

 

Thank you very much in advance.



#2 Ulb

Ulb
  • Modder
  • 373 posts

Posted 13 April 2013 - 04:37 AM

Heya,

 

if you didn't have anything to do with animations yet, this guide Import BGII animations to IWDII is probably worth a look. While it is meant for people porting from BG2 to IWD2 instead of the other way around, it still gives you an idea of how animation.bams are handled within BG2. (Furthermore, BG2 also has IWD animation style slots (e.g: xxxA1, ...), which I personally find easier to handle than the BG2 style slots, thought that's probably unimportant to you, if you just want to resize an existing animation.)

 

You should also browse the tutorial index, there are few more tutorials on .bams, thought mostly about paper doll/description bams, those could still be useful to you.

 

Now for the resizing, there is a tool called BAM resizer, which I guess you can find here. (I just googled it, use this link on your own risk, or just google it yourself. :P)

 

I did use that program back when I ported the D2 animations, thought if memory serves me, the output quality was sometimes a bit lacking. (Trying different resolutions settings might yield better results.)

 

So, once you have resized them, you'll probably still have to fix some glitches and remove some artifacts from the .bam files.

 

For that. should take a look at BamWorkshop and BamWorkshopII, with those, you can essentially edit your .bam's frames like you could edit a .bmp with paint.

 

(This is useful if you want to remove pixels and fragments from your files, just be careful, save/reload often and keep a few backup copies, as especially BamWorkshopII isn't the most stable program and can easily screw up your saved .bam files..)

 

Other useful programs for .bam editing include: NearInfinity (mainly for browsing and exporting), DLTCEP (if you need to edit the palette, change the position of a frame or the whole .bam and or reassign frames within sequences, use this instead of BamWorkshopII !) BAM Batcher (haven't used that one, but looks like it could be very useful. Also, if BAM resizer fails you, BAM Batcher might be the easiest way to batch export your animation bam's frames to .bmp files, resize them with an image manipulation program of your choice, and re-import them.) (Note: this is probably as much fun as it sounds..  :P )

 

As for the paper doll, this is simply a matter of what kind of animation slot you pick from IA.

(You can check out this section on different animation slots [scroll down a bit and you'll find a list of all available types of animation slots], should be pretty helpful. :))

 

You can either use that wolf paper doll or create a new one. (By the time you've resized your animation, creating a new paper doll from some 2d images shouldn't be a problem for you anymore... :D)

 

I hope this was at least somewhat helpful and wish you the best of luck with your resizing-project. ;)



#3 Ulb

Ulb
  • Modder
  • 373 posts

Posted 13 April 2013 - 05:29 AM

OK, I just realized you might actually look for a more basic approach, since you've never had anything to do with animations. :P

 

So here is a basic rundown on how animations for BG2 work.

 

An animation (slot) consists of (multiple) .bam files which share the same name tag.

Those .bam files contain a number of frames, which are sorted in different sequences.

 

As an example, let's look at the Bear_Giant_D2 animation.

 

The animation uses an IWD2 style slot and consists of a number of files which look like this:

 

µdkA1.bam

 

Now, the 'µdk' is that animation's 'handle' or name. All of it's .bam files will start with that tag.

The 'A1' part tells what kind of single animation the .bam file contains (e.g.: attacking, casting, walking, …), in the case of A1, it is an attack animation.

 

(Note: BG2 style animations work basically the same, but their .bam files contain more animations and sequences and are therefore a bit more complicated to handle, e.g.: XXXG2.bam might contain attacking, walking and sleeping animations.)

 

If you open the µdka1.bam (with BamWorkshop2 or DLTCEP) you will find that the file contains multiple Frames, which are nothing more than images, as well as a few sequences.

(The frames are assigned to the sequences, thought in theory one frame can be assigned to multiple sequences or multiple times to a single sequence.)

 

The sequences 'tell' which direction the animation is facing. E.g.: Every sequence contains the whole animation for a single direction. (Usually an animation has 8 directions, thought character animations have more.

 

The directions are (0 – 1 – 2 – 3 – 4 – 5 – 6 – 7) = (N – NW – W – SW – S – SE – E – NE))

 

((Note: In BG2 the IWD animations always have an xxE.bam complementing them (E.g.: A1.bam and A1E.bam), if I remember correctly - shame on me for not being sure about that anymore :P - this has something to do with IWD animations missing the east-faced animations and BG2 mirroring them with those files. In that case, the original .bam (e.g.: A1.bam) could only contain 4 animations. HOWEVER, if you have a full (usually 8 directions=sequences) A1.bam you can simply copy it and rename it to A1E.bam, so this isn't a big deal.)

Also, if you use an BG2 style slot, which I guess your moon_dog is, this shouldn't concern you at all.)

 

So, to sum it up, the basic animation looks like this.

 

Animation Slot = Name

Bam Files = NameXX.bam

Sequences = Sequqnce0 to SequenceN

Frames = Frame0 to FrameN

 

Hope this gives you a general idea of how animations work. :)



#4 jastey

jastey
  • Administrator
  • 3218 posts

Posted 13 April 2013 - 06:05 AM

It does! Thank you very much for the detailed explanation. This gives me a lot to work with.



#5 Ulb

Ulb
  • Modder
  • 373 posts

Posted 13 April 2013 - 07:30 AM

You are welcome. :)



#6 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 14 April 2013 - 03:43 AM

Just a few other precisions : the moondog uses the dog animation (MDOG) with a special palette.

This animation belongs to the BG1 Simple Monster format.

All the actions are gathered in two files : MDOGG1 and MDOGG2 (+ MDOGG1E and MDOGG2E).

 

 

- The western directions (S, S-O, O, N-O, N) are in the files G1 and G2.

- The eastern ones (N-E, E, S-E) in G1E and G2E.

 

Here is the content of the different sequences (cycles) of each file :

 

>> File xxxxG1 : 48 sequences of basic actions :

 

- Seq. 0 à 4 : Walk.

- Seq. 8 à 12 : Stand before Combat.

- Seq. 16 à 20 : Stand Still.

- Seq. 24 à 28 : Get Hurt.

- Seq. 32 à 36 : Die.

- Seq. 40 à 44 : Twitch.

 

 

>> File xxxxG1E : 48 sequences of basic actions :

 

- Seq. 5 à 7 : Walk.

- Seq. 13 à 15 : Stand before Combat.

- Seq. 21 à 23 : Stand Still.

- Seq. 29 à 31 : Get Hurt.

- Seq. 37 à 39 : Die.

- Seq. 45 à 47 : Twitch.

 

 

 

>> File xxxxG2 : 24 sequences of Attacks :

 

- Seq. 0 à 4 : Attack 1.

- Seq. 8 à 12 : Attack 2.

- Seq. 16 à 20 : Attack 3.

 

 

>> File xxxxG2 : 24 sequences of Attacks :

 

- Seq. 5 à 7 : Attack1.

- Seq. 13 à 15 : Attack2.

- Seq. 21 à 23 : Attack3.

 

 

And a more graphical summary :

tutosm10.png

 

with Fichiers = Files and Séquences = Sequences

 

 

Anyway, the frames of the MDOG files are very small and, from my experience, I warn you that it will be very difficult to enlarge them without pixellisation.


Edited by Gwendolyne, 14 April 2013 - 12:43 PM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#7 jastey

jastey
  • Administrator
  • 3218 posts

Posted 14 April 2013 - 05:10 AM

Thank you very much, Gwendolyne!

 

Not to make your effort for naught, but what animation would you suggest for a very tall grey-ish dog?



#8 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 14 April 2013 - 12:39 PM

First you should try one of those : 0x7f0a GREATCAT_PANTHER and 0x7f0b GREATCAT_LEOPARD.

 

Or even the wolves : from 0x7b00 (WOLF) to 0x7b06 (WOLF_SHADOW)

 

But unfortunately they are not grey-ish !   :whistling:      

 

You can also have a look here.

I have not yet decided if I will port them or not.


Edited by Gwendolyne, 14 April 2013 - 12:42 PM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#9 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 15 April 2013 - 04:29 PM

You should have a look at the new BG2 Fixpack : the version 10 fixes a bug of the moon dog animation.

 

Let me know if you are interrested with the porting of one of the jaguars and tigers animation above. I could have a look and add it to my Todo list. :)


CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#10 jastey

jastey
  • Administrator
  • 3218 posts

Posted 16 April 2013 - 08:15 AM

Thank you for the link(s) and the offer. It is really a dog, though, so I think he would be offended if I'd give him a tiger or jaguar animation. :) On your linked animations above are some that look like a wolf, though(?).

 

As I said, I'd need a (big) grey/white dog (+ paperdoll). In case there is no better one, I will try an enlarged DOG_MOON animation (and combine it with the wolf paperdoll). EDIT: Oh, I see now that the DOG_MOON has a glowing effect - I wouldn't want that. Is there a way to stop the glowing, making it a normal grey dog? (The fix of the animation is really cool, btw, thank you for pointing that out!)


Edited by jastey, 16 April 2013 - 08:17 AM.


#11 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 16 April 2013 - 08:55 AM

Colors and visual effects are usually defined by opcode effects which are applied to the creature, and from a quick look this is also the case for the moon dog (it's actually applied to an invisible ring the dog is wearing). So you could freely choose the creature animation you like and apply the desired color later on. I'd suggest effect #51 (Strong/Dark by RGB) if you want to apply a darker color and effects #8 or #52 for brighter colors.
 


Edited by Argent77, 16 April 2013 - 09:00 AM.


#12 jastey

jastey
  • Administrator
  • 3218 posts

Posted 16 April 2013 - 10:25 AM

This might explain why I did not notice the glowing effect on my cre, as it didn't have the ring, obviously. So, no problem there. Thank you for the suggestions!



#13 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 16 April 2013 - 04:47 PM

Thank you for the link(s) and the offer. It is really a dog, though, so I think he would be offended if I'd give him a tiger or jaguar animation. :) On your linked animations above are some that look like a wolf, though(?).

 

As I said, I'd need a (big) grey/white dog (+ paperdoll). In case there is no better one, I will try an enlarged DOG_MOON animation (and combine it with the wolf paperdoll). EDIT: Oh, I see now that the DOG_MOON has a glowing effect - I wouldn't want that. Is there a way to stop the glowing, making it a normal grey dog? (The fix of the animation is really cool, btw, thank you for pointing that out!)

 

It may sound strange but when I get tired of working on my hundreds of maps, I like creating a brand new animation ! I feel like being on holidays ! :)

 

btw, the Arcanum wolves exist in 4 versions (black, white, brown and grey) : the picture I sent represented the black one that was needed. I did not checked the exact %, but I shoud say that it is 33-40 % taller than the dog animation.

The grey wolf is the first attached files.

 

I also give you a gre-ish palette (MDOG_MO.bmp): just paste it into your override folder (it shoudn't overwrite anything) and test it : I don't know if it will suit your wishes (in fact, maybe there is no chance...), but as we say in French, "if you never try ...".

 

 

Attached Files


CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#14 jastey

jastey
  • Administrator
  • 3218 posts

Posted 17 April 2013 - 10:47 AM

Thank you for your help! I feel a bit dumb, but is the attached the full animation? How would I make it usable in the game for my NPC?



#15 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 17 April 2013 - 11:17 AM

The first file is just one of the frames of the grey wolf : just tell me if you are interested and I will add it to my list of animations to port.

 

The second one is a grey-ish palette file for the moon dog animation : all you need to do is copying it into your override folder. Then each time you will use the moon dog animation, the creature will use this palette instead of the vanilla one. Just create a new creature with the moon dog animation (don't forget to remove the MDOG1 ring to avoid the glowing effect) or summon the moon dog : and check if that kind of palette suits your needs.

 

If it does not, then simply delete the file. IE will use the original one in the biff file.

If it does, either you keep it but it will also affect the vanilla moon dog, or use it to create a brand new dog animation. If you don't know how, I could PM you the way to do it very quicky. :)


CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#16 jastey

jastey
  • Administrator
  • 3218 posts

Posted 17 April 2013 - 12:05 PM

Ah, thank you very much! I will have a look at it and let you know.



#17 jastey

jastey
  • Administrator
  • 3218 posts

Posted 17 April 2013 - 12:32 PM

The palette defines the colors of the animation? I like the colors of your mdog_mo.bmp! But yours overrides the fix of the fixpack, is it possible to have it both (now that I know the original animation was pixelated I see it in the game)?

 

The grey wolf looks very nice, and if you say it is 30% bigger it would be about the size I had in mind. I am scared it will look too much like a wolf, though, so I don't dare asking you to import it (plus my mod is not nearly finished yet) not to give you all the work with the risk of me not using it. Is the black animation of it available for me to look at it in the game (I could judge the wolfiness-appearance better)?

 

Thank you for your efforts, btw!



#18 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 17 April 2013 - 07:51 PM

The palette defines the colors of the animation?

 

Yes !
For a few creatures (spiders, wolves, dogs, dragons), IE uses the same .bam files as "basic" movements. But for each species, it applies a different palette. For exemple, the red dragon animations are listed in MDR1___ files. But when you create a blue dragon, IE uses the MDR1 bam files and apply them a different palette : MDR1_BL1 to MDR1_BL5. The green dragon uses MDR1_GR1 to MDR1_GR5 files...

 

 

 I like the colors of your mdog_mo.bmp! But yours overrides the fix of the fixpack, is it possible to have it both (now that I know the original animation was pixelated I see it in the game)?

 

Yes, it is possible.

In fact, the solution is to create a brand new animation using the MDOG.bam files and applying it the MDOG_MO.bmp file as a palette. Then, all we need to do is assigning it a new slot with I.A.
But it  presupposes that I.A. might be a prerequiste for your mod !
That's what I did with mine as I add more than a hundred of new animations ! But that should not be a big deal as almost everybody use mega-installs by now (thanks to the BWP).

 

 

The grey wolf looks very nice, and if you say it is 30% bigger it would be about the size I had in mind. I am scared it will look too much like a wolf, though, so I don't dare asking you to import it (plus my mod is not nearly finished yet) not to give you all the work with the risk of me not using it. Is the black animation of it available for me to look at it in the game (I could judge the wolfiness-appearance better)?

 

For the moment, I am exchanging help with a french modder who is creating a brand new mod in the Maztica jungles. For that, he creates new maps with 3D max. As I am not very skilled with that part of modding, we made a deal : he produces a few maps for my mod and I create brand new animations to inhabit his background. Tigers, jaguars, wolves... are part of this project, but as a rather low level of priority.
But since you said that you are not in a hurry, I will port the wolves this week end, so you will check if you can use them. Don't worry if it's not the case, I won't waste my time. At least, the job will be done for him !

 

 

Thank you for your efforts, btw!

 

 De rien : You are welcome ! ;)
 


Edited by Gwendolyne, 17 April 2013 - 07:54 PM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.


#19 --jastey--

--jastey--
  • Guest

Posted 17 April 2013 - 10:32 PM

That sounds fantastic! Thank you in advance!

 

I have to admit I didn't understand how the fixpack fix for the DOG_MOON animation works - why is it one bmp only, like your palette? I am confused.

Also: If I used the fixed DOG_MOON animation to export a new one - would the fix be included in the exported one (this question origins from my confusion about the fix being one bmp only and might be answered with the above question)?



#20 Gwendolyne

Gwendolyne
  • Administrator
  • 1016 posts

Posted 18 April 2013 - 04:31 AM

I guess you want to enlarge the MDOG files.

 

Here is a screen showing the Moon Dog enlarged (+ 30 %) with Bamresize. As you can see, it pixellises a bit...

 

If you want to try to enlarge the animation, you don't need to apply the palette. Just open it with DLTCEP, Save it As (bmp option). Then open the bmp files in your Gimp, Photoshop, Paint... and enlarge them.

But after that, you will need to re-build the .bam files. If you have not done it before, it is a really great job.

I can help you doing it but if you want to save time, try to enlarge the frames first : if you like the result, it will be time to re-built the animation files.

 

An other way is to apply the MDOG_MO palette to the MDOGG1(E) and G2(E) files and "save them as".

Just load the MDOGG1.bam file. Then Palette > Load Palette (choose MDOG_MO.bmp). You will see that the dog is now grey.

Then extract the frames and enlarge them.

 

 

I had a brief look at the Fixpack.tp2 and it seems that they just modified the bmp file. But I didn't check all the lines...

Just another precision : my MDOG_MO.bmp file comes from a brand new animation and therefore is not the same as the Fixpack one. I tried both of them and I must say that I prefer the Fixpack one...


CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.