Экспорт анимации всего тела

Материал из CryWiki Russia

Перейти к: навигация, поиск

Чтобы настроить анимацию всего тела, вам понадобится папку Mods, содержащая необходимые папки и файлы для экспорта. Там должна быть папка Bin32 и папка Tools/Maxscript. Это крайне важно для правильного экспорта анимации.

Примечание:
Остальная часть документация предполагает, что у вас есть необходимых файлы и правильная структура папок, а также правильно установленный CryTools, работающий в 3ds Max.

Содержание

Экспорт анимации всего тела

Основная настройка

  • Прежде всего, необходимо добавить нужные папки — Objects и Animations — и добавлять необходимые файлы. This would be:
\Mods\Mymods\Game\Objects\Characters\Human\human_male\character.chr
\Mods\Mymods\Game\Animations\human\male\combat
\Mods\Mymods\Game\Animations\Animations.cba
  • \Mods\Mymods\Game\Objects\Characters\Human\human_male\character.chr

Файл, аналогичный использованному в моде Example/Example Assets из SDK. Он должен быть в той же папке, что CAF-файл вашей анимации.

  • \Mods\Mymods\Game\Animations\human\male\combat

В эту папку мы экспортируем нашу новую анимацию. Структура папке должна следовать оригинальной игре, поскольку должна просто заменить оригинальную анимацию всего тела.

  • \Mods\Mymods\Game\Animations\Animations.cba

Этот файл должен быть добавлен и изменён, для правильного экспорта. Возьмите оригинал из архива Animation.pak и поместите его в папку Animations вашего мода. Когда его откроете (Блокнот/WordPad), в «AnimationDefinition» также пропишите файл character.chr. Можете узнать подходящий код, открыв файл Animations.cba в папке Animations мода Examples/Example Assets. Выделите от <AnimationDefinition> до <SpecialAnimsList> и скопируйте/вставьте в файл из вашего мода.

Примечание:
Сделайте перенос на новую строку после </AnimationDefinition> определения NanoSuit и вставьте определение для нового персонажа под ним. В конце определения персонажа не нужны </SpecialAnimsList> и </AnimationDefinition>, подобно тому, как в определении NanoЫuit. Это вызовет ошибку экспорта.

  • Еще одна вещь, которую вы должны сделать в файле Animations.cba, чтобы избавиться от определения NanoSuit:
<RotatePosRoot value="L180"/>
<RotateQuatRoot value="L90"/>
<RotatePosChild value="L90"/>
<RotateQuatChild value="L90"/>

Примечание:
Если так написано в вашем файле Animation.cba, анимация всего тела будет экспортирована на 90 градусов влево. Если вы измените 180 на 90 вы всё равно получите тот же результат. Просто удалите, это не причинит ущерба.

Настройка в 3ds Max

  • Откройте файл character.max, находящийся в папке мода Example/Example Assets (\Mods\Examples\Example Assets\Objects\Characters\human_male).
  • Когда вы впервые откроете файл всё, что вы увидите, так это сетку персонажа. Всё, что нам нужно, это Biped, так что покажем и скроем некоторые детали.

Примечание:
По умолчанию в 3ds Max нет сочетаний клавиш для скрытия/показа. Вы можете изменить это, перейдя в меню настройки интерфейса с помощью элемента меню Customize → Customize User Interface и введите сочетание для него.

  • Всё, что нам нужно — Biped, so first select the Display tab in the command panel (1 — на картинке). Next select the mesh and click on [Hide Selected](2 — на картинке). Finally, click on [Unhide by Name] and you will get a new menu(3 — на картинке).
  • Collapse the second line Bip01 Pelvis Phys(1). You can then select Bip 01 and click Unhide(2). The next box will ask you if you would like to Unhide the layers of the objects, click ok.
  • You can toggle off the rest you don’t need. In Category click off Geometry and Helpers.

Настройка Biped

  • First select the Motion tab in the command panel(1). Select both feet (hold control to mutli select) and right click in the viewport. Select Set Planted Key(2), this will allow you to animate from the pelvis realistically. Finally click the Time Configuration button to set the amount of frames were going to be using(3).
  • In the Time Configuration window change End Time to 20 for this animation.
  • Select the Bip01 Pelvis and expand the Key Info section (1), we will be using the little red Set Key button(2). In the track selection section select Body Vertical(3). For demonstrations sake the animation will start and end with the same pose. In the timeline you will see at frame zero a multi colored key frame(4). Shift select the key and drag it across to frame 20. Click the timeline to deselect the copied key and grab the timeline scroll bar and drag it to frame 10(5).

Примечание:
The only way to move the pelvis is by using the Track Selections. If you click off the pelvis and try to use it again later it will not budge till you select a Track Selection. Alternatively you could right-click and select one of the three options in "Tools 2" of the quad menu.

  • Select the z axis and transform the pelvis down(1). Next set a new key with the Set Key button (little red dot). Finally select Utilities in the command panel(2).

Примечание:
When animating if you are not in the Motion tab when doing so you could witness a slow down. If you would like to view your animation you can either click-drag the scroll bar in the timeline or hit the Play Animation button.

Экспорт

  • Remove everything in the Object Export section except «character»(1). Scroll down and check «Add whole skeleton»(2). Finally click on «Export Bones» and click ok to the «Biped lower arm twist bones reparented» prompt.

Примечание:
Two things that can mess up exporting your animation at this phase is the selected amount of time frames your exporting and where the Root Path in the CryEngine2 Settings is pointing. If your Timing Export Range isn't exporting manually you should be fine. The Cryengine 2 Settings root path should be pointing to the mod folder your exporting to (C:\Program Files (x86)\Electronic Arts\Crytek\Crysis\Mods\Mymods)

  • You will then be asked to save the CAF file somewhere and to name it. Put the CAF file in the combat folder made in the beginning (\Mods\Mymods\Game\Animations\human\male\combat) and name it combat_idle_nw_01. This animation is the idle stance while not equipped with a weapon.

Примечание:
After that is done you can save the 3DS Max file out to whatever name you like and to the 3DS Max scenes folder. You don't always need to start out from the original character.max file. For example, to blend a run animation you need 3 animations that deal with starting, running, and stopping, instead of having a file for each animation you can have it in one and break up the created CAF files for the animations in the export bones by Sub-Ranges section of the exporter utility. Basically, say you have 4 types of characters, male, female, adult, and adolescent. All the animations for each type of character could be in one file and exported together in ranges then having hundreds of Max files that deal just with one part of a animation.

Настройки в Sandbox 2

  • Open the Editor with the mod running where your new animation was saved into. Click the little green guy in the top right corner for the Character Editor.
  • The animation was saved in the combat folder so open that. Look for combat_idle_nw_01 in the list. A successful full body animation export will be showing your character bending down and up.

См. также