HeroEngine Forums

HeroEngine Support => Art & Art Pipeline => Animation => Topic started by: DWS_Josh on Mar 14, 13, 02:57:08 AM

Title: Trying to Learn Animation Export/Import
Post by: DWS_Josh on Mar 14, 13, 02:57:08 AM
Hey guys,

So I have been through the Hero Wiki and have been trying to figure this out. At this point I am seeking someone who is willing to help me out. Whether they can make a video for me showing me the process start to finish for getting an animated asset into HeroEngine. Preferably from 3DS Max (adding SRB and animating it properly) and then importing it into HeroEngine. If you are unable to create a video if you have some time to meet with me on Skype and could show me there I would be highly grateful.

Do I have any takers? If so contact me either through my email (joshn@darkwingstudios.net) or on skype (josh.newman1311). I hope to hear from someone soon!
Title: Re: Trying to Learn Animation Export/Import
Post by: PN-Dwight on Mar 14, 13, 03:50:27 AM
Animated Asset or Animated Character?
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on Mar 14, 13, 01:04:53 PM
Sorry animated Characters not assets. Probably would help if I specified that correctly.
Title: Re: Trying to Learn Animation Export/Import
Post by: davidcass on Mar 16, 13, 07:49:32 PM
hello, what you requested is time consuming, but with animation i found it easy to download mocaps ( motion capture files ) once you have you character with its biped bone system the skinned it , you can animate it in max. simply import the mocaps to the biped. you can manipulate other sub animations into them.
thanks dave
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on Mar 17, 13, 09:03:34 PM
I am well aware of how to animate, that isn't what I am trying to figure out. I am trying to find out how to get those animations from Max into HeroEngine. I have followed the Wiki a few times, but for some reason I am not getting something and it's not working.
Title: Re: Trying to Learn Animation Export/Import
Post by: PN-Dwight on Mar 18, 13, 03:32:06 AM
You did setup all the necessary files, and let a technical artist write the character controller files? That is probably the hardest part on your setup, and it all depends on how you wrote your character controller.
Title: Re: Trying to Learn Animation Export/Import
Post by: HE-BENNETT on Mar 18, 13, 11:13:49 AM
DWS_Josh, try to be a little more descriptive.  What isn't working?  Where is the process failing? Are you getting any errors? Are you able to see the character in HeroBlade?

If you've got each animation exported as a separate .hgm, with an animation sequence (.asq) file for each one, and all the sequences listed in the Animationset.dat, and you are able to see the character in engine, but the animations don't play (super-run-on-sentence) Then Dwight is probably right, the issue lies with the Animation Agent Script (.aas) file.  That is where you tell the engine what animations should be playing based on the various inputs set by the ACCC (Advanced Customizable Character Controller).

If none of that helps, give us some more information and we can probably help more effectively ;)
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on Mar 18, 13, 12:05:45 PM
Okay so here is my process, which I am not sure I am even really doing this in the right order:

Rig Character and animate character.

I open the Hero Character Tools and setup the Character name, Set HE Root Path, Set Character Root Path, Set Character Type.

Create the SRB at 0,0,0 under the root bone (Pelvis).

I lock the rotation axis on the SRB because for some reason if I don't the SRB spins around during the animation.

Then I create Character Files.

I hide everything except the mesh

And then I am not sure if I am suppose to select Static Character, or Animation (VDA or CME) in the Export Mode. And then not entirely sure what files become created that I need to import into HE.

This is where I am struggling. And maybe its because I am trying to do all of this after a long day of work so I am missing something important in the wiki, but it doesn't seem to really explain some parts.
Title: Re: Trying to Learn Animation Export/Import
Post by: HE-BENNETT on Mar 18, 13, 12:35:44 PM
Perhaps you've missed the more useful wiki pages, these should contain most of the information:

http://wiki.heroengine.com/wiki/Static_Characters
http://wiki.heroengine.com/wiki/Animating_Characters_Tutorial

The SRB will follow the motion of the Bip01 bone it is attached to unless the relevant channel is locked.  It spins around because thats what it is supposed to do :P  but you've done the right thing by locking it when you don't want that behavior.

Once you've created the character files and want to do the animations, you need to export each animation sequence or loop as an individual animation .hgm file using the VDA animation setting in the export window.

All of this is pretty extensively explained in the pages I've listed, just read everything and walk through step by step, you'll figure it out :)
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on Mar 18, 13, 09:37:42 PM
Thanks Bennett. Glad to know I was doing most everything correctly. I just must be missing something while going through them, so I will go at it again once I am more rested.
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on May 09, 13, 11:32:20 PM
Okay, so been trying this again. How would I create an asq and a dat file? The tutorial doesn't really explain it, it simply says to create one. I am assuming this is somewhere within HE?

And then the final question. When the files are exported from 3DS Max/Maya, where in the Repository should they go? Is there a specific folder or do I create my own and just make sure the asq/dat file is pointed to the  right folder?

Those tutorials are great, but it does leave a lot of gaps for those of us that aren't really experienced.
Title: Re: Trying to Learn Animation Export/Import
Post by: uexilon on May 10, 13, 03:16:34 AM
http://hewiki.heroengine.com/wiki/.asq (http://hewiki.heroengine.com/wiki/.asq)
http://hewiki.heroengine.com/wiki/Character_Spec (http://hewiki.heroengine.com/wiki/Character_Spec)

I thought the Character Tool also creates those two files, maybe I'm wrong. However, it is really easy to set them up with Editor/Wordpad or something like this.

Character files need to be placed in the Character folder (You should create a Subfolder for each Character). Characters with dynamic switchable parts, facegen and so on need to be placed in the Character/dynamic_2/ folder.

Using the Hero Engine Character Tool that comes together with the ArtPipeline is the best way to go. Just set the Character Path either to the Folder Character or dynamic_2 depending on what kind of Character you would like to create (like mentioned above). Clicking on create Characterfiles gives you the correct folder structure and the needed files (you need to create more and edit some files on your own to add more Animations, Parts, etc.). I export the whole Character at Frame 0 (means the skeleton and all the parts - only one part + skeleton unhidden, then the next part). You can either have all Animations in one file and "slide" the Animation "time range" inside of Max ( don't know about maya), or you can create a file for each animation. When it comes to exporting animations, simply go to the export tool, hit .vda and export it to the Animation folder the Character Tool created for you. Editing the ANIMATIONSET.dat and creating a new asq for this animation is the final step before uploading.

Hope this helpes
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on May 10, 13, 04:03:00 PM
This does sort of answer the question for me. So when I am in 3DS Max in the Character Tools script, I set the Character path and that is suppose to set up the path that the engine will use to look for the animations? And what exactly do you mean by create the asq in wordpad/editor? If I did it in wordpad would I just save it as a .txt and then upload it to the repository some where? Or which editor in the engine would I use? Those wiki's you linked are great for explaining what those things are, but it doesn't tell how or where to create them. I get that an asq is what defines the animation itself, but where would I go (step 1) in order to create one. (same with the animationset.dat file)

I really appreciate all the help you guys are giving me, and hopefully I can get this figured out soon. Maybe it's because I am not a programmer or something but there just seems to be info missing/gaps in explanations on certain parts of the process.
Title: Re: Trying to Learn Animation Export/Import
Post by: uexilon on May 10, 13, 07:43:56 PM
Well... you would save it as a .asq fileafterall :)

When you save it, just select "all files" and then type  NAME.asq   or ANIMATIONSET.dat or NAME.aas

Those files are stored in the simplest text format, they just have a different file extension ;)

The HeroEngine Art Tutorial Sample Files at your account download page may help you. This zip file contains a dynamic character with the complete folder structure. You could also download the sample_character from your HeroEngine World to your local Repository and then dive into those files.

If you still have problems afterwards I'll write a short explanation of all those things. But first I need a little rest. It's 02:43 here ;)
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on May 11, 13, 12:50:07 AM
I see, that makes a bit more sense now. The only other question I really have left is about where to put it in the Repository. Would it go in the models sub folder, or is there a specific folder that it needs to be in that already exists?
Title: Re: Trying to Learn Animation Export/Import
Post by: uexilon on May 11, 13, 04:29:08 AM
Static Character -> Use Hero Charactertool and set the Character path to ../HE/Charcter
After Characterfiles creation you get the folder "Your Charactername" with two subfolders: animation and maps. All .asq an animation .hgm files need to be placed in the animation folder, aswell as the yourcharacter.aas and the ANIMATIONSET.dat.  The yourcharactername.dat is placed in the "your Charactername" folder togethter with the skeleton.hgm file.

A yourcharactername.dat file could look like this:

Code: [Select]
Version=2
[PARTS]
  Model=yourcharactername.hgm
  AnimationSetFolder=\Character\yourcharactername\animation\
  Agent=\Character\yourcharactername\animation\yourcharactername.aas
  Behavior=PlayerCharacter2
  Gender=Male
  TextureLODSpeed=.2

As you can see, you could also place the animation files somewhere else or use the same animation files for different characters.

In the Animation subfolder the ANIMATIONSET.dat is a list with the names of all .asq files in the folder.

Code: [Select]
!
!Basic AnimationSet.dat with a tempalte idle sequence listed
Version=1
[SEQUENCES]
  idle
  walk
  run
  die
  ...

The .asq files themself contain information about the animation itself.
Code: [Select]
!
! Animation Sequence Spec
! template Sequence generated by Max or Maya output
Version=1
[ABILITIES]
  Apply Animation
    .Animation=idle.hgm
    .InitialSpeed=1
    .InitialLoop=true
    .InitialAlign=true

Most thing you can write in here (see http://hewiki.heroengine.com/wiki/.asq (http://hewiki.heroengine.com/wiki/.asq)) can also be done inside HeroEngine after uploading the character files. You can blend between Animations, use multiple (different) Animations for the same event and so on. Just open the Animation tool inside HE and open the ANIMATIONSET.dat of your Character. There you can create new sequences (asq - Animation Sequence) and do all the stuff you want :)

Dynamic Character -> Use Hero Charactertool and set the Character path to ../HE/Charcter/dynamic_2
After Characterfiles creation you get the folder "Your Charactername" with three subfolders: animation, maps, parts. All .asq an animation .hgm files need to be placed in the animation folder, aswell as the yourcharacter.aas and the ANIMATIONSET.dat.  The yourcharactername.dat is placed in the "your Charactername" folder togethter with the skeleton.hgm file. The dynamic Character needs some more files. The following two files are placed in the same folder as the skeleton.hgm file:

yourcharactername.dyc
Code: [Select]
Version=1
[SETTINGS]
  Skeleton=yourcharactername_skeleton.hgm
  PartsSpec=yourcharactername.par

yourcharactername.par (something like this.. http://hewiki.heroengine.com/wiki/.par (http://hewiki.heroengine.com/wiki/.par))
Code: [Select]
! bang to comment line
! Human Parts definition file
!
[Root]
Character\Dynamic\Human\Female\

[Slots]
!
! The slots are the areas defined for the Human in which various parts can go
!
Hair Base
   Keyword=name:Base;type:hair;hasIncludes:no;path:hair;order:1;
Hair Bangs
   Keyword=name:Bangs;type:hair;hasIncludes:no;path:hair;order:2;
   % onif(Hair Base)
   % LODoff(6)
Helmet
   Keyword=name:Hat/Helmet;main:headwear;type:clothing;
   % hides(Hat)
Head
Torso
Left Arm
Right Arm
Waist
Left Leg
Right Leg

[Divisions]
Hair: Hair Base,Hair Bangs
Head: Head,Helmet
Upper Body: Torso,Left Arm,Right Arm
Lower Body: Waist,Left Leg,Right Leg

[Parts]
!
! Slot: Part, Mesh file
!
Hair Base: Empty,empty
Hair Base: Bowl,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_bowl.hgm
   % hides(Hair Bangs)
Hair Base: Medium,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_medium.hgm
   % hides(Hair Bangs)
Hair Base: Mop,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_mop.hgm
   % hides(Hair Bangs)
Hair Base: Wiry,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_wiry.hgm
   % substitutes(Hair Bangs:Parted Long,empty)
Hair Base: Bobbed,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_bobbed.hgm
Hair Base: Flip,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_flip.hgm
Hair Base: Cropped,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_cropped.hgm
Hair Base: Long,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_long.hgm
Hair Base: Short,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_short.hgm
Hair Base: Spiked,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_spiked.hgm
Hair Base: Cornrows,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_cornrows.hgm
   % substitutes(Hair Bangs:Parted Long,empty)
Hair Base: Wavy,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_wavy.hgm
Hair Base: Half Tied,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_halftied.hgm
Hair Base: Tied Up,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_tiedup.hgm
Hair Base: Double Tied,Character\Dynamic\Human\Shared_Geometry\Hair\hairbase_doubletied.hgm

Hair Bangs: Empty,empty
Hair Bangs: Curved,Character\Dynamic\Human\Shared_Geometry\Hair\hairbangs_curved.hgm
Hair Bangs: Parted,Character\Dynamic\Human\Shared_Geometry\Hair\hairbangs_parted.hgm
Hair Bangs: Parted Long,Character\Dynamic\Human\Shared_Geometry\Hair\hairbangs_parted_long.hgm
Hair Bangs: Split,Character\Dynamic\Human\Shared_Geometry\Hair\hairbangs_split.hgm

Helmet: Empty,empty
Helmet: Round Dome,Character\Dynamic\Human\Shared_Geometry\Helmet\helmet_round_dome.hgm
   % hides(Hair Bangs)
   % substitutes(Hair Base:Wiry,Cropped)
   % substitutes(Hair Base:Short,Cropped)
   % substitutes(Hair Base:Mop,Cropped)
   % substitutes(Hair Base:Spiked,Cropped)
   % substitutes(Hair Base:Bobbed,Cropped)
   % substitutes(Hair Base:Medium,Cropped)
   % substitutes(Hair Base:Flip,Cropped)
   % substitutes(Hair Base:Wavy,Cropped)
   % substitutes(Hair Base:Half Tied,Cropped)
   % substitutes(Hair Base:Bowl,Cropped)

Head: FaceGen,head_whole_facegen.hgm

Torso: Bare,torso_bare.hgm
   Keyword=default

Upper Right Arm: Bare,arm_ur_bare.hgm

Lower Right Arm: Bare,arm_lr_bare.hgm
   % LODSubstitutes(3,LoResBare)
Lower Right Arm: LoResBare(alternate),arm_lr_bare_lowres.hgm
   Keyword=lores

Waist: Pants,legs_pants_default.hgm
   Keyword=default

Lower Right Leg: Bare,leg_lr_bare.hgm
  Keyword=footwear

Lower Left Leg: Bare,leg_ll_bare.hgm
  Keyword=footwear

[Banks]
female_base_upper_body
female_base_lower_body
hair
female_head

Note: Copied from the wiki and cleaned out the <span style="background-color: navy; color: white; " />  no clue why this is in there

All mesh .hgm part files need to be placed in the parts folder. For instance head.hgm, torso.hgm, legs.hgm, feet.hgm, hands.hgm

About the part files: It dependes on your gamespecific implementation how many different parts and subparts dynamic Characters (most likely Playercharacter) have.
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on May 11, 13, 12:26:28 PM
Yeah i read all of that in the wiki, still doesn't answer my question though. I know where to put the hgm files, I get the hierarchy for that.

What I am trying to figure out is where in the repository do I put the asq and the dat files if I were to create them in wordpad? Or where within HeroEngine would I create these if I chose not to use wordpad. If I use wordpad do I simply put them in the same folder in the Repository that I put the model in? or is there a specific folder they go in?
Title: Re: Trying to Learn Animation Export/Import
Post by: uexilon on May 11, 13, 02:05:21 PM
Now I'm confused.

That's just what I wrote in the previous post...

Your local repo folder ../ArtDepot/HE is basicly the same as the HE folder of your World repository.

So when you place the character files in the ../HE/Character/YourCharacter on your local hdd it's just the same on the Server.


I don't know how I could explain it any better.

You are now in the HE folder. Now you open the subfolder Character. Here should a folder called "yourcharactername" be placed. Inside of this folder:

All .asq and animation .hgm files need to be placed in the animation folder, aswell as the yourcharacter.aas and the ANIMATIONSET.dat.  The yourcharactername.dat is placed in the "your Charactername" folder togethter with the skeleton.hgm file.

And so on. That's just what I wrote above.. I think I'm more confused then you right now :S
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on May 14, 13, 04:32:43 PM
Thanks, you mentioned what I was trying to figure out in the second to last paragraph there. I understand the hierarchy between the root folder on my comp and the repo. What was continuously missing from the explanations people kept giving was where exactly the asq and dat file was suppose to be. But now I know it goes into the animation folder with everything else. Maybe I skipped over it in your other posts but I don't remember you mentioning that the asq and dat files go into the animations folder with the animations themselves.
Title: Re: Trying to Learn Animation Export/Import
Post by: uexilon on May 14, 13, 05:36:51 PM
Well.. doesn't matter. Even if I have to write it a thousand times, as long as you got it now that all doesn't matter :)
I know very well, that the Hero Engine sometimes gives you some headache.. Though the solution is in almost every case rather easy ;)

Well, as long as it's okay now I'm happy. If you run into other problems don't mind to ask  8)
Title: Re: Trying to Learn Animation Export/Import
Post by: DWS_Josh on May 15, 13, 09:41:41 PM
Thank you for all your help.