3rd Party Models/Media Chat / My custom animated character creating workflow.

Author
Message
Ravenous
GameGuru TGC Backer
20
Years of Service
User Offline
Joined: 24th Mar 2004
Location: Spain
Posted: 17th Nov 2016 11:24
Hello everybody,

I would like to make some tests making my own characters with custom animations. I have read a lot of threads in the forum about how to achieve this and of course there are different ways . So, I would like to explain how my personal workflow would be or at least how I have thought it could be:

1.- Model the character in a modelling program (No problem with this point)

2.- Make the skeleton and the setup. --> Here I have the first question: I think that I should use the same skeleton that the GG characters have. I mean, the same number of joints and the same name for each one. I can import a skeleton of a GG character or make from scratch the same skeleton (number of joints and names) in the modelling program. -->All in this point is correct?

3.- Make the animation. --> Ok, here for example I make a looping dancing animation. For example from the frame 100 to the frame 300.

4.- Export the character with the animation. --> I use Maya for modelling and animation, ok. And I can export to FBX. My question is: in theory I could use Blender to import the FBX file and export it in .X format with the animation inside it. Apart from the problems I could have in this process, lets say that finally I have the character in .X format and the correct animation.

5.- Edit the FPE file. --> Ok, this is the point where I have more doubts. I have read that the best way is to copy an existing fpe file from another character and edit it. Ok, what exactly I must change on it? If for example I use the "Uber Soldier.fpe" I see that under ";AIAnims" label are listed the different animations each one with a name and a frame range. If I want to add my custom dancing animation called for example "dancing_loop" I should add it to the list simply with this line?:

"dancing_loop = 100,300"

I understand that if that frame range it is already used by another animation of the Uber Soldier I simply should delete it because the .X file it is going to have different animations, not the Uber Soldier ones. In fact if I only want (and the .X file only has) my custom animation, I could delete all the animation lines from the fpe and there will not be any problem. --> Correct?

6.- The last step I thought. Editing the lua script. Here I am a bit blind. How the animations in the fpe file are called from the lua script?? By name? Something like "PlayAnimation(csi_unarmedmoverun);"?? I have checked some lua scripts and I have not found this kind of animation calling. I have seen commands like "SetCharacterToRun(e)", "SetAnimationFrames(160,189)", etc. I understand that all this different commands are related with the fpe file and the animation lines inside it but I can not understand the connection.


Ok, this is my workflow plan for testing. Of course I know that I will need to make a lot of tests until I reach a truly workflow to apply it to more complex characters and behaviors but what I would to know now is if it is correct. I forgot something??

Thank you very much!!!
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 17th Nov 2016 12:00 Edited at: 17th Nov 2016 12:45
ok, i can't go into great detail at the moment because i am at work, but here's some info ..

Most of the animations are dealt with inside the script, these re the animation ranges you see listed in the LUA. However these are generally character specific, ie the ranges in the ai_soldier.lua script correspond with the default animations on all of the soldier characters and won't work if your characters animation ranges differ.

The various animations are called by the ai_soldier_state[e] = "" commands, these are partially hard coded, we can't add new ones to them, we're stuck with the ones we have (there are ways but they involve pretty much writing your own AI script and things won't be as automated as the scripts with the ai commands).

This is where the CSI_ list comes in.

The csi_ fields in the fpe are basically a list of overides for the lua scripting, each of them will make the animations you specify there run instead of the animations listed in the lua script, that is the list we have to work with, each one corresponds with a certain animation task, for example csi_relaxed1 is your primary idle animation, csi_unarmedmovefore is your unarmed walk forward.

These commands prmarily deal with character AI, you can use custom animations that correspond with the ai functions only, so you couldn't replace csi_unarmedmovefore with a dance, not unless you wanted it to dance while walking forward, and so on.

Here's a list of what we've worked out they do so far with their corresponding commands:



Note: csi_unarmedxxxxx are your unarmed animations, and csi_stoodxxxxx and csi_crouchxxxxx are your armed animations

You will notice that some of the fpe files have weapon specific lists of csi_ fields, these are for the uber soldier that has animations for all the main modern weapons, and changing their weapon in the fpe should tell the ai which set to use, however i'm not entirely sure if they actually work or not, ive never seen them do anything.

Basically changing the animation ranges in the csi_ fields will override the ranges listed inside the ai script, so if you have the same ranges as the uber soldier for example you can actually leave all these blank.

Now on to custom animations that aren't part of the csi_ range. For example your example of dancing, you will not be able to do this in an existing AI script, and you would not be able to use csi_ to do this. You would have to specify the animation ranges under then ;anim section, and then write the commands into a script.

The ;anim section will look like this:


animmax is the total number of animations you have added to this section, animX is each individual range, increase the number by 1 for each animation you add starting at 0, this number on the end is the number you need for your script, playanimineditor will make your anim0 loop without having to call it whenever there is no other animation set to run, this is great for a base idle animation, 0 is no, 1 is yes.

To animate the range listed in anim1 once then stop you would need to do the following:



if g_Entity[e]['animating'] == 0 then
--tells your script to get ready to animate.

SetAnimationFrames(e,v)
--is used to queue up the animation you have chosen ready to be played, v is the number on the end of animX.

PlayAnimation(e)
--tells the script to play the queued animation

g_Entity[e]['animating'] = 1
--tells your script to stop when it's finished the animation range.

end
-- closes the "if" loop


Now if you had 4 dance animations you could create a chain of animations, but you would need to do it in conjunction with a timer thus:


and the character would play the animations a single time each every 5 seconds in the following order 1 2 1 3 0



Alternatively instead of SetAnimationFrames(e,1) to run anim1, you could hard code your ranges into the script and forget about the ;anim portion of the fpe by putting for example: SetAnimationFrames(50,100), that would then set the range of 50 to 100 to play the next time PlayAnimation(e) is called.

That's about all i can hep you with at the moment, i'm not 100% on animation myself, i'm still learning, and i probably got some of it wrong, but as far as i know it's mostly right. Hope it helps.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 17th Nov 2016 12:29 Edited at: 17th Nov 2016 12:29
Made a few minor edits (i was typing it out too quick and missed some bits), you might want to reread it if you read it before i posted this reply.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Ravenous
GameGuru TGC Backer
20
Years of Service
User Offline
Joined: 24th Mar 2004
Location: Spain
Posted: 17th Nov 2016 13:21
Awesome! thank you very very much for your answer Belidos, I will reread it. You have put me in the way!

I will try to make some tests using this information.

Thanks again.

Rav
JackalHead
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location:
Posted: 9th Dec 2016 14:22
Bringing in custom animated characters to GG is just a pain and the devs dont seem to give a darn about us who want this feature simplified. Ive been harping about this for years and will continue to harp on the subject. Good luck.
"So let it be written; so let it be done."
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 10th Dec 2016 09:47
Quote: " Ive been harping about this for years and will continue to harp on the subject. Good luck."


Years ? You only joined in feb 2015 ..... Lets not exaggerate here .... We have been waiting for other things just as long
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Sulman
Reviewed GameGuru on Steam
8
Years of Service
User Offline
Joined: 5th Oct 2016
Playing: OUT DOOR GAMES
Posted: 10th Dec 2016 18:16
Sweet... You should share your assets with us. So we can give you good feedback. haha (just kidding) But happy to read about Character setup in gameguru. I also use Autodesk Maya and i tried so many times to import animated characters but failed. haha after reading this. Now i get it why i was failing. Thanks Belidos...
How is it Mario can smash through bricks... But he dies when he touches a turtle?
JackalHead
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location:
Posted: 12th Dec 2016 13:42 Edited at: 12th Dec 2016 14:16
Wrongo, I joined 2nd Dec 2009. I use to go by Jackal until my account got messed up with the introduction of steam. Now I go by JackalHead. Ive been here for a long, long time. I was a gold backer. Just search for user Jackal and you can hear my old rants
"So let it be written; so let it be done."
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 12th Dec 2016 14:24 Edited at: 12th Dec 2016 14:25
Quote: "Wrongo, I joined 2nd Dec 2009. I use to go by Jackal until my account got messed up with the introduction of steam. Now I go by JackalHead. Ive been here for a long, long time. I was a gold backer. Just search for user Jackal and you can hear my old rants"


I actually remember when you had the issue, it wasn't too clear about hooking up to steam and you accidentally created a new account instead of linking your old one, then something went wrong and they couldn't merge them, or something like that.

(i wasn't on the forum myself, but had gotten GameGuru from a game bundle and was quietly watching the forums before joining in)

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
JackalHead
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location:
Posted: 12th Dec 2016 15:10
Yup, never got fixed so no badges etc Oady well.
"So let it be written; so let it be done." Account got messed up with introduction to steam. I am Jackal
Joined 2nd Dec 2009.
PM

Login to post a reply

Server time is: 2024-11-22 03:03:10
Your offset time is: 2024-11-22 03:03:10