Character Tool - here we importing a character with animations, assigning a new skeleton to the skeleton list and creating some animation settings.
Generating a Solution - We generate a solution and get a little bit into visual studio, we compile the whole build.
Replacing the Characters - Replacing the character with the code and replace the character we want to play as.
- Changing the Character in a template.
- Import the FBX you already have with animations into your character root folder.
- Import the Character by, opening the character tool and just drag and drop the fbx file into the viewport of the tool.
- Adjust and test the animations in the character tool.
- Now you can either go to /animations/skeletonlist.xml and add the newly imported skeleton with, f.e:
Code: Select all
<Skeleton name="deer" file="Your File Root"/>
- Or you can go to the character tool and add the skeleton by yourself:
- Choose the CHR file and add it. Then go you your animations and create a new animsetting. Add your skeleton to it.
Now we have to generate a solution
Go to your root folder of the project and on game.cryproject or something similar and click with rmb and choose: Generate Solution.
- After the solution is generation, go into the folder, solutions and open game.sln
- Look for player.cpp
- In Player.cpp look for the line 25 and replace the
Code: Select all
m_pAnimationComponent->SetCharacterFile("DEFAULT");
To m_pAnimationComponent->SetCharacterFile("Your Root CDF File");
- Now compile the whole build by Build->"Build Solution".
- Close Visual Studio now.
- Now go to "Assets/Animations/Mannequin/Preview/Player.xml"
- Change line 4 and 5 to your character cdf.
- You can delete the other characters.
- Now let's change the animations.
- For that, open the Mannequin Editor, go to file->Open Preview and open the player.xml
- In the Fragments, go to Walk->Option 1, replace the animation on FirstPersonLayer and ThirdPersonLayer to your own walk animation
- Change it for every animation and then go to file, save all.
Soon a video version of this tutorial will be available for you guys, also on how to change the character in template and GameSDK.
Follow for more on my personal twitter
