Information about Animations & Creating them

Everything about Modding the game, from new courts to the modifications of the player & tournament bases (and including all the bugs they may be creating ! ;) )
Forum rules
Speak English in 1st page of topics, and don't hijack topics, troll, use profanities nor insults

Information about Animations & Creating them

Postby manutoo » 01 Jun 2012, 17:22

What players are the strikes inspired of :

Code: Select all
   // Sampras         =>   s0         f8         b2                     r8
   // Federer         =>   s1         f1/16      b1/3/5      bs1/3/7   r0/4/10
   // Nadal            =>   s2/10      f3/18/19   b1            bs11/14      r7         fs3
   // Nadal Fh normal=>            f2
   // Djokovic         =>   s3/15      f4/17      b1/11                  r3
   // Roddick         =>   s4/21      f5/27      b15         bs12
   // Kafelnikov      =>                     b2
   // Sharapova      =>   s5         f6         b3
   // Serena Williams=>   s6         f7         b4
   // Basic (ex-Fed) =>   s7
   // Berdych         =>   s8         f9         b5/13         bs2      r1
   // Murray         => s9         f10      b10         bs6      r2
   // Nalbandian      =>   s12      f11      b6            bs4
   // Ferrer         =>   s14      f15      b7
   // Tsonga         =>   s13      f14/20   b8/12                  r14
   // Del Potro      =>            f12      b9                     r9
   // Gonzalez         =>   s11      f13      b4            bs5      r5
   // Monfils         =>                                          r6
   // Nishikori      =>                                          r11
   // Baghdatis      =>                                          r12
   // Kohlschreiber   =>                                          r13
   // Wawrinka         =>   s17      f21/26   b6/9         bs10
   // Stosur         =>            f22
   // Wozniacki      =>            f23
   // Isner            =>   s16
   // Sabatini         =>            f24      b7            bs8
   // Haas            =>            f25      b8            bs9
   // Fabio Fognini   =>   s18
   // Florian Mayer   =>   s19
   // Marin Cilic      =>   s20

s = service, f = forehand, b = backhand (1H or 2H), bs = backhand slice, r = return stance
the number is the one used in the Outfit code after "a" ; add 1 to get the number within the "Customize Character" menu ; ie: s2 = Service 3

Gestures :

Code: Select all
   // stupid_000            => PM4
   // stupid_001            => PM2
   // stupid_002            => PM5
   // throwracquet_federer   => PM6
   // cheerfist_gasquet      => PM7
   // stupid_gaudio         => PM12
   // Nadal - Ragingfist   => PM4
   // Nadal - VictoryGreat   => PM4
   // hitracket_youzhny      => PM10
   // Gonzalez - Ragingfist=> PM14
   // Gonzalez - HitRacket   => PM14
   // Tsonga - VictoryGreat=> PM15

'PM4' means it's in PlayerMale04, so the value in the outfit code is 3.


Order of anims within the Outfit code :

1 - Service,
2 - Forehand,
3 - Backhand,
4 - SliceBH,
5 - SliceFH,
6 - ReturnWaiting,
7 - VolleyFH,
8 - VolleyBH,
9 - SmashFH,
10 - SmashBH,
11 - Idle,
12 - ThrowRacquet,
13 - HitRacquet,
14 - Stupid,
15 - Applause,
16 - RagingFist,
17 - CheerFist,
18 - CheerJump,
19 - Sorry,
20 - Victory,
21 - VictoryGreat,

If a code is missing, or is '.' (a dot) instead of a value, then for Service, Forehand, Backhand, SliceBH it's assumed to be 0, and for all other anims it's assumed to have the same value than the Forehand.
The code for anim in the Outfit code is "a" ; for example : "a 1-3-2-4" ; in this example, all anims after SliceBH will be associated to the Forehand 3 (which is #4 in the game menus) .


Creating New Anim :

1st read the Tutorial by Neeky McDeez here : http://www.managames.com/Forum/topic29-5445.php
And download the Modified .X Exporter for 3ds Max 8 if you still didn't get it : http://www.managames.com/Forum/download ... hp?id=6410 .

Then download http://www.managames.com/download.php?T ... trikes.rar ; it contains a bunch of strikes ; it'll help you to start and also show you where the sweet spot is on each strike.

You'll need them because in the official game, all strikes within the same family (ie: all 1H-FH, all 2H-FH, all 1H-BH, all 2H-BH) share the same sweet spot.
So if you create some new strikes, you should make their sweet spot (on the frame where the ball hit occurs) to match the one of the strike of the same family bundled in the .rar above.

I didn't put any serve, so for the serve, I give you manually the coordinates of the sweet spot on ball hit : x (width) = 1.05cm ; y (depth) = -1.5cm ; z (height) = 29.4cm

For the rally strikes, your sweet spot :
- x should be within +/- 0.5cm of the official strike (ideally, even within +/- 0.2cm)
- z is free, but should be somewhat same, as I usually used the most neutral height (ie: can work more or less with low ball & high ball)

For y:
All ball hits occur around 45cm in front of the player, so best Y for sweetspot on hit is around [-3.5, -0.5] ; some of the anims I provided don't have a sweetspot in that place, so don't copy them... ;)

For the service, the sweet spot coordinates should all be within +/- 0.2cm, as it's very important to determine the ball trajectory on serve.

Note : everything is scaled x10 once in the game, so 0.5cm in 3ds Max will be 5cm in the game

The racket sweet spot is near where the purple arrow is pointing on the following picture, and when you put your mouse cursor there (when nothing is selected), you'll see the coordinates shown on bottom right :
Image

Sweetspot List :

on all rally strikes : y = -3.5 / -4.5
BH-1h : x = 8.8 / 9.2 ; z = 10.5 / 10.9
BH-2h : x = 7.2 / 7.6 ; z = 9.7 / 10.1
BH-slice : x = 9.3 / 9.7 ; z = 8.6 / 9.0
FH-1h : x = -11.6 / -11.2 ; z = 12.4 / 12.8
FH-2h : x = -9.6 / -9.2 ; z = 10.8 / 11.2
FH-Slice : x = -11.6 / -11.2 ; z = 10.2 / 10.6
Serve : x = 0.85 / 1.25 ; z = 29.2 / 29.6 ; y = -1.0 / -2.0


How to create a serve to be used Online without Desync :

- Create your serve and its preparation
- Select it for your player in the Training Club
- Launch the WarmUp then exit the game
- Open "System.log" & look for a line containing : "copy the line(s) below to 'PlayerMaleXX\\Service.txt'" (XX is a number) , and copy the line(s) under to the corresponding 'PlayerMaleXX\\Service.txt
- look then for : "copy the line below to 'PlayerMaleXX\\ServiceWaiting.txt'", and copy the line under to the corresponding 'PlayerMaleXX\\ServiceWaiting.txt
- careful : if you selected the serve for both players, these lines will appear twice, but copy them only once to the .txt

Warning : once you have added these lines, the position of the hand and the racket on the 3 events (ball thrown for bouncing, ball thrown for serving, serve hit) will be fixed, and even if you change them in the anim file, the game engine will still use the values from these lines ; so if you do some changes, delete the lines, launch the game, and copy the new ones from the System.log .


Automatic Assigning of extra animations :

By default, extra animations (ie: other animations than Serve, FH, BH, Slice) will try to load their anim with the same number than the assigned Forehand. If it doesn't exist, they will then load their default anim in PlayerMale01.
You can associate an extra anim num to more than 1 Forehand, though.
To do so, add a [NameOfYourAnim].txt in the additional PlayerMaleXX you want, and put this on the 1st line :
Code: Select all
Anim: ../PlayerMaleXX/[NameOfyOurAnim].x

Example, the file "PlayerMale03/Stupid.txt" contains :
Code: Select all
Anim: ../PlayerMale04/Stupid.x

Don't forget to add the "Info:" line if this anim is a strike ; just copy the info from the original .txt file.


List of Entry Names for Animations in Tennis.ini :

Code: Select all
   AnimServe, AnimFH, AnimBH,
   AnimSliceBH, AnimSliceFH,
   AnimReturn,
   AnimVolleyFH, AnimVolleyBH,
   AnimSmashFH, AnimSmashBH,
   AnimIdle,
   AnimThrowRacquet, AnimHitRacquet, AnimStupid, AnimApplause,
   AnimRagingFist, AnimCheerFist, AnimCheerJump, AnimSorry,
   AnimVictory, AnimVictoryGreat

You can add/edit the above entries to manually select your anim style, under [Player1] (or 2, 3, 4).


Few tips to create a good anim :

- be careful of the toes, they often don't rotate with the feet, so you have to rotate them manually to make them point in the correct direction
- be careful that feet touch the ground when they're supposed to
- be careful that feet never go underground, or only by a couple of centimeters (ie: 0.1 or 0.2 units in 3ds)
- try to create as few keys as possible, but place them in strategic points : it's easier to do modifications afterward, and movement will be usually more smooth and natural
- avoid to put 2 keys in a row with 2 very different positions (except around hit, where things go very fast ;) )
- you can rotate the clavicle ; it's especially useful to increase the left hand reach on double-handed BH ; can be useful for the right hand as well
- try to avoid player movement ; he should not walk to the left, right, forward or backward ; the only footsteps he's doing should be to rotate around his center of gravity ; he can walk 1 step in direction of the ball, or a bit away of it to help to match the needed sweetspot, but you should avoid at maximum any left/right or right/left or back/forward or forward/back movement before the hit ; try to get your player in the base position at end of the strike with only rotation of the body, or the smallest body translation possible ; all of this is needed so when the player runs in-game, the strike animation doesn't perturb too much his positioning
- if to reach the -0.4 for the sweetspot on Y, you need to create footsteps forward before the hit then backward after the hit, then it might look better to let the sweetspot be around -0.1 or -0.2 and remove the footsteps

How to move the sweetspot of an already created anim ?
- click on Motion -> Biped -> Move All Mode, and enter the needed delta on X : the whole animation will be moved
- un-click Move All Mode
- after go to the 1st frame of anim, select the left foot & set its key to free, idem for the right foot, and then select the whole biped, move it back to the center, set all the keys
- then right-click on the frame number to copy all keys to the last frame of the animation (sometimes, you need to do separately the copy with the vertical biped key)
- after if the anim has few keys for the footsteps, then you'll have only to move, redo or delete 5 or 6 footstep keys, around the beginning and the end of the anim ; it often needs less than 20 minutes to get it done
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15653
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Information about Animations & Creating them

Postby manutoo » 01 Jun 2012, 17:22

How to fix shoulders rotation :

0- read everything in this tutorial before to try to do a full animation fixing
0.bis - your animation should be _final_ and ready to be released before you fix its shoulders (ie: if you change anything, it'll mess up your shoulders again & you may have to restart from the beginning)
1- try to read the tutorial in 3DS Max : "Biped - Twisty Bones" ; it's not very clear, but it explains the concept
2- set the player mesh to not be see-through when frozen ; to do so, in Display panel (on top right), unfreeze it, select it, then uncheck "Display panel -> Display Properties -> Show frozen in Gray" (and uncheck "See-Through" if it's checked), then freeze it again
3- set a checker texture on the model to see more easily the shoulder orientation (or draw a thick line in the texture, at the shoulder level)
4- when you select the "Bip01 L UpperArm" or the "Bip01 R UpperArm", you can set the "Twist Poses" in the Motion panel (top right) (Note: it's not "UpperArmTwist" , hide these links if there are still visible)
5- before to start, click on "Twist Poses -> Default" to delete any old created poses
6- select a frame where the shoulder is badly oriented
7- click on "Twist Poses -> Add", then change the "Twist" angle till the result is satisfying
8- usually, you can let bias to 0,5 but it can be useful in extreme cases
9- name your new pose LXX or RXX ; L if it's for Left shoulder, R if it's for R one, and XX from the frame number it's created for
10- repeat step 6-...-9 for all problematic frames

Ok, this is the way it should work, but in real, if you do that, the result will usually be terrible if you have more than 1 pose that needs to be corrected, and even with 1 pose, it can lead to an unending nightmare. :fear:
There are 2 reasons for that :
- Max will use the closer arm position to select the used pose ; so if at 1st, the shoulder had a good position on frame X, but you create a pose to fix frame Y, then if this new pose is closer of the position used on frame X, then the shoulder orientation also changes on frame X, not only on frame Y, and often it means the result on frame X is now bad, and it requires you to create a special pose on frame X as well ; it can go on like this till you created a pose for all frames
- but that's not all, it gets worst : Max shares the poses between the left & right shoulder ; so it means if you fix the right shoulder on Frame Y, it can mess up the left shoulder on Frame X

So in some cases, you can end creating a frame for both shoulders on all frames.
But the problem is not over. The shoulder rotation interpolation between the frames (or 2 poses) can be messy, ie: when you play the animation, you see the shoulder rotating back and forth non-stop ; to fix that, you have to find the twist angles that give the correct rotation, and likely create even more poses if you still didn't have 1 for each frame already.
So don't forget to name your poses correctly, because else quickly you won't know what is for what.

So now you have to do some tricks to get a good results :
- for all strikes except serves : try to create the least possible poses, and if the shoulders have some minor back/forth rotations, let it go and don't try to do better
- if the shoulder is wrong on only 1 frame, and creating the pose for this frame creates a problem on another frame, try to fiddle with the twist angle, it may make Max changes its mind about using it on the other frame
- for the serve, usually you'll have to create a pose on almost each frame of the right arm from the loop in the back till the hit occurs ; the good news is that usually these poses don't match poses outside that loop ; the bad news is that it's hard to get the rotation right to avoid back/forth rotation
- still on serve, usually the left shoulder gets wrong only when the hand is all up ; if you're lucky, creating the fixing pose(s) will not interfere with the right shoulder

You also have an alternative option : let me fix the shoulder for you if your animation is good enough to be bundled with the game... ;)

If you find some better way to handle the shoulder fixing, let me know, it's still a work-in-progress for me : I just found 1 of the big tricks explained above last week... :sweat:


Alternate Animation for Acceleration :

If you want to have a different animation for the acceleration (B1+B2 strike), add this line in your .txt description file :
Code: Select all
Acceleration: <NameOfTheAccelerationAnim>

For example, in Forehand.txt :
Code: Select all
Acceleration: Forehand_Acc

You can also use an existing animation from another folder ; here an example, taken from the PlayerMale04's Forehand :
Code: Select all
Acceleration: ../PlayerMale03/ForeHand
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15653
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Information about Animations & Creating them

Postby manutoo » 01 Jun 2012, 17:23

>> Reserved For Future Use <<
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15653
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Information about Animations & Creating them

Postby m4n4c0r » 01 Jun 2012, 17:32

Awesome!! Thank you!!
User avatar
m4n4c0r
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 82
Gaming Since: 26 Feb 2012, 00:26

Re: Information about Animations & Creating them

Postby SamModder » 01 Jun 2012, 19:11

can you give us an example of an outfit code for the gestures? For example for Nadal's outfit code with his own gestures
User avatar
SamModder
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 2331
Gaming Since: 21 Mar 2011, 19:28

Re: Information about Animations & Creating them

Postby manutoo » 02 Jun 2012, 03:41

SamModder,
if you want to use FH #4 , then it's just : a S-3-B-BS ; replace S with the serve you want, B with BH, BS with BH slice. The gestures in PlayerMale04 will be loaded automatically.
if you want to use another FH and use the 3 gestures in PM04, then : a S-F-B-BS-.-.-.-.-.-.-.-.-.-3-.-3-.-.-.-.-3
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15653
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Information about Animations & Creating them

Postby Lucian86 » 02 Jun 2012, 13:51

Great

Z for the serve is free or not ?

You should stick the thread to keep it at a closed sight ;)
Follow my blog: (videos and links for my tennis animations)
http://tlcanimations.blogspot.it/
User avatar
Lucian86
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 517
Gaming Since: 02 Nov 2011, 22:01

Re: Information about Animations & Creating them

Postby manutoo » 03 Jun 2012, 06:28

Lucian86,
no, it's not free, the higher the serve, the higher the bounce, which would give an advantage in-game ; so better to keep close of the given Z.

This topic is linked from the FAQ topic, hopefully, it'll be enough.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15653
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Information about Animations & Creating them

Postby Lucian86 » 03 Jun 2012, 12:20

Ok !

Could you control again all the values...I'm going to put all my animations in order so I don't want to be all useless :) Hope you're going to correct soon the backhand slice

For the other animations (volleys, smashes, ecc) did you change something about sweet spots ?
Follow my blog: (videos and links for my tennis animations)
http://tlcanimations.blogspot.it/
User avatar
Lucian86
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 517
Gaming Since: 02 Nov 2011, 22:01

Re: Information about Animations & Creating them

Postby manutoo » 04 Jun 2012, 06:03

Entries Added in 1st Post :
- Automatic Assigning of extra animations
- List of Entry Names for Animations in Tennis.ini
- Few tips to create a good anim

Lucian86,
the best way to check you have the correct X on your sweetspot is to look the corresponding animation I provided, because if you don't look the exact same point in the racket, the coordinates won't be exactly same.
I didn't touch sweetspot of volleys nor smashes or anything that I didn't announce.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15653
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Information about Animations & Creating them

Postby Lucian86 » 04 Jun 2012, 09:43

Yes but since you changed the Y value for the 2h backhand to -4 instead of -6,7 that I can see in the .max file you provided, I wanted to make sure that the other are ok
Follow my blog: (videos and links for my tennis animations)
http://tlcanimations.blogspot.it/
User avatar
Lucian86
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 517
Gaming Since: 02 Nov 2011, 22:01

Re: Information about Animations & Creating them

Postby Elias » 05 Jun 2012, 03:45

Hello,

i know it's recommended when adding a new animation, to add it in a new playermaleXX folder, or an existing one (after extracting from pak01.pak) in the right folder after the last existing animation in the same category. Though, what type of issues should we expect overwriting/replacing some existing core animations in the folder they belong to ? Just curious because i firstly tried this quick & dirty way, and depsite working perfectly offline, sometimes in online mode (with an opponent having the same modded files), my char didnt showed up on my side with the modded anim (but the core original one), when my opponent still could see the modded one.
Elias
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 300
Gaming Since: 17 Jun 2011, 05:00
Location: France

Re: Information about Animations & Creating them

Postby manutoo » 05 Jun 2012, 03:53

Elias,
when you play a network game, the game engine takes in priority the file within the pak files, in an attempt to bypass user modifications to prevent modded content to desync the game.
If you have animations replacing existing ones that lie outside of any pak, then the game will not load them when starting the network game. The trick is that they may have been already loaded before if the user watched his player in the character sheet or played a match against the CPU.
To avoid this trouble, the best way is to create a Pak03.pak that contains all your modded content (and nothing else ;) ), so the game will always be able to load your additional anims.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15653
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Information about Animations & Creating them

Postby Neeky McDeez » 05 Jun 2012, 11:12

manutoo wrote:Sweetspot List :

on all rally strikes : y = -3.5 / -4.5
BH-1h : x = 8.8 / 9.2 ; z = 10.5 / 10.9
BH-2h : x = 7.2 / 7.6 ; z = 9.7 / 10.1
BH-slice : x = 9.3 / 9.7 ; z = 8.6 / 9.0
FH-1h : x = -11.6 / -11.2 ; z = 12.4 / 12.8
FH-2h : x = -9.6 / -9.2 ; z = 10.8 / 11.2
Serve : x = 0.85 / 1.25 ; z = 29.2 / 29.6 ; y = -1.0 / -2.0


Are those values definitive ?
User avatar
Neeky McDeez
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 119
Gaming Since: 02 Jul 2009, 23:08
Location: France

Re: Information about Animations & Creating them

Postby manutoo » 06 Jun 2012, 05:02

I hope yes..! ;)

All strikes currently in the game use them, and they all more or less correspond to a hit without footstep in direction of the ball, & without rotating too much the spine.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 15653
Gaming Since: 24 Jan 2004, 15:38
Location: France

Next

Return to Modding [Courts, Players, Tour, ...]

Who is online

Users browsing this forum: AhRefs [Bot], CCBot [Bot], Dot [Bot], jmatias_schneider and 0 guests