<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.crymod.net/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wiki.crymod.net/index.php?feed=atom&amp;target=Sodiet&amp;title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F%3AContributions%2FSodiet</id>
		<title>CryWiki Russia - Вклад участника [ru]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.crymod.net/index.php?feed=atom&amp;target=Sodiet&amp;title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F%3AContributions%2FSodiet"/>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Contributions/Sodiet"/>
		<updated>2026-08-06T16:03:57Z</updated>
		<subtitle>Материал из CryWiki Russia</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A0%D1%83%D0%BA%D0%BE%D0%B2%D0%BE%D0%B4%D1%81%D1%82%D0%B2%D0%BE_%D0%BF%D0%BE_%D0%B3%D1%80%D0%B0%D1%84%D1%83_%D0%B0%D0%BD%D0%B8%D0%BC%D0%B0%D1%86%D0%B8%D0%B9/%D0%94%D1%80%D1%83%D0%B3%D0%B8%D0%B5_%D1%81%D0%BE%D0%B2%D0%B5%D1%82%D1%8B_%D0%B8_%C2%AB%D0%BF%D0%BE%D0%B4%D0%B2%D0%BE%D0%B4%D0%BD%D1%8B%D0%B5_%D0%BA%D0%B0%D0%BC%D0%BD%D0%B8%C2%BB</id>
		<title>Руководство по графу анимаций/Другие советы и «подводные камни»</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A0%D1%83%D0%BA%D0%BE%D0%B2%D0%BE%D0%B4%D1%81%D1%82%D0%B2%D0%BE_%D0%BF%D0%BE_%D0%B3%D1%80%D0%B0%D1%84%D1%83_%D0%B0%D0%BD%D0%B8%D0%BC%D0%B0%D1%86%D0%B8%D0%B9/%D0%94%D1%80%D1%83%D0%B3%D0%B8%D0%B5_%D1%81%D0%BE%D0%B2%D0%B5%D1%82%D1%8B_%D0%B8_%C2%AB%D0%BF%D0%BE%D0%B4%D0%B2%D0%BE%D0%B4%D0%BD%D1%8B%D0%B5_%D0%BA%D0%B0%D0%BC%D0%BD%D0%B8%C2%BB"/>
				<updated>2013-07-26T08:45:29Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В процессе перевода|дата=26.07.2013|прим=Переводит Sodiet}}&lt;br /&gt;
=== Other tips &amp;amp; pitfalls===&lt;br /&gt;
''' Which animation graph an Entity is to use is specified at entity level. It is specified in '''.lua files in &amp;quot;GameScriptsEntities&amp;quot;*. &lt;br /&gt;
* Normally, having separate nodes for 'walk' and 'run' is not recommended if you are using LMGs (Locomotion Manager Groups).&lt;br /&gt;
''' All range-based criteria have a '''hysteresis* behavior. In other words, even if there is some overlapping in a range, the current state is always favoured. &lt;br /&gt;
''' To avoid having to input Action, Item and Stance values all the time manually in 'State Query', you can use the ''''preselection' system'''. You can have a '''_preselections.xml associated with an AG, *.xml and describe there your pre-selections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=xml&amp;gt;&amp;lt;verbatim&amp;gt;&amp;lt;PreselectionLists Filename=&amp;quot;AnimationsGraphsfullbody.xml&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Preselection Type=&amp;quot;Basics&amp;quot; name=&amp;quot;IdleHealthy&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Selection Input=&amp;quot;Action&amp;quot; value=&amp;quot;idle&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;Selection Input=&amp;quot;Health&amp;quot; value=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;Selection Input=&amp;quot;Item&amp;quot; value=&amp;quot;pistol&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;Selection Input=&amp;quot;Signal&amp;quot; value=&amp;quot;none&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;Selection Input=&amp;quot;Stance&amp;quot; value=&amp;quot;nav&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;Selection Input=&amp;quot;Vehicle&amp;quot; value=&amp;quot;none&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;Selection Input=&amp;quot;waterLevel&amp;quot; value=&amp;quot;5.0&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;Selection Input=&amp;quot;Wound&amp;quot; value=&amp;quot;none&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/Preselection&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/PreselectionLists&amp;gt;&amp;lt;/verbatim&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The combination of a null node and a forcefollow link* is useful to &amp;quot;trick&amp;quot; the state selection. For example, you may want an animation to begin to be loop-played when some input combination is given, but it remains in that state until one of just two inputs in the combination is changed. In other words, changing other inputs in the combination does not stop the animation. &lt;br /&gt;
&lt;br /&gt;
'''Guarded input:''' It is a safeguard for the case that you want to make sure a specific input is not ignored.  The animation graph has the need to always come up with a state that matches the inputs as closely as possible. If the code sets the inputs and no state matches, it will start ignoring inputs with a lower priority. It's important to note that it absolutely cannot ignore guarded inputs.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:CryEngine_AGT_OtherTipsPitfalls_agtutor4_guarded_input.png]]&lt;br /&gt;
&lt;br /&gt;
'''Structure property''' : All states with the same structure will be time/phase-aligned when blending. So, in case of walk and run blending, the correct portion of the cycle will be blended in.&lt;br /&gt;
&lt;br /&gt;
[[Image:CryEngine_AGT_OtherTipsPitfalls_agtutor4_structure_prop.png]] &lt;br /&gt;
 &lt;br /&gt;
Which animation graph to use is specified in the entity level. So it is specified in .lua files in &amp;quot;GameScriptsEntities&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some extra properties don't work in the states with no animiation. The problem is, as you can see in AGSetInput.cpp, the real job of the 'CSetInput' is done in CAGSetInputNode::EnteredState(). But for states with no animation, they never reaches the entered state. So If you want the 'SetInput' to work in those states, you can move the job performed in CAGSetInputNode::EnteredState() to CryEngine_CAGSetInputNode::EnterState(). For example, the 'CAGSound' class was actually implemented as such. &lt;br /&gt;
AttachmentEffect: You can see available particle effects in DataBase View. It should be a full path to a specific effect. For example, &amp;quot;explosions.rocket.cliff&amp;quot;. It has a structure of 'libraryname dot itemname dot effectname'.&lt;br /&gt;
If you use InStateUntil=&amp;quot;0.98&amp;quot;* in the animation graph template, then that state will not be left until the animtion proceeds to the 98% of the whole period. And that template must use LoopAnimation=&amp;quot;0&amp;quot;. In other words, looping is not compatible with that.&lt;br /&gt;
&lt;br /&gt;
[[category:Official:Animation Graph Tutorials]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/CryEngine_3_Free_SDK:Cookbook</id>
		<title>CryEngine 3 Free SDK:Cookbook</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/CryEngine_3_Free_SDK:Cookbook"/>
				<updated>2013-07-14T13:36:12Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: Добавлен перевод 4 главы &amp;quot;Настройки окружающей среды&amp;quot; от Viktor.XBB&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''&amp;lt;span style=&amp;quot;font-size:larger&amp;quot;&amp;gt;Перевод от любителей. Остальные главы появятся в течение года&amp;amp;nbsp;:)&amp;lt;/span&amp;gt;'''''&lt;br /&gt;
&lt;br /&gt;
*[http://vk.com/doc-41076090_132699575?hash=b9b20ae922fbd6c117 Глава 1] &amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;- &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;'''Стартовые настройки'''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[http://vk.com/doc-41076090_132699783?hash=2903e0c8c77197d973 Глава 2] - &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;'''Основы&amp;amp;nbsp;'''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[http://vk.com/doc-41076090_132699804?hash=9438bbe80dbc43ca5c Глава 3] - &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;'''Создание базового уровня&amp;amp;nbsp;'''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[http://docviewer.yandex.ru/?c=51e2a86d7770&amp;amp;url=ya-disk-public%3A%2F%2F9mEfg%2FbA3xzJNSUHX5jgI4vbz9gtkA5LznWWyVOQ8Uk%3D&amp;amp;name=%D0%93%D0%BB%D0%B0%D0%B2%D0%B0%204%20%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0%20%D0%BE%D0%BA%D1%80%D1%83%D0%B6%D0%B0%D1%8E%D1%89%D0%B5%D0%B9%20%D1%81%D1%80%D0%B5%D0%B4%D1%8B.pdf Глава 4]&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;&amp;amp;nbsp;- &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;'''Настройки окружающей среды'''&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[[Глава 5|Глава 5]]&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[http://vk.com/doc-41076090_132699821?hash=510c755f26769aab6f Глава 6]&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;&amp;amp;nbsp;-&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;'''Создание актива&amp;amp;nbsp;'''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[[Глава 7|Глава 7]]&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[http://vk.com/doc-41076090_132699847?hash=9350e078c8b74c0a3f Глава 8]&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;&amp;amp;nbsp;- &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;'''Создание транспорта'''&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[http://vk.com/doc-41076090_132700184?hash=fe83bed5448dfd3ff8 Глава 9] - &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ffffff&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;'''Потоковый граф и примеры'''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[[Глава 10|Глава 10]]&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[[Глава 11|Глава 11]]&amp;lt;/span&amp;gt;&lt;br /&gt;
*&amp;lt;span style=&amp;quot;color: rgb(0, 0, 0);  font-family: 'Lucida Grande', Arial, tahoma, verdana, sans-serif;  line-height: 18px&amp;quot;&amp;gt;[[Глава 12|Глава 12]]&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B</id>
		<title>Хрупкие объекты</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B"/>
				<updated>2013-03-30T15:25:39Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Хрупкие объекты ==&lt;br /&gt;
&lt;br /&gt;
Хрупкие объекты содержат отдельные части соединённые в одной модели сочленениями.&lt;br /&gt;
Каждая часть может быть отделена физической силой (пулями, взаимодействием с игроком, взрывами) превосходящей ограничения сочленения.&lt;br /&gt;
В основном, хрупкие объекты размещаются в Sandbox как браши (кисти).&lt;br /&gt;
Наилучшим примером хрупких объектов являются дорожные знаки или деревянные заборы.&lt;br /&gt;
&lt;br /&gt;
=== Файл-пример ===&lt;br /&gt;
Файл-пример: [[Media:Breakable example.rar|Хрупкие объекты]]&lt;br /&gt;
&lt;br /&gt;
=== Основные настройки в 3D-приложении ===&lt;br /&gt;
&lt;br /&gt;
* Объекты должны иметь несколько узлов и каждый должен иметь свою собственную физику.&lt;br /&gt;
* Узлы соединены сочленениями (каждое сочленение может быть соединено с 2 частями).&lt;br /&gt;
* Порядок наименования сочленений: '''$joint01''', '''$joint02''', и т. д.&lt;br /&gt;
* Сочленения в 3D-приложении представляют собой вспомогательные объекты (дамми, пустышки). Они должны пересекать физическую прокси одного или максимум двух геометрических объектов.&lt;br /&gt;
* Z-ориентация точки опоры сочленения должна быть направлена наверх (см. раздел «Отладка»).&lt;br /&gt;
* Помимо этого, можно явно указать название части в названии сочленения используя такой формат: '''$joint1_part1_part2'''. Это полезно в сложных узлах, где геометрия пересекает более чем две части.&lt;br /&gt;
* Когда сочленение объекта пересекает только один узел, создаёт сочленение между объектом и миром.&lt;br /&gt;
* Размер дамми-объекта '''никак не влияет''' на силу воздействия.&lt;br /&gt;
* Это, однако, используется при повторном приклеплении сочленений к хрупким частями, если некая геометрия также имеет процедурные разрушения (а именно: когда часть процедурно разрушена, все сочленения, которые прикреплены к ней, проверяются на пересечение с вновь образованными частями, и повторно прикрепляет к ним, если это необходимо).&lt;br /&gt;
* Сила и масса сочленения отдельно определяются в свойствах узла (в каждом 3D-приложении называются по-разному; в 3ds Max: '''Objects Properties''' '''[''Свойства объекта'']''').&lt;br /&gt;
* Определённые ограничения сочленения относятся к нормалям сочленения, представленным вспомогательным узлов оси Z. Для сочленений, в которых имена частей определены явно, необходимо соблюдать осторожность с точками нормалей в перво части (иначе ограничения '''push''' и '''pull''' сменять значения).&lt;br /&gt;
* При экспорте отключите «Merge All Nodes».&lt;br /&gt;
* Объекты размещаются как браши или геометрические сущности ('''Brush'''\'''GeomEntity''').&lt;br /&gt;
&lt;br /&gt;
* пример размещения пустышки (Dummy):&lt;br /&gt;
[[Файл:PrebrokenObject_dummyplacement.jpg]]&lt;br /&gt;
&lt;br /&gt;
* пример свойств сочленения (joint):&lt;br /&gt;
[[Файл:PrebrokenObject_objectproperties.jpg]]&lt;br /&gt;
&lt;br /&gt;
Каждый раз, когда внешние силы (коллизия других объектов или попадание пули) воздействуют на объект, система просчитывает внутренние силы, удерживающие части объекта вместе, и если какие-то силы превышают этот порог, то соответствующие сочленения удаляются. Затем связанные части через удаление сочленений заново рассчитанные и изолированные переносятся к новой сущности.&lt;br /&gt;
&lt;br /&gt;
==== Свойства узлов ====&lt;br /&gt;
Узлам необходимы свойства присоединения (зависят от программного обеспечения) для корректной работы в движке.&lt;br /&gt;
&lt;br /&gt;
;entity (свойства рендера):Если настройки рендера геометрии включают в себя «entity», то объект не исчезнет после отсоединения от главного объекта.&lt;br /&gt;
&lt;br /&gt;
;box (свойства рендера):Если настройки рендера геометрии включают в себя «box», то движок будет использовать упрощенный куб (основанный на ограничивающем кубе физического прокси объекта) как коллизию геометрии. Это помогает увеличить скорость просчета физики.&lt;br /&gt;
&lt;br /&gt;
;mass=VALUE (свойства рендера): Масса определяет вес объекта, основываясь на том, что значение параметра, равное нулю, делает объект неподвижным. Это используется, к примеру, при создании основания дома или одинокого столба, который должен оставаться на определенном месте. Когда используются кисти (&amp;quot;brush&amp;quot;) или Геометрические Сущности (&amp;quot;Geom Entities&amp;quot;), масса остается постоянной. При использовании обычных Сущностей (&amp;quot;Entities&amp;quot;), все части массово масштабируются так, что их общая масса равна массе, указанной в параметрах Сущности.&lt;br /&gt;
&lt;br /&gt;
{{Предупреждение|Вы должны указать массу или плотность, дабы быть уверенным в корректно симуляции физики.}}&lt;br /&gt;
&lt;br /&gt;
;density=VALUE: Движок автоматически рассчитывает массу для объекта, основываясь на плотности и ограничивающем кубе. Значение может использоваться как альтернатива параметру &amp;quot;Масса&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
;limit=VALUE (Свойство шарнира у объекта): Лимит - это основное значение для нескольких различных видов сил, приложенных к соединению. Содержит комбинации значений, приведенных далее. Внимание! Это значение необходимо задать, иначе симуляция физики будет работать некорректно. Пример значений из &amp;quot;Crysis&amp;quot;: 100-500 - можно разрушить снарядом; 10000 - разрушается при столкновении с движущейся машиной или большим взрывом.&lt;br /&gt;
&lt;br /&gt;
Следующие значение являются дополнительными и нужны для уточнения настроек параметра &amp;quot;Лимит&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
;bend=VALUE (Свойство шарнира у объекта) : Максимальный крутящий момент вокруг оси перпендикулярно нормали.&lt;br /&gt;
&lt;br /&gt;
;twist=VALUE (Свойство шарнира у объекта): Максимальный крутящий момент вокруг нормали.&lt;br /&gt;
&lt;br /&gt;
;pull=VALUE (Свойство шарнира у объекта): Максимальная сила, применимая к шарниру первого объекта против нормали шарнира (части &amp;quot;стягиваются&amp;quot;, как реакция на натяжение внешними силами).&lt;br /&gt;
&lt;br /&gt;
;push=VALUE (Свойство шарнира у объекта): Максимальная сила, применимая к шарниру первого объекта (то есть первый, чье имя первое в списке шарниров, или оно не указано, шарнир объекта вращается вокруг оси Z) вдоль нормали шарнира; нормаль шарнира - ось Z шарнира. Части &amp;quot;пружинят&amp;quot; (как реакция на внешние силы, сжимающие части). Эта ось должна быть направлена внутрь первого объекта.&lt;br /&gt;
&lt;br /&gt;
;shift=VALU (Свойство шарнира у объекта): Максимальная сила в направлении, перпендикулярном нормали.&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Дополнение|Шарниры также поддерживают не полностью жесткие ограничители (&amp;quot;non-fully-figid constraints&amp;quot;). Полностью жесткие ограничители станут динамическими, если их объект скручивают, после превышения лимита объект &amp;quot;ломается&amp;quot; и параметр &amp;quot;constrant_limit&amp;quot; приравнивается к нулю.}}&lt;br /&gt;
&lt;br /&gt;
Broken «bends» will become «socket» constraints, and «twists» will become hinges. The newly created dynamic constraint will inherit pull and shift limits from the joint. The constraint’s frame will be that of the joint’s helper in max. In order to preserve the meaning of «twisting», however, the axes will be swapped (z of the joint’s helper will become the constraint’s x&amp;amp;nbsp;— since both represent the «twising» axis, x will become y, and y wil become z). Thus, for hinges, z asis of the helper should be directed along the desired hinge direction. For socket’s, z axis should be the axis the attached part «bends around».&lt;br /&gt;
&lt;br /&gt;
Here is the list of related properties:&lt;br /&gt;
&lt;br /&gt;
;constraint_limit=VALUE (Joint object property):Force limit for the newly created constraint, is checked when the constraint hits a rotation limit and is being pushed further&lt;br /&gt;
&lt;br /&gt;
;constraint_minang=VALUE (Joint object property)&lt;br /&gt;
;constraint_maxang=VALUE (Joint object property):Rotation limits for the constraint (the interpretation is the same as in standalone constraints). The default is no limits&lt;br /&gt;
&lt;br /&gt;
;constraint_damping=VALUE (Joint object property):Angular damping (default 0)&lt;br /&gt;
&lt;br /&gt;
;constraint_collides=VALUE (Joint object property):Whether the constraint parts will ignore collisions with each other (default 1)&lt;br /&gt;
&lt;br /&gt;
For example, to quickly create an unbreakable hinge constraint, one should put this into the joint’s properties: twist = 0 (the constraint will created at the first activation, regardless of force) constraint_limit = 1E20 (just something big enough) Примечание that the general «limit = xx» is not required, since we want the limits other than twist to remain unbreakable. Also note that the nodes that have dynamic constraints between them should always be physicalized as entities (not particles).&lt;br /&gt;
&lt;br /&gt;
==== Dissolving into particlespieces ====&lt;br /&gt;
&lt;br /&gt;
Jointed Objects can be set up to break in smaller pieces when being detached from the joint. i.e. a wooden sheet breaks into several planks. The object properties must contain the information about the pieces used. i.e. «pieces=$blah1», «pieces=$rock1». Several objects can share the same name, but it is also possible to set up the pieces with different names, i.e. «pieces=$blah1,$blah2». Pieces need to be linked to the object they should replace later on. NOTE: make sure the names of the objects you want to use as pieces are in lower case only i.e. $debris or $piece1. Debris would not work.&lt;br /&gt;
&lt;br /&gt;
WARNING Be aware that the search function in the code also returns nodes with only partially matching strings. If you have problems with pieces spawning out of nowhere or existing nodes being cloned for no reason, look into the name strings and change them to avoid this issue.&lt;br /&gt;
&lt;br /&gt;
If you don’t specify anything in the piece properties, they will be spawned as particles, which means they will have no collision and will disappear after a few seconds. If you want the pieces to behave like actual physicalized objects, you have to add «entity» into their properties box.&lt;br /&gt;
&lt;br /&gt;
* Sample setup:&lt;br /&gt;
[[Файл:PrebrokenObject_pieces.jpg]]&lt;br /&gt;
&lt;br /&gt;
Practical examples of how pieces can be used:&lt;br /&gt;
&lt;br /&gt;
===== Optimization =====&lt;br /&gt;
If you create a dummy object with a nodraw material (like a simple cube) and spawn it as a piece, the jointed object will simply disappear once the joint breaks&amp;amp;nbsp;— it will be replaced by an invisible object. This can be helpful since the piece that is broken off will not fall down and interact with the remaining pieces, potentially causing problems, and it is also beneficial performance-wise. Once the original object is seperated from its joint, no further physics calculations will be necessary.&lt;br /&gt;
&lt;br /&gt;
===== Adding dynamic detail =====&lt;br /&gt;
Pieces replace their original object once this object is «broken off» (seperated from it’s joint), so you can take the original object and cut it up into smaller pieces. An example of this is the huts in crysis, most roof panels have two sub-pieces that spawn once the panel breaks off. This results in more detailed breaking and smaller debris. Don’t forget to add «entity» and a realistic mass to the piece properties, and make sure the piece is physicalized, or else the pieces will fall through the ground and/or disappear after a few seconds. (in case they are only small «fluff» pieces, this might actually be intended)&lt;br /&gt;
&lt;br /&gt;
===== Adding static detail =====&lt;br /&gt;
You can also spawn small debris pieces, that, instead of falling down, stay where they appear (for example steel cables sticking out of a concrete wall). To do this, you have to add the following lines to the properties of the piece:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
entity&lt;br /&gt;
mass=0&lt;br /&gt;
density=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Entity because you want the object to stay where it is once it is spawned, and because you want it to be physicalized. The object needs to be physicalized (i.e. contain polygons with a physicalized material) in order for this to work. Mass and density need to be 0 to assign the objects infinite mass, which results in the object staying where it spawns and not reacting to force. If it wasn’t 0, it would fall down upon spawning.&lt;br /&gt;
&lt;br /&gt;
==== Level of detail settings ====&lt;br /&gt;
LodCreation per object can easily be added by naming them $lod1; $lod2, $lod3… and linking them to the relevant subobjects. In order to make differentiation easier, a postfix can be added; i.e. «$lod1_wooden plank»&lt;br /&gt;
&lt;br /&gt;
==== Occlusion Proxy ====&lt;br /&gt;
An OcclusionProxy can be added by naming it $occlusion and linking it to the relevant jointed object; like a big sheet of metal on a metal fence or a wooden wall on a hut. Occlusion proxy is allowed to have open edges and need to be as low as possible (something around 2-10 polys).&lt;br /&gt;
&lt;br /&gt;
==== Instancing within breakable objects ====&lt;br /&gt;
[[Instancing objects]] is used to optimize render time by reducing drawcalls and memory consumption. The engine automatically detects identical geometry elements within the exported objects. There is no special setup needed to take advantage of this feature. UVs and relative point position to the pivot need to be identical in objects in order to qualify them for instancing.&lt;br /&gt;
&lt;br /&gt;
==== Linking Objects to simplify export ====&lt;br /&gt;
Linked objects don’t need to be exported, just the Root node needs to be added to the exporter list. All child nodes will automatically be exported. The name and pivot will be derived from the root joint.&lt;br /&gt;
&lt;br /&gt;
* Example of linking objects and joints for simpler export:&lt;br /&gt;
[[Файл:PrebrokenObject_NamingAndHierarchy.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Setup in Sandbox ===&lt;br /&gt;
Add the object as a brush or a GeomEntity. In case of a brush, the engine will detext automatically that the object is breakable. For multiplayer where breaking objects has a massive impact on the data transfer, breakability is automatically disabled (might change later)&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
* p_debug_joints 1 shows the default debug mode for joints (see picture below); p_draw_helpers needs to be activated&lt;br /&gt;
* CAUTION Never scale a joint If you need a new size, create a new joint. the scaling value will be passed on to the engine and causes wrong results in the simulation.&lt;br /&gt;
* The «spikes» on the joint objects show the orientation. For limits to properly reflect their names (i.e. pull, twist, etc), the spikes must be directed along the «natural» joints axes. However, it’s also possible to keep them always pointing up, for consistency.&lt;br /&gt;
* The blue colored numbers show the mass of the single pieces. Примечание the «0.00kg» this is the mass of the top node&amp;amp;nbsp;— in this case a dummy.&lt;br /&gt;
* Joints linked to the world are displayed red.&lt;br /&gt;
* When a force is applied to a joint, the direction is shown (in this case shift and bend), together with the strength and the limit of the particular joint. Green text represents an impact with an impulse much lower then the joint limit. Yellow represents values closer to the joint limit. Red represents values which were higher than the limit&amp;amp;nbsp;— in this case the joint is broken.&lt;br /&gt;
* NOTE: the debug mode is handy to see how the impulse of weapons react with the breakable object. set the general limit first and then fine tune the specific limits by setting them explicitly for shift, bend…&lt;br /&gt;
&lt;br /&gt;
* Example of debug display:&lt;br /&gt;
[[Файл:PrebrokenObject_sign_example.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Категория:Официальная документация:Создание ресурсов:Основы]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B</id>
		<title>Хрупкие объекты</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B"/>
				<updated>2012-06-26T09:17:02Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;&amp;lt;span class=&amp;quot;fck_mw_template&amp;quot;&amp;gt;{{В_процессе_перевода}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt; Хрупкие объекты &amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Хрупкие объекты содержат отдельные части соединённые в одной модели сочленениями.&amp;lt;br /&amp;gt;Каждая часть может быть отделена физической силой (пулями, взаимодействием с игроком, взрывами) превосходящей ограничения сочленения.&amp;lt;br /&amp;gt;В основном, хрупкие объекты размещаются в Sandbox как браши (кисти).&amp;lt;br /&amp;gt;Наилучшим примером хрупких объектов являются дорожные знаки или деревянные заборы.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt; Файл-пример&amp;lt;br /&amp;gt; &amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Файл-пример: &amp;lt;a href=&amp;quot;http://wiki.crymod.com/images/5/5b/Breakable_example.max&amp;quot;&amp;gt;Breakable-Example&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt; Основные настройки в 3D-приложении&amp;lt;br /&amp;gt; &amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Объекты должны иметь несколько узлов и каждый должен иметь свою собственную физику.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Узлы соединены сочленениями (каждое сочленение может быть соединено с 2 частями).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Порядок наименования сочленений: &amp;lt;b&amp;gt;$joint01&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;$joint02&amp;lt;/b&amp;gt;, и т.д.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Сочленения в 3D-приложении представляют собой вспомогательные объекты (дамми, пустышки). Они должны пересекать физическую прокси одного или максимум двух геометрических объектов.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Z-ориентация точки опоры сочленения должна быть направлена наверха (см. раздел «Отладка»).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Помимо этого, можно явно указать название части в названии сочленения используя такой формат: &amp;lt;b&amp;gt;$joint1_part1_part2&amp;lt;/b&amp;gt;. &amp;lt;span id=&amp;quot;result_box&amp;quot; lang=&amp;quot;ru&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;Это полезно&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;в&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;сложных&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;узлах, где&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;геометрия&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;перескает&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;более чем&amp;lt;/span&amp;gt; две &amp;lt;span class=&amp;quot;hps&amp;quot;&amp;gt;части.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Когда сочленение объекта пересекает только один узел, создаёт сочленение между объектом и миром.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Размер дамми-объекта &amp;lt;b&amp;gt;никак не влияет&amp;lt;/b&amp;gt; на силу воздействия.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Это, однако, используется при повторном приклеплении сочленений к хрупким частями, если некая геометрия также имеет процедурные разрушения (а именно: когда часть процедурно разрушена, все сочленения, которые прикреплены к ней, проверяются на пересечение с вновь образованными частями, и повторно прикрепляет к ним, если это необходимо).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Сила и масса сочленения отдельно определяются в свойствах узла (в каждом 3D-приложении называются по-разному; в 3ds Max: &amp;lt;b&amp;gt;Objects Properties&amp;lt;/b&amp;gt; &amp;lt;b&amp;gt;[&amp;lt;i&amp;gt;Свойства объекта&amp;lt;/i&amp;gt;]&amp;lt;/b&amp;gt;).&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Определённые ограничения сочленения относятся к нормалям сочленения, представленным вспомогательным узлов оси Z. For joints that specify part names explicitly, care must be taken that the normal points into the 1st parts (otherwise push and pull limits will switch meanings)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;При экспорте отключите «Merge All Nodes»&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Объекты размещаются как браши или геометрические сущности (Brush\geom. Entity)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;пример размещения пустышки(Dummy&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;img src=&amp;quot;/images/7/7f/PrebrokenObject_dummyplacement.jpg&amp;quot; _fck_mw_filename=&amp;quot;PrebrokenObject dummyplacement.jpg&amp;quot; alt=&amp;quot;RTENOTITLE&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;пример свойств сочленения (joint) &lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;img src=&amp;quot;/images/8/85/PrebrokenObject_objectproperties.jpg&amp;quot; _fck_mw_filename=&amp;quot;PrebrokenObject objectproperties.jpg&amp;quot; alt=&amp;quot;RTENOTITLE&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Каждый раз, когда внешние силы (коллизия других объектов или попадание пули) воздействуют на объект, система просчитывает внутренние силы, удерживающие части объекта вместе, и если какие-то силы превышают этот порог, то соответствующие сочленения удаляются. Затем связанные части через удаление сочленений заново рассчитанные и изолированные переносятся к новой сущности.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt; Свойства узлов(Node)  &amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Узлам необходимы свойства присоединения (зависят от программного обеспечения) для корректной работы в движке.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;сущность (render geometry property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Если настройки рендера геометрии включают в себя «entity», то объект не исчезнет после отсоединения от главного объекта.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;куб (render geometry property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Если настройки рендера геометрии включают в себя «box», то движок будет использовать упрощенный куб (основанный на ограничивающем кубе физического прокси объекта) как коллизию геометрии. Это помогает увеличить скорость просчета физики.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;mass=VALUE (render geometry property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Mass defines the weight of an object based on real world physics mass=0 sets the object to «unmovable». This is used on the basement of a house for example or the sign pole which should not be movable and always stay in the original position. When used in brushes and Geom Entities, this is the final part’s mass. When used in regular Entities, all parts masses are scaled so that their total mass gives the mass specified in the entity properties.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;CAUTION* You must either define this value or density to ensure the simulation is working correctly.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;density=VALUE&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The engine automatically calculates the mass for an object based on the density and the bounding box of an object. Can be used alternatively to mass.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;limit=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;limit is a general value for several different kind of forces applied to the joint. It contains a combination of the values below. CAUTION This value needs to be defined, otherwise the simulation will not work correctly. Crysis Example values: 100—500 can be broken by a bullet; 10000 can be broken by the impact of a driving vehicle or a big explosion.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;The following values are optional and are used to fine tune the «limit» settings.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;bend=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;maximum torque around an axis perpendicular to the normal.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;twist=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;maximum torque around the normal&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;pull=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;maximum force applied to the joint’s 1st object against the joint normal (the parts are «pulled together» as a reaction to external forces pulling them apart)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;push=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;maximum force applied to the joint’s 1st object (i.e. the one whose name is listed first in the joint’s name, or if the names were not specified, the object the joint’s z axis points towards) along the joint normal; joint normal is the joint’s z axis, so for this value to actually be «push apart» (as a reaction to external forces pressing the parts together), this axis must be directed inside the 1st object&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;shift=VALU (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;maximum force in the direction perpendicular to normal&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Addition: joints also support non-fully-rigid (non-6dof) constraints. A full rigid constraint will become a dynamic constraint if its either bend and twist limit gets broken and the joint has a non-0 «constrant_limit» property.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Broken «bends» will become «socket» constraints, and «twists» will become hinges. The newly created dynamic constraint will inherit pull and shift limits from the joint. The constraint’s frame will be that of the joint’s helper in max. In order to preserve the meaning of «twisting», however, the axes will be swapped (z of the joint’s helper will become the constraint’s x&amp;amp;nbsp;— since both represent the «twising» axis, x will become y, and y wil become z). Thus, for hinges, z asis of the helper should be directed along the desired hinge direction. For socket’s, z axis should be the axis the attached part «bends around».&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Here is the list of related properties:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;constraint_limit=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Force limit for the newly created constraint, is checked when the constraint hits a rotation limit and is being pushed further&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;constraint_minang=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;constraint_maxang=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Rotation limits for the constraint (the interpretation is the same as in standalone constraints). The default is no limits&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;constraint_damping=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Angular damping (default 0)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;constraint_collides=VALUE (Joint object property)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Whether the constraint parts will ignore collisions with each other (default 1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;For example, to quickly create an unbreakable hinge constraint, one should put this into the joint’s properties: twist = 0 (the constraint will created at the first activation, regardless of force) constraint_limit = 1E20 (just something big enough) Note that the general «limit = xx» is not required, since we want the limits other than twist to remain unbreakable. Also note that the nodes that have dynamic constraints between them should always be physicalized as entities (not particles).&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt; Dissolving into particlespieces &amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Jointed Objects can be set up to break in smaller pieces when being detached from the joint. i.e. a wooden sheet breaks into several planks. The object properties must contain the information about the pieces used. i.e. «pieces=$blah1», «pieces=$rock1». Several objects can share the same name, but it is also possible to set up the pieces with different names, i.e. «pieces=$blah1,$blah2». Pieces need to be linked to the object they should replace later on. NOTE: make sure the names of the objects you want to use as pieces are in lower case only i.e. $debris or $piece1. Debris would not work.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;WARNING Be aware that the search function in the code also returns nodes with only partially matching strings. If you have problems with pieces spawning out of nowhere or existing nodes being cloned for no reason, look into the name strings and change them to avoid this issue.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;If you don’t specify anything in the piece properties, they will be spawned as particles, which means they will have no collision and will disappear after a few seconds. If you want the pieces to behave like actual physicalized objects, you have to add «entity» into their properties box.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Sample setup&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;img src=&amp;quot;/images/d/dd/PrebrokenObject_pieces.jpg&amp;quot; _fck_mw_filename=&amp;quot;PrebrokenObject pieces.jpg&amp;quot; alt=&amp;quot;RTENOTITLE&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Practical examples of how pieces can be used:&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;— Optimization: If you create a dummy object with a nodraw material (like a simple cube) and spawn it as a piece, the jointed object will simply disappear once the joint breaks&amp;amp;nbsp;— it will be replaced by an invisible object. This can be helpful since the piece that is broken off will not fall down and interact with the remaining pieces, potentially causing problems, and it is also beneficial performance-wise. Once the original object is seperated from its joint, no further physics calculations will be necessary.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;— Adding dynamic detail: Pieces replace their original object once this object is «broken off» (seperated from it’s joint), so you can take the original object and cut it up into smaller pieces. An example of this is the huts in crysis, most roof panels have two sub-pieces that spawn once the panel breaks off. This results in more detailed breaking and smaller debris. Don’t forget to add «entity» and a realistic mass to the piece properties, and make sure the piece is physicalized, or else the pieces will fall through the ground and/or disappear after a few seconds. (in case they are only small «fluff» pieces, this might actually be intended)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;— Adding static detail: You can also spawn small debris pieces, that, instead of falling down, stay where they appear (for example steel cables sticking out of a concrete wall). To do this, you have to add the following lines to the properties of the piece:&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;entity mass=0 density=0&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Entity because you want the object to stay where it is once it is spawned, and because you want it to be physicalized. The object needs to be physicalized (i.e. contain polygons with a physicalized material) in order for this to work. Mass and density need to be 0 to assign the objects infinite mass, which results in the object staying where it spawns and not reacting to force. If it wasn’t 0, it would fall down upon spawning.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt; Level of detail settings &amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;LodCreation per object can easily be added by naming them $lod1; $lod2, $lod3… and linking them to the relevant subobjects. In order to make differentiation easier, a postfix can be added; i.e. «$lod1_wooden plank»&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt; Occlusion Proxy &amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An OcclusionProxy can be added by naming it $occlusion and linking it to the relevant jointed object; like a big sheet of metal on a metal fence or a wooden wall on a hut. Occlusion proxy is allowed to have open edges and need to be as low as possible (something around 2-10 polys).&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt; Instancing within breakable objects &amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;a _fcknotitle=&amp;quot;true&amp;quot; href=&amp;quot;AssetCreation InstancingObjects&amp;quot;&amp;gt;AssetCreation InstancingObjects&amp;lt;/a&amp;gt; Instancing objects] is used to optimize render time by reducing drawcalls and memory consumption. The engine automatically detects identical geometry elements within the exported objects. There is no special setup needed to take advantage of this feature. UVs and relative point position to the pivot need to be identical in objects in order to qualify them for instancing.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt; Linking Objects to simplify export &amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Linked objects don’t need to be exported, just the Root node needs to be added to the exporter list. All child nodes will automatically be exported. The name and pivot will be derived from the root joint.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Example of linking objects and joints for simpler export&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;img src=&amp;quot;/images/0/07/PrebrokenObject_NamingAndHierarchy.jpg&amp;quot; _fck_mw_filename=&amp;quot;PrebrokenObject NamingAndHierarchy.jpg&amp;quot; alt=&amp;quot;RTENOTITLE&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt; Setup in Sandbox &amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Add the object as a brush or a Geom. Entity. In case of a brush, the engine will detext automatically that the object is breakable. For multiplayer where breaking objects has a massive impact on the data transfer, breakability is automatically disabled (might change later)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt; Debugging &amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;p_debug_joints 1 shows the default debug mode for joints (see picture below); p_draw_helpers needs to be activated&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;CAUTION Never scale a joint If you need a new size, create a new joint. the scaling value will be passed on to the engine and causes wrong results in the simulation.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;The «spikes» on the joint objects show the orientation. For limits to properly reflect their names (i.e. pull, twist, etc), the spikes must be directed along the «natural» joints axes. However, it’s also possible to keep them always pointing up, for consistency.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;The blue colored numbers show the mass of the single pieces. Note the «0.00kg» this is the mass of the top node&amp;amp;nbsp;— in this case a dummy.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;Joints linked to the world are displayed red.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;When a force is applied to a joint, the direction is shown (in this case shift and bend), together with the strength and the limit of the particular joint. Green text represents an impact with an impulse much lower then the joint limit. Yellow represents values closer to the joint limit. Red represents values which were higher than the limit&amp;amp;nbsp;— in this case the joint is broken.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;NOTE: the debug mode is handy to see how the impulse of weapons react with the breakable object. set the general limit first and then fine tune the specific limits by setting them explicitly for shift, bend…&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Example of debug display&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;img src=&amp;quot;/images/2/26/PrebrokenObject_sign_example.jpg&amp;quot; _fck_mw_filename=&amp;quot;PrebrokenObject sign example.jpg&amp;quot; alt=&amp;quot;RTENOTITLE&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;span class=&amp;quot;fck_mw_category&amp;quot; sort=&amp;quot;Official:Asset_Creation:Basics&amp;quot;&amp;gt;Official:Asset Creation:Basics&amp;lt;/span&amp;gt; &amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D1%8F%D0%B7%D1%8B%D0%BA%D1%83_Lua</id>
		<title>Обучение языку Lua</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D1%8F%D0%B7%D1%8B%D0%BA%D1%83_Lua"/>
				<updated>2012-01-31T05:52:39Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: /* Рекомендовано к прочтению */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Версия Lua для CryENGINE ==&lt;br /&gt;
&lt;br /&gt;
В CryScriptSystem CryENGINE использует Lua '''5.1.1-rc4'''. Обратите внимание на версию.&lt;br /&gt;
&lt;br /&gt;
== Рекомендовано к прочтению ==&lt;br /&gt;
&lt;br /&gt;
Перед программированием на Lua в CryENGINE, настоятельно рекомендуем Вам поболее узнать о языке Lua. Для этого ниже приведены ссылки на сайты с полной документацией:&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.lua.org/manual/5.1/ Lua 5.1 Reference Manual]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.inf.puc-rio.br/~roberto/pil2/ Programming in Lua, Second Edition]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.ozon.ru/context/detail/id/2565305/ Game Development with Lua]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D1%8F%D0%B7%D1%8B%D0%BA%D1%83_Lua</id>
		<title>Обучение языку Lua</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D1%8F%D0%B7%D1%8B%D0%BA%D1%83_Lua"/>
				<updated>2012-01-31T05:51:56Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: /* Рекомендовано к прочтению */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Версия Lua для CryENGINE ==&lt;br /&gt;
&lt;br /&gt;
В CryScriptSystem CryENGINE использует Lua '''5.1.1-rc4'''. Обратите внимание на версию.&lt;br /&gt;
&lt;br /&gt;
== Рекомендовано к прочтению ==&lt;br /&gt;
&lt;br /&gt;
Перед программированием на Lua в CryENGINE, настоятельно рекомендуем Вам поболее узнать о языке Lua. Для этого ниже приведены ссылки на сайты с полной документацией:&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.lua.org/manual/5.1/ Lua 5.1 Reference Manual]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.inf.puc-rio.br/~roberto/pil2/ Programming in Lua, Second Edition]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.ozon.ru/context/detail/id/2565305/ Game Development with Lua]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B2</id>
		<title>Использование скриптов</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B2"/>
				<updated>2012-01-31T05:49:40Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
CryENGINE uses LUA for its scripting language.&lt;br /&gt;
&lt;br /&gt;
The Entity System can attach a script proxy to any entity. This appear in the form of a table that can include data and functions. The AI System has behaviors and GoalPipes written in scripts. Additionally, several game system such as the Actor, Item System, Vehicle System and the GameRules rely on scripting to extend their functionalities.&lt;br /&gt;
&lt;br /&gt;
Some of the advantages of using scripts are the following:&lt;br /&gt;
&lt;br /&gt;
Fast iteration; scripts can be reloaded within the engine&lt;br /&gt;
Runtime performance; careful usage of the available resources can result into scripts running nearly as fast as compiled code&lt;br /&gt;
Easy to use troubleshooting; an embedded LUA debugger can be invoked at any time&lt;br /&gt;
Most of the engine systems expose ScriptBind functions that can be called with scripts.&lt;br /&gt;
&lt;br /&gt;
Various systems in CryENGINE expose scriptbind functions which allow Lua scripts to call existing code written in C++. The existing scriptbind functions are listed in the reference section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to run scripts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lua files ===&lt;br /&gt;
&lt;br /&gt;
Scripts are usually stored in the Game\Scripts directory.&lt;br /&gt;
&lt;br /&gt;
The scripts will have to be invoked by calling the LoadScript function from within C++ code. More information can be found TOPIC Integration Between Scripts and C++&lt;br /&gt;
&lt;br /&gt;
Another workflow is creating a script entity as explained in the Structure of a [[Структура скрипта сущности]] topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Console ===&lt;br /&gt;
&lt;br /&gt;
Script instructions can be executed within the in-game console. This can be done by appending the # character before the instructions.&lt;br /&gt;
&lt;br /&gt;
This functionality is limited to Sandbox or running the launcher in Dev Mode (using the -DEVMODE command-line argument).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reloading scripts during runtime ===&lt;br /&gt;
&lt;br /&gt;
In Sandbox it's always possible to reload entities within the user interface. When selecting a Script Entity, this can be done by clicking on the Reload Script button found in the Rollup Bar.&lt;br /&gt;
&lt;br /&gt;
It's also possible to use the following ScriptBind function to reload scripts.&lt;br /&gt;
&lt;br /&gt;
*Script.ReloadScript(filename)&lt;br /&gt;
*Script.ReloadScripts()&lt;br /&gt;
{{Примечание|title=Совет|it's always possible to invoke these functions from the console. The following syntax needs to used.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Script.ReloadScript(&amp;quot;Scripts\\EntityCommon.lua&amp;quot;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B2</id>
		<title>Использование скриптов</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B2"/>
				<updated>2012-01-31T05:35:53Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: Новая страница: «Script Usage Introduction CryENGINE uses LUA for its scripting language.  The Entity System can attach a script proxy to any entity. This appear in the form of a tab...»&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Script Usage&lt;br /&gt;
Introduction&lt;br /&gt;
CryENGINE uses LUA for its scripting language.&lt;br /&gt;
&lt;br /&gt;
The Entity System can attach a script proxy to any entity. This appear in the form of a table that can include data and functions. The AI System has behaviors and GoalPipes written in scripts. Additionally, several game system such as the Actor, Item System, Vehicle System and the GameRules rely on scripting to extend their functionalities.&lt;br /&gt;
&lt;br /&gt;
Some of the advantages of using scripts are the following:&lt;br /&gt;
&lt;br /&gt;
Fast iteration; scripts can be reloaded within the engine&lt;br /&gt;
Runtime performance; careful usage of the available resources can result into scripts running nearly as fast as compiled code&lt;br /&gt;
Easy to use troubleshooting; an embedded LUA debugger can be invoked at any time&lt;br /&gt;
Most of the engine systems expose ScriptBind functions that can be called with scripts.&lt;br /&gt;
&lt;br /&gt;
Various systems in CryENGINE expose scriptbind functions which allow Lua scripts to call existing code written in C++. The existing scriptbind functions are listed in the reference section.&lt;br /&gt;
&lt;br /&gt;
How to run scripts&lt;br /&gt;
Lua files&lt;br /&gt;
Scripts are usually stored in the Game\Scripts directory.&lt;br /&gt;
&lt;br /&gt;
The scripts will have to be invoked by calling the LoadScript function from within C++ code. More information can be found TOPIC Integration Between Scripts and C++&lt;br /&gt;
&lt;br /&gt;
Another workflow is creating a script entity as explained in the Structure of a [[Структура скрипта сущности]] topic.&lt;br /&gt;
&lt;br /&gt;
Console&lt;br /&gt;
Script instructions can be executed within the in-game console. This can be done by appending the # character before the instructions.&lt;br /&gt;
&lt;br /&gt;
This functionality is limited to Sandbox or running the launcher in Dev Mode (using the -DEVMODE command-line argument).&lt;br /&gt;
&lt;br /&gt;
Reloading scripts during runtime&lt;br /&gt;
In Sandbox it's always possible to reload entities within the user interface. When selecting a Script Entity, this can be done by clicking on the Reload Script button found in the Rollup Bar.&lt;br /&gt;
&lt;br /&gt;
It's also possible to use the following ScriptBind function to reload scripts.&lt;br /&gt;
&lt;br /&gt;
*Script.ReloadScript(filename)&lt;br /&gt;
*Script.ReloadScripts()&lt;br /&gt;
{{Совет|it's always possible to invoke these functions from the console. The following syntax needs to used.}}Hint: &lt;br /&gt;
&lt;br /&gt;
#Script.ReloadScript(&amp;quot;Scripts\\EntityCommon.lua&amp;quot;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D1%8F%D0%B7%D1%8B%D0%BA%D1%83_Lua</id>
		<title>Обучение языку Lua</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D1%8F%D0%B7%D1%8B%D0%BA%D1%83_Lua"/>
				<updated>2012-01-31T05:28:22Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Версия Lua для CryENGINE ==&lt;br /&gt;
&lt;br /&gt;
В CryScriptSystem CryENGINE использует Lua '''5.1.1-rc4'''. Обратите внимание на версию.&lt;br /&gt;
&lt;br /&gt;
== Рекомендовано к прочтению ==&lt;br /&gt;
&lt;br /&gt;
Перед программированием на Lua в CryENGINE, настоятельно рекомендуем Вам поболее узнать о языке Lua. Для этого ниже приведены ссылки на сайты с полной документацией: &lt;br /&gt;
[http://www.lua.org/manual/5.1/ Lua 5.1 Reference Manual]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.inf.puc-rio.br/~roberto/pil2/ Programming in Lua, Second Edition]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.ozon.ru/context/detail/id/2565305/ Game Development with Lua]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D1%8F%D0%B7%D1%8B%D0%BA%D1%83_Lua</id>
		<title>Обучение языку Lua</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%83%D1%87%D0%B5%D0%BD%D0%B8%D0%B5_%D1%8F%D0%B7%D1%8B%D0%BA%D1%83_Lua"/>
				<updated>2012-01-31T05:26:59Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: Новая страница: «== Версия Lua для CryENGINE ==  В CryScriptSystem CryENGINE использует Lua '''5.1.1-rc4'''. Обратите внимание на версию. ...»&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Версия Lua для CryENGINE ==&lt;br /&gt;
&lt;br /&gt;
В CryScriptSystem CryENGINE использует Lua '''5.1.1-rc4'''. Обратите внимание на версию.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Рекомендовано к прочтению ==&lt;br /&gt;
&lt;br /&gt;
Перед программированием на Lua в CryENGINE, настоятельно рекомендуем Вам поболее узнать о языке Lua. Для этого ниже приведены ссылки на сайты с полной документацией: &lt;br /&gt;
[http://www.lua.org/manual/5.1/ Lua 5.1 Reference Manual]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.inf.puc-rio.br/~roberto/pil2/ Programming in Lua, Second Edition]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.ozon.ru/context/detail/id/2565305/ Game Development with Lua]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B</id>
		<title>Хрупкие объекты</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B"/>
				<updated>2011-06-17T09:08:44Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Хрупкие объекты ==&lt;br /&gt;
Хрупкие объекты вмещают в себя разрушенные части, держатся вместе для присоединения. &lt;br /&gt;
Одиночные части могут быть не связаны, для применения физических сил(пули, взаимодействия с игроком, взрывы), более ,чем ограничения шарниров(joints).&lt;br /&gt;
В общем, Хрупкие объекты размещены в Sandbox как brushes(браш).&lt;br /&gt;
Одни из лучших примеров для Хрупких объектов - дорожный знак, деревянный забор или деревянная панель.&lt;br /&gt;
&lt;br /&gt;
==== Таблица контента ====&lt;br /&gt;
&lt;br /&gt;
=== Файл образца ===&lt;br /&gt;
&lt;br /&gt;
Файл-образец: [http://wiki.crymod.com/images/5/5b/Breakable_example.max Breakable-Example]&lt;br /&gt;
&lt;br /&gt;
=== Основные настройки в 3D-приложениях ===&lt;br /&gt;
* Объекты должны иметь несколько узлов(Nodes) и максе, каждый с физикой.&lt;br /&gt;
* Узлы содержатся вместе с шарнирами(joints, каждый шарнир может связывать только две части.&lt;br /&gt;
* Условное название для Шарниров: $joint01, $joint02,…&lt;br /&gt;
* Шарниры представлены в 3D приложениях с хелпер-объектами(dummies, Nulls..). Они должны пересекаться с физическими доверенностями 1 или, максимально, двумя объектами геометрии.&lt;br /&gt;
* Ориентация по оси Z центра(pivot)шарнира должна обычно направлена вверх(смотрите секцию &amp;quot;Отладка&amp;quot;)&lt;br /&gt;
* Alternatively, one can explicitly specify part names in the joint name using this format: $joint1_part1_part2. This can be useful at complicated junctions where geometrical intersections can find more than 2 parts&lt;br /&gt;
* When a joint object intersects only with one node, a joint between the object and the world is created.&lt;br /&gt;
* The size of the dummy object does _not_ have any effect on the strength.&lt;br /&gt;
* It is, however, used to re-attach joints to broken parts if some geometries also have procedural breaking on (namely: when a part breaks procedurally, all joints that are attached to it are checked for intersections with the newly formed pieces, and are re-attached to them if needed)&lt;br /&gt;
* The strength of the joints and the mass of the separate are defined in the node properties (different name in every 3d application; in 3ds: objects Properties)&lt;br /&gt;
* Specific joint limits are relative to the joint’s normal, represented by the helper node’s *z* axis. For joints that specify part names explicitly, care must be taken that the normal points into the 1st parts (otherwise push and pull limits will switch meanings)&lt;br /&gt;
* Turn OFF «Merge All Nodes» on export&lt;br /&gt;
* Objects can be placed as brush or geom. Entity&lt;br /&gt;
&lt;br /&gt;
* example for dummy placement&lt;br /&gt;
 [[Image:PrebrokenObject dummyplacement.jpg]]&lt;br /&gt;
&lt;br /&gt;
* Example for joint properties&lt;br /&gt;
 [[Image:PrebrokenObject objectproperties.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time an external force (from collisions with other objects, or bullet hits) is applied to the object, the system calculates internal forces needed to hold the object parts together, and if some forces breach the threshold, the corresponding joints are removed. Then part connectivities via remaining joints are recomputed and isolated islands are moved to new entities.&lt;br /&gt;
&lt;br /&gt;
==== Node Properties ====&lt;br /&gt;
The nodes need properties attached (depending on software) to work correctly in the engine.&lt;br /&gt;
&lt;br /&gt;
* entity (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
If the render geometry properties include «entity», the object will not fade out after being disconnected from the main object. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* box (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
If the render geometry properties include «box», the engine will use a simple box (based on the bounding box of the object’s physics proxy) as the collision geometry. This helps speeding up physics calculation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* mass=VALUE (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Mass defines the weight of an object based on real world physics&amp;lt;br /&amp;gt;&lt;br /&gt;
mass=0 sets the object to «unmovable». This is used on the basement of a house for example or the sign pole which should not be movable and always stay in the original position. When used in brushes and Geom Entities, this is the final part’s mass. When used in regular Entities, all parts masses are scaled so that their total mass gives the mass specified in the entity properties.&lt;br /&gt;
* CAUTION* You must either define this value or density to ensure the simulation is working correctly.&lt;br /&gt;
&lt;br /&gt;
* density=VALUE&lt;br /&gt;
The engine automatically calculates the mass for an object based on the density and the bounding box of an object.&lt;br /&gt;
Can be used alternatively to mass.&lt;br /&gt;
&lt;br /&gt;
* limit=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
limit is a general value for several different kind of forces applied to the joint. It contains a combination of the values below.&amp;lt;br /&amp;gt;&lt;br /&gt;
CAUTION This value needs to be defined, otherwise the simulation will not work correctly.&lt;br /&gt;
Crysis Example values: 100—500 can be broken by a bullet; 10000 can be broken by the impact of a driving vehicle or a big explosion.&lt;br /&gt;
&lt;br /&gt;
The following values are optional and are used to fine tune the «limit» settings.&amp;lt;br /&amp;gt;&lt;br /&gt;
* bend=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum torque around an axis perpendicular to the normal.&lt;br /&gt;
&lt;br /&gt;
* twist=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum torque around the normal&lt;br /&gt;
&lt;br /&gt;
* pull=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force applied to the joint’s 1st object against the joint normal (the parts are «pulled together» as a reaction to external forces pulling them apart)&lt;br /&gt;
&lt;br /&gt;
* push=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force applied to the joint’s 1st object (i.e. the one whose name is listed first in the joint’s name, or if the names were not specified, the object the joint’s z axis points towards) along the joint normal; joint normal is the joint’s z axis, so for this value to actually be «push apart» (as a reaction to external forces pressing the parts together), this axis must be directed inside the 1st object&lt;br /&gt;
&lt;br /&gt;
* shift=VALU (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force in the direction perpendicular to normal&lt;br /&gt;
&lt;br /&gt;
Addition: joints also support non-fully-rigid (non-6dof) constraints. A full rigid constraint will become a dynamic constraint if its either bend and twist limit gets broken and the joint has a non-0 «constrant_limit» property.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Broken «bends» will become «socket» constraints, and «twists» will become hinges. The newly created dynamic constraint will inherit pull and shift limits from the joint. The constraint’s frame will be that of the joint’s helper in max. In order to preserve the meaning of «twisting», however, the axes will be swapped (z of the joint’s helper will become the constraint’s x — since both represent the «twising» axis, x will become y, and y wil become z). Thus, for hinges, z asis of the helper should be directed along the desired hinge direction. For socket’s, z axis should be the axis the attached part «bends around».&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the list of related properties:&amp;lt;br /&amp;gt;&lt;br /&gt;
* constraint_limit=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Force limit for the newly created constraint, is checked when the constraint hits a rotation limit and is being pushed further&lt;br /&gt;
&lt;br /&gt;
* constraint_minang=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
* constraint_maxang=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Rotation limits for the constraint (the interpretation is the same as in standalone constraints). The default is no limits&lt;br /&gt;
&lt;br /&gt;
* constraint_damping=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Angular damping (default 0)&lt;br /&gt;
&lt;br /&gt;
* constraint_collides=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Whether the constraint parts will ignore collisions with each other (default 1)&lt;br /&gt;
&lt;br /&gt;
For example, to quickly create an unbreakable hinge constraint, one should put this into the joint’s properties:&amp;lt;br /&amp;gt;&lt;br /&gt;
twist = 0 (the constraint will created at the first activation, regardless of force)&amp;lt;br /&amp;gt;&lt;br /&gt;
constraint_limit = 1E20 (just something big enough)&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that the general «limit = xx» is not required, since we want the limits other than twist to remain unbreakable.&amp;lt;br /&amp;gt;&lt;br /&gt;
Also note that the nodes that have dynamic constraints between them should always be physicalized as entities (not particles).&lt;br /&gt;
&lt;br /&gt;
==== Dissolving into particlespieces ====&lt;br /&gt;
Jointed Objects can be set up to break in smaller pieces when being detached from the joint. i.e. a wooden sheet breaks into several planks.&lt;br /&gt;
The object properties must contain the information about the pieces used. i.e. «pieces=$blah1», «pieces=$rock1».&lt;br /&gt;
Several objects can share the same name, but it is also possible to set up the pieces with different names, i.e. «pieces=$blah1,$blah2».&lt;br /&gt;
Pieces need to be linked to the object they should replace later on.&amp;lt;br /&amp;gt;&lt;br /&gt;
NOTE: make sure the names of the objects you want to use as pieces are in lower case only i.e. $debris or $piece1. Debris would not work.&lt;br /&gt;
&lt;br /&gt;
WARNING Be aware that the search function in the code also returns nodes with only partially matching strings. If you have problems with pieces spawning out of nowhere or existing nodes being cloned for no reason, look into the name strings and change them to avoid this issue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you don’t specify anything in the piece properties, they will be spawned as particles, which means they will have no collision and will disappear after a few seconds. If you want the pieces to behave like actual physicalized objects, you have to add «entity» into their properties box.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sample setup&lt;br /&gt;
 [[Image:PrebrokenObject pieces.jpg]]&lt;br /&gt;
&lt;br /&gt;
Practical examples of how pieces can be used:&lt;br /&gt;
&lt;br /&gt;
— Optimization: If you create a dummy object with a nodraw material (like a simple cube) and spawn it as a piece, the jointed object will simply disappear once the joint breaks — it will be replaced by an invisible object. This can be helpful since the piece that is broken off will not fall down and interact with the remaining pieces, potentially causing problems, and it is also beneficial performance-wise. Once the original object is seperated from its joint, no further physics calculations will be necessary.&lt;br /&gt;
&lt;br /&gt;
— Adding dynamic detail: Pieces replace their original object once this object is «broken off» (seperated from it’s joint), so you can take the original object and cut it up into smaller pieces. An example of this is the huts in crysis, most roof panels have two sub-pieces that spawn once the panel breaks off. This results in more detailed breaking and smaller debris. Don’t forget to add «entity» and a realistic mass to the piece properties, and make sure the piece is physicalized, or else the pieces will fall through the ground and/or disappear after a few seconds. (in case they are only small «fluff» pieces, this might actually be intended)&lt;br /&gt;
&lt;br /&gt;
— Adding static detail: You can also spawn small debris pieces, that, instead of falling down, stay where they appear (for example steel cables sticking out of a concrete wall). To do this, you have to add the following lines to the properties of the piece:&lt;br /&gt;
&lt;br /&gt;
entity&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
mass=0&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
density=0&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Entity because you want the object to stay where it is once it is spawned, and because you want it to be physicalized. The object needs to be physicalized (i.e. contain polygons with a physicalized material) in order for this to work.&lt;br /&gt;
Mass and density need to be 0 to assign the objects infinite mass, which results in the object staying where it spawns and not reacting to force. If it wasn’t 0, it would fall down upon spawning.&lt;br /&gt;
&lt;br /&gt;
==== Level of detail settings ====&lt;br /&gt;
LodCreation per object can easily be added by naming them $lod1; $lod2, $lod3… and linking them to the relevant subobjects. In order to make differentiation easier, a postfix can be added; i.e. «$lod1_wooden plank»&lt;br /&gt;
&lt;br /&gt;
==== Occlusion Proxy ====&lt;br /&gt;
An OcclusionProxy can be added by naming it $occlusion and linking it to the relevant jointed object; like a big sheet of metal on a metal fence or a wooden wall on a hut. Occlusion proxy is allowed to have open edges and need to be as low as possible (something around 2-10 polys).&lt;br /&gt;
&lt;br /&gt;
==== Instancing within breakable objects ====&lt;br /&gt;
[[AssetCreation_InstancingObjects]] Instancing objects] is used to optimize render time by reducing drawcalls and memory consumption.&lt;br /&gt;
The engine automatically detects identical geometry elements within the exported objects. &amp;lt;br /&amp;gt;&lt;br /&gt;
There is no special setup needed to take advantage of this feature. UVs and relative point position to the pivot need to be identical in objects in order to qualify them for instancing.&lt;br /&gt;
&lt;br /&gt;
==== Linking Objects to simplify export ====&lt;br /&gt;
Linked objects don’t need to be exported, just the Root node needs to be added to the exporter list. All child nodes will automatically be exported. The name and pivot will be derived from the root joint.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Example of linking objects and joints for simpler export&lt;br /&gt;
 [[Image:PrebrokenObject NamingAndHierarchy.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Setup in Sandbox ===&lt;br /&gt;
&lt;br /&gt;
Add the object as a brush or a Geom. Entity. In case of a brush, the engine will detext automatically that the object is breakable.&lt;br /&gt;
For multiplayer where breaking objects has a massive impact on the data transfer, breakability is automatically disabled (might change later)&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
* p_debug_joints 1 shows the default debug mode for joints (see picture below); p_draw_helpers needs to be activated&lt;br /&gt;
* CAUTION Never scale a joint If you need a new size, create a new joint. the scaling value will be passed on to the engine and causes wrong results in the simulation.&lt;br /&gt;
* The «spikes» on the joint objects show the orientation. For limits to properly reflect their names (i.e. pull, twist, etc), the spikes must be directed along the «natural» joints axes. However, it’s also possible to keep them always pointing up, for consistency.&lt;br /&gt;
* The blue colored numbers show the mass of the single pieces. Note the «0.00kg» this is the mass of the top node — in this case a dummy.&lt;br /&gt;
* Joints linked to the world are displayed red.&lt;br /&gt;
* When a force is applied to a joint, the direction is shown (in this case shift and bend), together with the strength and the limit of the particular joint. Green text represents an impact with an impulse much lower then the joint limit. Yellow represents values closer to the joint limit. Red represents values which were higher than the limit — in this case the joint is broken.&lt;br /&gt;
* NOTE: the debug mode is handy to see how the impulse of weapons react with the breakable object. set the general limit first and then fine tune the specific limits by setting them explicitly for shift, bend…&lt;br /&gt;
&lt;br /&gt;
* Example of debug display&lt;br /&gt;
 [[Image:PrebrokenObject sign example.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Категория:Official:Asset_Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Banner_wiki_transparent(mini).png</id>
		<title>Файл:Banner wiki transparent(mini).png</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Banner_wiki_transparent(mini).png"/>
				<updated>2011-06-16T16:25:15Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: загружена новая версия «Файл:Banner wiki transparent(mini).png»: Прозрачный фон&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Banner_wiki_transparent(mini).png</id>
		<title>Файл:Banner wiki transparent(mini).png</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Banner_wiki_transparent(mini).png"/>
				<updated>2011-06-16T16:11:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%81%D1%83%D0%B6%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D1%84%D0%B0%D0%B9%D0%BB%D0%B0:Banner_wiki_transparent.png</id>
		<title>Обсуждение файла:Banner wiki transparent.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9E%D0%B1%D1%81%D1%83%D0%B6%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D1%84%D0%B0%D0%B9%D0%BB%D0%B0:Banner_wiki_transparent.png"/>
				<updated>2011-06-16T16:10:46Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: Новая страница: «Уменьшенная версия баннера(размер: 500*63)  Файл:Banner_wiki_transparent(mini).png »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Уменьшенная версия баннера(размер: 500*63)&lt;br /&gt;
&lt;br /&gt;
[[Файл:Banner_wiki_transparent(mini).png ]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5_%D0%BD%D0%BE%D0%B2%D0%BE%D0%B9_%D1%81%D1%83%D1%89%D0%BD%D0%BE%D1%81%D1%82%D0%B8</id>
		<title>Создание новой сущности</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5_%D0%BD%D0%BE%D0%B2%D0%BE%D0%B9_%D1%81%D1%83%D1%89%D0%BD%D0%BE%D1%81%D1%82%D0%B8"/>
				<updated>2011-06-16T11:07:08Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: Новая страница: «&amp;lt;!-- Please enter the information about your article for each section      after the equal sign. The information will be translated into a      formatted page upon b...»&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Please enter the information about your article for each section&lt;br /&gt;
     after the equal sign. The information will be translated into a&lt;br /&gt;
     formatted page upon being saved.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[[Категория:Lua]]&lt;br /&gt;
{{Статья&lt;br /&gt;
|автор=ins&lt;br /&gt;
|переводчик=Sodiet&lt;br /&gt;
|сложность=Средняя&lt;br /&gt;
|совместимости=All&lt;br /&gt;
|требования=Текстовый редактор&lt;br /&gt;
|добавлена=03/08/08&lt;br /&gt;
|обновлена=16/06/11&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The article's topic (Basic Level Design, Terrain...)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
= Creating a new entity =&lt;br /&gt;
In this document we will go through creating a new entity (in Lua), with support for flowgraphs.&lt;br /&gt;
I’ll be using MyMod and MyEntity to identify our mod and the new entity. You can of course change this to whatever you like.&lt;br /&gt;
&lt;br /&gt;
== Lua compiler ==&lt;br /&gt;
It is handy to have a lua compiler to check for syntax errors in your script files. Also, the 'Reload Script' button in the Sandbox Editor uses this.&lt;br /&gt;
[[Image:Lua_entity_tutorial_reloadscript.jpg]]&lt;br /&gt;
&lt;br /&gt;
You can get the lua compiler [http://www.crymod.com/attachment.php?attachmentid=7970 here].&lt;br /&gt;
&lt;br /&gt;
Extract LuaCompiler.exe to &amp;lt;crysis folder&amp;gt;/bin32/ or &amp;lt;crysis folder&amp;gt;/bin64/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up an entity ==&lt;br /&gt;
Now, let's get started. First of all we’re going to create a mod folder. Browse to your Crysis folder and create a Mods folder. In that folder create a MyMod folder.&lt;br /&gt;
Next, let’s create a shortcut in that folder so we can launch the editor with our mod loaded. We have to add –MOD MyMod to the shortcut so the editor knows what mod to load. It could be something like this:&lt;br /&gt;
&lt;br /&gt;
{{SimpleBox|&amp;quot;C:\Program Files\Electronic Arts\Crytek\Crysis\Bin32\Editor.exe&amp;quot; -MOD MyMod}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After that, we need to let the engine know we have a new entity which needs to be loaded. We will need to create a new folder in our mod-directory: Game, and in there another new dir: entities. In that folder create a new file called MyEntity.ent.&lt;br /&gt;
&lt;br /&gt;
Now let’s edit our created MyEntity.ent in a text-editor of your choice. This is the content that needs to be in the file:&lt;br /&gt;
&lt;br /&gt;
{{SimpleBox| &amp;lt;nowiki&amp;gt;&amp;lt;Entity Name=&amp;quot;MyEntity&amp;quot; Script=&amp;quot;Scripts/Entities/MyMod/MyEntity.lua&amp;quot; /&amp;gt;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s look at that a bit closer. It’s just a simple xml file with the name in it, and the location to a .lua file. We will create that scriptfile in the next chapter. Let’s get to the scripting part.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The entity script (basics) ==&lt;br /&gt;
Now that we have the entity setup, we need to create the lua file for it. The lua file will contain the code and the properties of our entity. If you look at our MyEntity.ent file you can see the path Scripts/Entities/MyMod/MyEntity.lua. We need to create this file, as it doesn’t exist yet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning&lt;br /&gt;
|Because Sandbox doesn’t like editing and reloading entities from our mod-folder, we will develop our entity inside the default Crysis/Game/ folder. Once our entity is ready, we can move it to our Mod folder.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s create a new file in Crysis/Game/Scripts/Entities/MyMod/ (create directories if needed). The file name should be MyEntity.lua, which is specified in our MyEntity.ent file. Now that we have our new file, open it in a text editor. I will now go step by step and analyze the code we have to type. If you want, you can copy and paste the whole file at the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
MyEntity = {&lt;br /&gt;
	Properties = {&lt;br /&gt;
		fMessageDuration = 10.0,&lt;br /&gt;
		sMessage = &amp;quot;Use me&amp;quot;,&lt;br /&gt;
		bDoesNothing = 0,&lt;br /&gt;
		object_MyModel = &amp;quot;Editor/Objects/objective.cgf&amp;quot;,&lt;br /&gt;
		Colors = {&lt;br /&gt;
			clrColor = {x=1, y=0, z=0 },&lt;br /&gt;
		},&lt;br /&gt;
	},&lt;br /&gt;
	Editor = { Icon= &amp;quot;Target.bmp&amp;quot;, },&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Let’s analyze that code a bit. First we define our entity with&lt;br /&gt;
&lt;br /&gt;
{{SimpleBox|&amp;lt;nowiki&amp;gt;MyEntity = { … }&amp;lt;/nowiki&amp;gt; }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we set up our Properties. Everything in here will be properties you can adjust in the Sandbox editor, like in the picture on the right, which are the properties of the Tornado entity.&lt;br /&gt;
Our properties are:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border: 1px solid black; background-color: #3F3F3F&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| fMessageDuration&lt;br /&gt;
| The time a message will be shown when we use our entity.&lt;br /&gt;
|-&lt;br /&gt;
| sMessage&lt;br /&gt;
| The actual message to show.&lt;br /&gt;
|-&lt;br /&gt;
| bDoesNothing&lt;br /&gt;
| This actually does nothing&lt;br /&gt;
|-&lt;br /&gt;
| object_MyModel&lt;br /&gt;
| The model that our entity has&lt;br /&gt;
|-&lt;br /&gt;
| clrColor&lt;br /&gt;
| The color of our message&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few things to note: our variables have prefixes like f,s,b,clr,object_ . They are there for a reason. It lets Sandbox know what kind of variable it is. That way we can’t put in text in our MessageDuration, we get a Open file dialog for our models, etc… . Here’s a small list with the most common prefixes:&lt;br /&gt;
{| style=&amp;quot;border: 1px solid black; background-color: #3F3F3F&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|b&lt;br /&gt;
|boolean&lt;br /&gt;
|-&lt;br /&gt;
|s&lt;br /&gt;
|string&lt;br /&gt;
|-&lt;br /&gt;
|f&lt;br /&gt;
|float&lt;br /&gt;
|-&lt;br /&gt;
|object_&lt;br /&gt;
|model(with file open dialog)&lt;br /&gt;
|-&lt;br /&gt;
|clr&lt;br /&gt;
|Color (with colorpick dialog)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also note that our clrColor is in another table in the Properties table. This way we will have a subcategory in Sandbox. After our Properties come the Editor properties. Here we set the Icon which sandbox will use.&lt;br /&gt;
&lt;br /&gt;
{{SimpleBox|&amp;lt;nowiki&amp;gt;	Editor = { Icon= &amp;quot;Target.bmp&amp;quot;, }, &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After that you can also set up some private variables which you can use in the scripts. But for this tutorial we won’t need those.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can already take a peek in the editor, and I suggest you do so. That way we can check if our files are in the right place, and if the editor loads our file.&lt;br /&gt;
&lt;br /&gt;
So browse to our mod folder we created and launch the editor via the shortcut to sandbox.&lt;br /&gt;
No need to load a map, in the rollup bar select Entity and there we should find our entity listed, nicely found in a map called MyMod.&lt;br /&gt;
&lt;br /&gt;
If that isn’t the case, something is wrong. Make sure you did everything right, launched the editor with our shortcut, made the .ent file, made the .lua file.&lt;br /&gt;
&lt;br /&gt;
If you double click our entity you should see our properties we defined in the lua file:&lt;br /&gt;
&lt;br /&gt;
[[Image:Lua_entity_tutorial_properties.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here you can also see what the prefixes have done. Also note that everything is sorted alphabetically, without prefixes.&lt;br /&gt;
&lt;br /&gt;
Now, our entity has some properties, but it doesn’t do anything. You can even try to set a model, it won’t show up. So let’s code that in first. (No need to close the Editor now, we can keep it open for quick debugging) Open the MyEntity.lua script again and add&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:OnInit()&lt;br /&gt;
	self:OnReset();&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The OnInit function gets called when our entity gets initialized, typically when loading the map. We call a function called OnReset(), which we will now make.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:OnReset()&lt;br /&gt;
	if (self.Properties.object_MyModel ~= &amp;quot;&amp;quot;) then&lt;br /&gt;
		self:LoadObject(0, self.Properties.object_MyModel);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
There’s a bit more to explain now. The function gets called on its own when we jump into the editor. (We also call it from OnInit here, which is pretty common)&lt;br /&gt;
&lt;br /&gt;
This first checks if the model is not an empty string. After that it loads the model. Save your file now.&lt;br /&gt;
Let’s get back to the editor. Open a map if you didn’t do so yet. Place the MyEntity entity on it. You should see a model now. If not, reload the entity script via the Reload Script button.&lt;br /&gt;
&lt;br /&gt;
Now try changing the model again. It doesn’t seem to work. We need to add some more code for that.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:OnPropertyChange()&lt;br /&gt;
	self:OnReset();&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
OnPropertyChange() gets called whenever we change a property in the editor. Because of that, we need to reload the model. So we call OnReset again which will load the new model. &lt;br /&gt;
&lt;br /&gt;
Let’s take a look at what we have by now. An entity which has a model, we can change that model, but that’s about it. It doesn’t do anything. Let’s make it so we can use our entity.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:IsUsable(user)&lt;br /&gt;
	return 2;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:GetUsableMessage(idx)&lt;br /&gt;
	return self.Properties.sMessage;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first function IsUsable() returns 2. This makes it so that we can use our entity. The second function defines what message we will get when we want to use the entity. We return the message we set in our properties. Now our entity will be useable, but it still won’t do anything. For that, we need, you guessed it, more code.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:OnUsed(user, idx)&lt;br /&gt;
	CryAction.Persistant2DText(&lt;br /&gt;
		string.format(&amp;quot;Used&amp;gt; %s&amp;quot;, self.Properties.sMessage),&lt;br /&gt;
		2,&lt;br /&gt;
		self.Properties.Colors.clrColor,&lt;br /&gt;
		&amp;quot;OnUsed&amp;quot;,&lt;br /&gt;
		self.Properties.fMessageDuration&lt;br /&gt;
	);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
What this does is print a message to our screen. The message is “Used: OurMessage”, OurMessage gets replaced with the message specified in the properties. &lt;br /&gt;
&lt;br /&gt;
Second argument is the size of our message, currently set to 2. &lt;br /&gt;
&lt;br /&gt;
Next argument is the color, we also get it from the properties. &lt;br /&gt;
&lt;br /&gt;
4th argument is the name of the message 5th and last argument is the duration of our message, in seconds. &lt;br /&gt;
&lt;br /&gt;
We can try that out now, jump back to the editor, click the reload script button and jump ingame. Run up to our entity and press ‘f’. You should see the message specified in the properties. Try changing some of the values in the properties panel and jump ingame to see the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is what you should have by now:&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
MyEntity = {&lt;br /&gt;
	Properties = {&lt;br /&gt;
		fMessageDuration = 10.0,&lt;br /&gt;
		sMessage = “Use me”,&lt;br /&gt;
		bDoesNothing = 0,&lt;br /&gt;
		object_MyModel = &amp;quot;Editor/Objects/objective.cgf&amp;quot;,&lt;br /&gt;
		Colors = {&lt;br /&gt;
			clrColor = {x=1, y=0, z=0 },&lt;br /&gt;
		},&lt;br /&gt;
	},&lt;br /&gt;
	Editor = { Icon= &amp;quot;Target.bmp&amp;quot;, },&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
function MyEntity:OnInit()&lt;br /&gt;
	self:OnReset();&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:OnReset()&lt;br /&gt;
	if (self.Properties.object_MyModel ~= &amp;quot;&amp;quot;) then&lt;br /&gt;
		self:LoadObject(0, self.Properties.object_MyModel);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:OnPropertyChange()&lt;br /&gt;
	self:OnReset();&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:IsUsable(user)&lt;br /&gt;
	return 2;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:GetUsableMessage(idx)&lt;br /&gt;
	return self.Properties.sMessage;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:OnUsed(user, idx)&lt;br /&gt;
	CryAction.Persistant2DText(&lt;br /&gt;
		string.format(&amp;quot;Used&amp;gt; %s&amp;quot;, self.Properties.sMessage),&lt;br /&gt;
		2,&lt;br /&gt;
		self.Properties.Colors.clrColor,&lt;br /&gt;
		&amp;quot;OnUsed&amp;quot;,&lt;br /&gt;
		self.Properties.fMessageDuration&lt;br /&gt;
	);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Extending our entity ==&lt;br /&gt;
We have a basic entity now, let’s add some more interesting/advanced stuff. We will base this on the entity we just made. First, let’s make our model physicalized. We will make a new function for this called PhysicalizeThis, and call it in the OnReset function.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:OnReset()&lt;br /&gt;
	if (self.Properties.object_MyModel ~= &amp;quot;&amp;quot;) then&lt;br /&gt;
		self:LoadObject(0, self.Properties.object_MyModel);&lt;br /&gt;
	end&lt;br /&gt;
	self:PhysicalizeThis(); -- This is the new line&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:PhysicalizeThis()&lt;br /&gt;
	local Physics = {&lt;br /&gt;
		bRigidBody=1,&lt;br /&gt;
		bRigidBodyActive = 0,&lt;br /&gt;
		bRigidBodyAfterDeath =1,&lt;br /&gt;
		bResting = 1,&lt;br /&gt;
		Density = -1,&lt;br /&gt;
		Mass = 5,&lt;br /&gt;
	};&lt;br /&gt;
	EntityCommon.PhysicalizeRigid( self, 0, Physics, 1 );&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In the PhysicalizeThis function we define Physics which contains some vars you should recognize from the editor. Then we pass them along EntityCommon.PhysicalizeRigid(). And now our model is physicalized, it’s that simple. &lt;br /&gt;
&lt;br /&gt;
We can jump in the editor and knock over our entity now. One of the last things we will do now is clone our entity when we press it. Lets’ get coding. We need to add code when we use our entity, so let’ go there and call a new function.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:OnUsed(user, idx)&lt;br /&gt;
	CryAction.Persistant2DText(&lt;br /&gt;
		string.format(&amp;quot;Used&amp;gt; %s&amp;quot;, self.Properties.sMessage),&lt;br /&gt;
		2,&lt;br /&gt;
		self.Properties.Colors.clrColor,&lt;br /&gt;
		&amp;quot;OnUsed&amp;quot;,&lt;br /&gt;
		self.Properties.fMessageDuration&lt;br /&gt;
	);&lt;br /&gt;
	self:Clone(); -- This is the new line&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:Clone()&lt;br /&gt;
	local clone = { class = &amp;quot;MyEntity&amp;quot;, };&lt;br /&gt;
	clone.properties = self.Properties;&lt;br /&gt;
	&lt;br /&gt;
	local ent = System.SpawnEntity(clone);&lt;br /&gt;
	local pos = self:GetPos();&lt;br /&gt;
&lt;br /&gt;
	pos.x = pos.x + 1;&lt;br /&gt;
	ent:SetPos(pos);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This clones our entity. First we set the class to MyEntity, which will spawn our entity with the default values. We want the settings of our main entity though, so we copy the properties of our self. Then we spawn the entity, get the position of our main entity and increase the x value by 1. This will make it so we can actually see if it’s cloned or not. After that, we set the position again to our new position. &lt;br /&gt;
&lt;br /&gt;
And done, we got our cloning function. You can test it out in the editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Adding flowgraph support ==&lt;br /&gt;
For this particular entity it’s a bit stupid, but it’s the idea that counts. All the flowgraph info goes into FlowEvents. We have to define that, so let’s do that now.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
MyEntity.FlowEvents = {&lt;br /&gt;
	Inputs = {&lt;br /&gt;
		Clone = { MyEntity.Event_Clone, &amp;quot;bool&amp;quot; },&lt;br /&gt;
		Message = { MyEntity.Event_Message, &amp;quot;string&amp;quot; },&lt;br /&gt;
	},&lt;br /&gt;
	Outputs = { Used = &amp;quot;bool&amp;quot;, },&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
When we look at it for a second, it doesn’t seem that hard. We have the inputs and the outputs part. In the Inputs part we got a Clone and a Message. In the output we have a Used which will get called when we used our entity. &lt;br /&gt;
&lt;br /&gt;
But what’s the stuff after Clone = and Message = ? MyEntity.Event_Clone and MyEntity.Event_Message, where does that come from? You’re right, it comes out of nowhere, so we need to declare some functions.&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:Event_Clone(sender)&lt;br /&gt;
	self:Clone();&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:Event_Message(sender, msg)&lt;br /&gt;
	self.Properties.sMessage = msg;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Event_Clone just calls our Clone function we made earlier. With Event_Message we can change our property sMessage from the flowgraph. That covers our Inputs, but how are the outputs handled? We need to add some code that triggers that event, and it’s actually quite simple:&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function MyEntity:OnUsed(user, idx)&lt;br /&gt;
	CryAction.Persistant2DText(&lt;br /&gt;
		string.format(&amp;quot;Used&amp;gt; %s&amp;quot;, self.Properties.sMessage),&lt;br /&gt;
		2,&lt;br /&gt;
		self.Properties.Colors.clrColor,&lt;br /&gt;
		&amp;quot;OnUsed&amp;quot;,&lt;br /&gt;
		self.Properties.fMessageDuration&lt;br /&gt;
	);&lt;br /&gt;
	self:Clone(); &lt;br /&gt;
	self:ActivateOutput( &amp;quot;Used&amp;quot; ,true ); -- This is the new line&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We just set that Used value we defined earlier in the output Flowevents and set it to true. &lt;br /&gt;
&lt;br /&gt;
That was it, our flowgraph should work now. Let’s give it a little test. Go to the editor and reload your entity, then click on the Create button under Flowgraph. Give it some name and then we got a blank flowgraph. Now rightclick and select ‘Add Graph Default Entity’. We have the entity on our flowgraph now. &lt;br /&gt;
&lt;br /&gt;
Let’s give it a little test:&lt;br /&gt;
&lt;br /&gt;
[[Image:Lua_entity_tutorial_flowgraph_sample.jpg]]&lt;br /&gt;
&lt;br /&gt;
And now once we use our entity, we will see a “Flowgraph is here” message. Note that it this will only show on the original entity. So that sums it up, we have a custom entity which doesn’t do anything spectacular, with flowgraph support. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Full code ==&lt;br /&gt;
&lt;br /&gt;
{{Lua_Code|notable=1|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
MyEntity = {&lt;br /&gt;
	Properties = {&lt;br /&gt;
		fMessageDuration = 10.0,&lt;br /&gt;
		sMessage = &amp;quot;Use me&amp;quot;,&lt;br /&gt;
		bDoesNothing = 0,&lt;br /&gt;
		object_MyModel = &amp;quot;Editor/Objects/objective.cgf&amp;quot;,&lt;br /&gt;
		Colors = {&lt;br /&gt;
			clrColor = {x=1, y=0, z=0 },&lt;br /&gt;
		},&lt;br /&gt;
	},&lt;br /&gt;
	Editor = { Icon= &amp;quot;Target.bmp&amp;quot;, },&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
function MyEntity:OnInit()&lt;br /&gt;
	self:OnReset();&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:OnReset()&lt;br /&gt;
	if (self.Properties.object_MyModel ~= &amp;quot;&amp;quot;) then&lt;br /&gt;
		self:LoadObject(0, self.Properties.object_MyModel);&lt;br /&gt;
	end&lt;br /&gt;
	self:PhysicalizeThis();&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:OnPropertyChange()&lt;br /&gt;
	self:OnReset();&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:IsUsable(user)&lt;br /&gt;
	return 2;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:GetUsableMessage(idx)&lt;br /&gt;
	return self.Properties.sMessage;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:OnUsed(user, idx)&lt;br /&gt;
	CryAction.Persistant2DText(&lt;br /&gt;
		string.format(&amp;quot;Used&amp;gt; %s&amp;quot;, self.Properties.sMessage),&lt;br /&gt;
		2,&lt;br /&gt;
		self.Properties.Colors.clrColor,&lt;br /&gt;
		&amp;quot;OnUsed&amp;quot;,&lt;br /&gt;
		self.Properties.fMessageDuration&lt;br /&gt;
	);&lt;br /&gt;
	self:Clone();&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:PhysicalizeThis()&lt;br /&gt;
	local Physics = {&lt;br /&gt;
		bRigidBody=1,&lt;br /&gt;
		bRigidBodyActive = 0,&lt;br /&gt;
		bRigidBodyAfterDeath =1,&lt;br /&gt;
		bResting = 1,&lt;br /&gt;
		Density = -1,&lt;br /&gt;
		Mass = 5,&lt;br /&gt;
	};&lt;br /&gt;
	EntityCommon.PhysicalizeRigid( self, 0, Physics, 1 );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:Clone()&lt;br /&gt;
	local clone = { class = &amp;quot;MyEntity&amp;quot;, };&lt;br /&gt;
	clone.properties = self.Properties;&lt;br /&gt;
	&lt;br /&gt;
	local ent = System.SpawnEntity(clone);&lt;br /&gt;
	local pos = self:GetPos();&lt;br /&gt;
&lt;br /&gt;
	pos.x = pos.x + 1;&lt;br /&gt;
	ent:SetPos(pos);&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:Event_Clone(sender)&lt;br /&gt;
	self:Clone();&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MyEntity:Event_Message(sender, msg)&lt;br /&gt;
	self.Properties.sMessage = msg;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
MyEntity.FlowEvents = {&lt;br /&gt;
	Inputs = {&lt;br /&gt;
		Clone = { MyEntity.Event_Clone, &amp;quot;bool&amp;quot; },&lt;br /&gt;
		Message = { MyEntity.Event_Message, &amp;quot;string&amp;quot; },&lt;br /&gt;
	},&lt;br /&gt;
	Outputs = { Used = &amp;quot;bool&amp;quot;, },&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image006.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image006.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image006.jpg"/>
				<updated>2011-06-14T15:23:10Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B</id>
		<title>Хрупкие объекты</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B"/>
				<updated>2011-06-14T15:11:48Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Breakable Objects ==&lt;br /&gt;
Breakable objects consist of separate pieces which are held together by joints.&amp;lt;br /&amp;gt;&lt;br /&gt;
The single parts can be separately disjointed, by applying physical force (bullets, player interaction, explosions) bigger than the joint limits.&amp;lt;br /&amp;gt;&lt;br /&gt;
In general, Breakable objects are placed in Sandbox as brushes &amp;lt;br /&amp;gt;&lt;br /&gt;
A perfect example for a breakable objects would be a road sign, a wooden fence, or a wooden shag.&lt;br /&gt;
&lt;br /&gt;
==== Table of Content ====&lt;br /&gt;
&lt;br /&gt;
=== Sample File ===&lt;br /&gt;
&lt;br /&gt;
Sample File: [http://wiki.crymod.com/images/5/5b/Breakable_example.max Breakable-Example]&lt;br /&gt;
&lt;br /&gt;
=== General Setup in 3d applications ===&lt;br /&gt;
* The objects must have several nodes in max, each with its own physics.&lt;br /&gt;
* Nodes are held together with joints (each joint can connect only 2 parts).&lt;br /&gt;
* Naming convention for Joints: $joint01, $joint02,…&lt;br /&gt;
* Joints are represented in the 3d application with helper objects (dummies, Nulls..). They need to intersect with the physics proxy of 1 or max. two geometry objects.&lt;br /&gt;
* The Z-orientation of the joint pivot should normally point upward (see Debug section)&lt;br /&gt;
* Alternatively, one can explicitly specify part names in the joint name using this format: $joint1_part1_part2. This can be useful at complicated junctions where geometrical intersections can find more than 2 parts&lt;br /&gt;
* When a joint object intersects only with one node, a joint between the object and the world is created.&lt;br /&gt;
* The size of the dummy object does _not_ have any effect on the strength.&lt;br /&gt;
* It is, however, used to re-attach joints to broken parts if some geometries also have procedural breaking on (namely: when a part breaks procedurally, all joints that are attached to it are checked for intersections with the newly formed pieces, and are re-attached to them if needed)&lt;br /&gt;
* The strength of the joints and the mass of the separate are defined in the node properties (different name in every 3d application; in 3ds: objects Properties)&lt;br /&gt;
* Specific joint limits are relative to the joint’s normal, represented by the helper node’s *z* axis. For joints that specify part names explicitly, care must be taken that the normal points into the 1st parts (otherwise push and pull limits will switch meanings)&lt;br /&gt;
* Turn OFF «Merge All Nodes» on export&lt;br /&gt;
* Objects can be placed as brush or geom. Entity&lt;br /&gt;
&lt;br /&gt;
* example for dummy placement&lt;br /&gt;
 [[Image:PrebrokenObject dummyplacement.jpg]]&lt;br /&gt;
&lt;br /&gt;
* Example for joint properties&lt;br /&gt;
 [[Image:PrebrokenObject objectproperties.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time an external force (from collisions with other objects, or bullet hits) is applied to the object, the system calculates internal forces needed to hold the object parts together, and if some forces breach the threshold, the corresponding joints are removed. Then part connectivities via remaining joints are recomputed and isolated islands are moved to new entities.&lt;br /&gt;
&lt;br /&gt;
==== Node Properties ====&lt;br /&gt;
The nodes need properties attached (depending on software) to work correctly in the engine.&lt;br /&gt;
&lt;br /&gt;
* entity (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
If the render geometry properties include «entity», the object will not fade out after being disconnected from the main object. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* box (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
If the render geometry properties include «box», the engine will use a simple box (based on the bounding box of the object’s physics proxy) as the collision geometry. This helps speeding up physics calculation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* mass=VALUE (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Mass defines the weight of an object based on real world physics&amp;lt;br /&amp;gt;&lt;br /&gt;
mass=0 sets the object to «unmovable». This is used on the basement of a house for example or the sign pole which should not be movable and always stay in the original position. When used in brushes and Geom Entities, this is the final part’s mass. When used in regular Entities, all parts masses are scaled so that their total mass gives the mass specified in the entity properties.&lt;br /&gt;
* CAUTION* You must either define this value or density to ensure the simulation is working correctly.&lt;br /&gt;
&lt;br /&gt;
* density=VALUE&lt;br /&gt;
The engine automatically calculates the mass for an object based on the density and the bounding box of an object.&lt;br /&gt;
Can be used alternatively to mass.&lt;br /&gt;
&lt;br /&gt;
* limit=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
limit is a general value for several different kind of forces applied to the joint. It contains a combination of the values below.&amp;lt;br /&amp;gt;&lt;br /&gt;
CAUTION This value needs to be defined, otherwise the simulation will not work correctly.&lt;br /&gt;
Crysis Example values: 100—500 can be broken by a bullet; 10000 can be broken by the impact of a driving vehicle or a big explosion.&lt;br /&gt;
&lt;br /&gt;
The following values are optional and are used to fine tune the «limit» settings.&amp;lt;br /&amp;gt;&lt;br /&gt;
* bend=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum torque around an axis perpendicular to the normal.&lt;br /&gt;
&lt;br /&gt;
* twist=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum torque around the normal&lt;br /&gt;
&lt;br /&gt;
* pull=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force applied to the joint’s 1st object against the joint normal (the parts are «pulled together» as a reaction to external forces pulling them apart)&lt;br /&gt;
&lt;br /&gt;
* push=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force applied to the joint’s 1st object (i.e. the one whose name is listed first in the joint’s name, or if the names were not specified, the object the joint’s z axis points towards) along the joint normal; joint normal is the joint’s z axis, so for this value to actually be «push apart» (as a reaction to external forces pressing the parts together), this axis must be directed inside the 1st object&lt;br /&gt;
&lt;br /&gt;
* shift=VALU (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force in the direction perpendicular to normal&lt;br /&gt;
&lt;br /&gt;
Addition: joints also support non-fully-rigid (non-6dof) constraints. A full rigid constraint will become a dynamic constraint if its either bend and twist limit gets broken and the joint has a non-0 «constrant_limit» property.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Broken «bends» will become «socket» constraints, and «twists» will become hinges. The newly created dynamic constraint will inherit pull and shift limits from the joint. The constraint’s frame will be that of the joint’s helper in max. In order to preserve the meaning of «twisting», however, the axes will be swapped (z of the joint’s helper will become the constraint’s x — since both represent the «twising» axis, x will become y, and y wil become z). Thus, for hinges, z asis of the helper should be directed along the desired hinge direction. For socket’s, z axis should be the axis the attached part «bends around».&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the list of related properties:&amp;lt;br /&amp;gt;&lt;br /&gt;
* constraint_limit=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Force limit for the newly created constraint, is checked when the constraint hits a rotation limit and is being pushed further&lt;br /&gt;
&lt;br /&gt;
* constraint_minang=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
* constraint_maxang=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Rotation limits for the constraint (the interpretation is the same as in standalone constraints). The default is no limits&lt;br /&gt;
&lt;br /&gt;
* constraint_damping=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Angular damping (default 0)&lt;br /&gt;
&lt;br /&gt;
* constraint_collides=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Whether the constraint parts will ignore collisions with each other (default 1)&lt;br /&gt;
&lt;br /&gt;
For example, to quickly create an unbreakable hinge constraint, one should put this into the joint’s properties:&amp;lt;br /&amp;gt;&lt;br /&gt;
twist = 0 (the constraint will created at the first activation, regardless of force)&amp;lt;br /&amp;gt;&lt;br /&gt;
constraint_limit = 1E20 (just something big enough)&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that the general «limit = xx» is not required, since we want the limits other than twist to remain unbreakable.&amp;lt;br /&amp;gt;&lt;br /&gt;
Also note that the nodes that have dynamic constraints between them should always be physicalized as entities (not particles).&lt;br /&gt;
&lt;br /&gt;
==== Dissolving into particlespieces ====&lt;br /&gt;
Jointed Objects can be set up to break in smaller pieces when being detached from the joint. i.e. a wooden sheet breaks into several planks.&lt;br /&gt;
The object properties must contain the information about the pieces used. i.e. «pieces=$blah1», «pieces=$rock1».&lt;br /&gt;
Several objects can share the same name, but it is also possible to set up the pieces with different names, i.e. «pieces=$blah1,$blah2».&lt;br /&gt;
Pieces need to be linked to the object they should replace later on.&amp;lt;br /&amp;gt;&lt;br /&gt;
NOTE: make sure the names of the objects you want to use as pieces are in lower case only i.e. $debris or $piece1. Debris would not work.&lt;br /&gt;
&lt;br /&gt;
WARNING Be aware that the search function in the code also returns nodes with only partially matching strings. If you have problems with pieces spawning out of nowhere or existing nodes being cloned for no reason, look into the name strings and change them to avoid this issue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you don’t specify anything in the piece properties, they will be spawned as particles, which means they will have no collision and will disappear after a few seconds. If you want the pieces to behave like actual physicalized objects, you have to add «entity» into their properties box.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sample setup&lt;br /&gt;
 [[Image:PrebrokenObject pieces.jpg]]&lt;br /&gt;
&lt;br /&gt;
Practical examples of how pieces can be used:&lt;br /&gt;
&lt;br /&gt;
— Optimization: If you create a dummy object with a nodraw material (like a simple cube) and spawn it as a piece, the jointed object will simply disappear once the joint breaks — it will be replaced by an invisible object. This can be helpful since the piece that is broken off will not fall down and interact with the remaining pieces, potentially causing problems, and it is also beneficial performance-wise. Once the original object is seperated from its joint, no further physics calculations will be necessary.&lt;br /&gt;
&lt;br /&gt;
— Adding dynamic detail: Pieces replace their original object once this object is «broken off» (seperated from it’s joint), so you can take the original object and cut it up into smaller pieces. An example of this is the huts in crysis, most roof panels have two sub-pieces that spawn once the panel breaks off. This results in more detailed breaking and smaller debris. Don’t forget to add «entity» and a realistic mass to the piece properties, and make sure the piece is physicalized, or else the pieces will fall through the ground and/or disappear after a few seconds. (in case they are only small «fluff» pieces, this might actually be intended)&lt;br /&gt;
&lt;br /&gt;
— Adding static detail: You can also spawn small debris pieces, that, instead of falling down, stay where they appear (for example steel cables sticking out of a concrete wall). To do this, you have to add the following lines to the properties of the piece:&lt;br /&gt;
&lt;br /&gt;
entity&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
mass=0&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
density=0&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Entity because you want the object to stay where it is once it is spawned, and because you want it to be physicalized. The object needs to be physicalized (i.e. contain polygons with a physicalized material) in order for this to work.&lt;br /&gt;
Mass and density need to be 0 to assign the objects infinite mass, which results in the object staying where it spawns and not reacting to force. If it wasn’t 0, it would fall down upon spawning.&lt;br /&gt;
&lt;br /&gt;
==== Level of detail settings ====&lt;br /&gt;
LodCreation per object can easily be added by naming them $lod1; $lod2, $lod3… and linking them to the relevant subobjects. In order to make differentiation easier, a postfix can be added; i.e. «$lod1_wooden plank»&lt;br /&gt;
&lt;br /&gt;
==== Occlusion Proxy ====&lt;br /&gt;
An OcclusionProxy can be added by naming it $occlusion and linking it to the relevant jointed object; like a big sheet of metal on a metal fence or a wooden wall on a hut. Occlusion proxy is allowed to have open edges and need to be as low as possible (something around 2-10 polys).&lt;br /&gt;
&lt;br /&gt;
==== Instancing within breakable objects ====&lt;br /&gt;
[[AssetCreation_InstancingObjects]] Instancing objects] is used to optimize render time by reducing drawcalls and memory consumption.&lt;br /&gt;
The engine automatically detects identical geometry elements within the exported objects. &amp;lt;br /&amp;gt;&lt;br /&gt;
There is no special setup needed to take advantage of this feature. UVs and relative point position to the pivot need to be identical in objects in order to qualify them for instancing.&lt;br /&gt;
&lt;br /&gt;
==== Linking Objects to simplify export ====&lt;br /&gt;
Linked objects don’t need to be exported, just the Root node needs to be added to the exporter list. All child nodes will automatically be exported. The name and pivot will be derived from the root joint.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Example of linking objects and joints for simpler export&lt;br /&gt;
 [[Image:PrebrokenObject NamingAndHierarchy.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Setup in Sandbox ===&lt;br /&gt;
&lt;br /&gt;
Add the object as a brush or a Geom. Entity. In case of a brush, the engine will detext automatically that the object is breakable.&lt;br /&gt;
For multiplayer where breaking objects has a massive impact on the data transfer, breakability is automatically disabled (might change later)&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
* p_debug_joints 1 shows the default debug mode for joints (see picture below); p_draw_helpers needs to be activated&lt;br /&gt;
* CAUTION Never scale a joint If you need a new size, create a new joint. the scaling value will be passed on to the engine and causes wrong results in the simulation.&lt;br /&gt;
* The «spikes» on the joint objects show the orientation. For limits to properly reflect their names (i.e. pull, twist, etc), the spikes must be directed along the «natural» joints axes. However, it’s also possible to keep them always pointing up, for consistency.&lt;br /&gt;
* The blue colored numbers show the mass of the single pieces. Note the «0.00kg» this is the mass of the top node — in this case a dummy.&lt;br /&gt;
* Joints linked to the world are displayed red.&lt;br /&gt;
* When a force is applied to a joint, the direction is shown (in this case shift and bend), together with the strength and the limit of the particular joint. Green text represents an impact with an impulse much lower then the joint limit. Yellow represents values closer to the joint limit. Red represents values which were higher than the limit — in this case the joint is broken.&lt;br /&gt;
* NOTE: the debug mode is handy to see how the impulse of weapons react with the breakable object. set the general limit first and then fine tune the specific limits by setting them explicitly for shift, bend…&lt;br /&gt;
&lt;br /&gt;
* Example of debug display&lt;br /&gt;
 [[Image:PrebrokenObject sign example.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Категория:Official:Asset_Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B</id>
		<title>Хрупкие объекты</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B"/>
				<updated>2011-06-14T15:05:53Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода|ДО=20 июля 2011}}&lt;br /&gt;
&lt;br /&gt;
== Breakable Objects ==&lt;br /&gt;
Breakable objects consist of separate pieces which are held together by joints.&amp;lt;br /&amp;gt;&lt;br /&gt;
The single parts can be separately disjointed, by applying physical force (bullets, player interaction, explosions) bigger than the joint limits.&amp;lt;br /&amp;gt;&lt;br /&gt;
In general, Breakable objects are placed in Sandbox as brushes &amp;lt;br /&amp;gt;&lt;br /&gt;
A perfect example for a breakable objects would be a road sign, a wooden fence, or a wooden shag.&lt;br /&gt;
&lt;br /&gt;
==== Table of Content ====&lt;br /&gt;
&lt;br /&gt;
=== Sample File ===&lt;br /&gt;
&lt;br /&gt;
Sample File: [http://wiki.crymod.com/images/5/5b/Breakable_example.max Breakable-Example]&lt;br /&gt;
&lt;br /&gt;
=== General Setup in 3d applications ===&lt;br /&gt;
* The objects must have several nodes in max, each with its own physics.&lt;br /&gt;
* Nodes are held together with joints (each joint can connect only 2 parts).&lt;br /&gt;
* Naming convention for Joints: $joint01, $joint02,…&lt;br /&gt;
* Joints are represented in the 3d application with helper objects (dummies, Nulls..). They need to intersect with the physics proxy of 1 or max. two geometry objects.&lt;br /&gt;
* The Z-orientation of the joint pivot should normally point upward (see Debug section)&lt;br /&gt;
* Alternatively, one can explicitly specify part names in the joint name using this format: $joint1_part1_part2. This can be useful at complicated junctions where geometrical intersections can find more than 2 parts&lt;br /&gt;
* When a joint object intersects only with one node, a joint between the object and the world is created.&lt;br /&gt;
* The size of the dummy object does _not_ have any effect on the strength.&lt;br /&gt;
* It is, however, used to re-attach joints to broken parts if some geometries also have procedural breaking on (namely: when a part breaks procedurally, all joints that are attached to it are checked for intersections with the newly formed pieces, and are re-attached to them if needed)&lt;br /&gt;
* The strength of the joints and the mass of the separate are defined in the node properties (different name in every 3d application; in 3ds: objects Properties)&lt;br /&gt;
* Specific joint limits are relative to the joint’s normal, represented by the helper node’s *z* axis. For joints that specify part names explicitly, care must be taken that the normal points into the 1st parts (otherwise push and pull limits will switch meanings)&lt;br /&gt;
* Turn OFF «Merge All Nodes» on export&lt;br /&gt;
* Objects can be placed as brush or geom. Entity&lt;br /&gt;
&lt;br /&gt;
* example for dummy placement&lt;br /&gt;
 [[Image:PrebrokenObject dummyplacement.jpg]]&lt;br /&gt;
&lt;br /&gt;
* Example for joint properties&lt;br /&gt;
 [[Image:PrebrokenObject objectproperties.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time an external force (from collisions with other objects, or bullet hits) is applied to the object, the system calculates internal forces needed to hold the object parts together, and if some forces breach the threshold, the corresponding joints are removed. Then part connectivities via remaining joints are recomputed and isolated islands are moved to new entities.&lt;br /&gt;
&lt;br /&gt;
==== Node Properties ====&lt;br /&gt;
The nodes need properties attached (depending on software) to work correctly in the engine.&lt;br /&gt;
&lt;br /&gt;
* entity (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
If the render geometry properties include «entity», the object will not fade out after being disconnected from the main object. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* box (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
If the render geometry properties include «box», the engine will use a simple box (based on the bounding box of the object’s physics proxy) as the collision geometry. This helps speeding up physics calculation. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* mass=VALUE (render geometry property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Mass defines the weight of an object based on real world physics&amp;lt;br /&amp;gt;&lt;br /&gt;
mass=0 sets the object to «unmovable». This is used on the basement of a house for example or the sign pole which should not be movable and always stay in the original position. When used in brushes and Geom Entities, this is the final part’s mass. When used in regular Entities, all parts masses are scaled so that their total mass gives the mass specified in the entity properties.&lt;br /&gt;
* CAUTION* You must either define this value or density to ensure the simulation is working correctly.&lt;br /&gt;
&lt;br /&gt;
* density=VALUE&lt;br /&gt;
The engine automatically calculates the mass for an object based on the density and the bounding box of an object.&lt;br /&gt;
Can be used alternatively to mass.&lt;br /&gt;
&lt;br /&gt;
* limit=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
limit is a general value for several different kind of forces applied to the joint. It contains a combination of the values below.&amp;lt;br /&amp;gt;&lt;br /&gt;
CAUTION This value needs to be defined, otherwise the simulation will not work correctly.&lt;br /&gt;
Crysis Example values: 100—500 can be broken by a bullet; 10000 can be broken by the impact of a driving vehicle or a big explosion.&lt;br /&gt;
&lt;br /&gt;
The following values are optional and are used to fine tune the «limit» settings.&amp;lt;br /&amp;gt;&lt;br /&gt;
* bend=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum torque around an axis perpendicular to the normal.&lt;br /&gt;
&lt;br /&gt;
* twist=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum torque around the normal&lt;br /&gt;
&lt;br /&gt;
* pull=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force applied to the joint’s 1st object against the joint normal (the parts are «pulled together» as a reaction to external forces pulling them apart)&lt;br /&gt;
&lt;br /&gt;
* push=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force applied to the joint’s 1st object (i.e. the one whose name is listed first in the joint’s name, or if the names were not specified, the object the joint’s z axis points towards) along the joint normal; joint normal is the joint’s z axis, so for this value to actually be «push apart» (as a reaction to external forces pressing the parts together), this axis must be directed inside the 1st object&lt;br /&gt;
&lt;br /&gt;
* shift=VALU (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
maximum force in the direction perpendicular to normal&lt;br /&gt;
&lt;br /&gt;
Addition: joints also support non-fully-rigid (non-6dof) constraints. A full rigid constraint will become a dynamic constraint if its either bend and twist limit gets broken and the joint has a non-0 «constrant_limit» property.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Broken «bends» will become «socket» constraints, and «twists» will become hinges. The newly created dynamic constraint will inherit pull and shift limits from the joint. The constraint’s frame will be that of the joint’s helper in max. In order to preserve the meaning of «twisting», however, the axes will be swapped (z of the joint’s helper will become the constraint’s x — since both represent the «twising» axis, x will become y, and y wil become z). Thus, for hinges, z asis of the helper should be directed along the desired hinge direction. For socket’s, z axis should be the axis the attached part «bends around».&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the list of related properties:&amp;lt;br /&amp;gt;&lt;br /&gt;
* constraint_limit=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Force limit for the newly created constraint, is checked when the constraint hits a rotation limit and is being pushed further&lt;br /&gt;
&lt;br /&gt;
* constraint_minang=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
* constraint_maxang=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Rotation limits for the constraint (the interpretation is the same as in standalone constraints). The default is no limits&lt;br /&gt;
&lt;br /&gt;
* constraint_damping=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Angular damping (default 0)&lt;br /&gt;
&lt;br /&gt;
* constraint_collides=VALUE (Joint object property)&amp;lt;br /&amp;gt;&lt;br /&gt;
Whether the constraint parts will ignore collisions with each other (default 1)&lt;br /&gt;
&lt;br /&gt;
For example, to quickly create an unbreakable hinge constraint, one should put this into the joint’s properties:&amp;lt;br /&amp;gt;&lt;br /&gt;
twist = 0 (the constraint will created at the first activation, regardless of force)&amp;lt;br /&amp;gt;&lt;br /&gt;
constraint_limit = 1E20 (just something big enough)&amp;lt;br /&amp;gt;&lt;br /&gt;
Note that the general «limit = xx» is not required, since we want the limits other than twist to remain unbreakable.&amp;lt;br /&amp;gt;&lt;br /&gt;
Also note that the nodes that have dynamic constraints between them should always be physicalized as entities (not particles).&lt;br /&gt;
&lt;br /&gt;
==== Dissolving into particlespieces ====&lt;br /&gt;
Jointed Objects can be set up to break in smaller pieces when being detached from the joint. i.e. a wooden sheet breaks into several planks.&lt;br /&gt;
The object properties must contain the information about the pieces used. i.e. «pieces=$blah1», «pieces=$rock1».&lt;br /&gt;
Several objects can share the same name, but it is also possible to set up the pieces with different names, i.e. «pieces=$blah1,$blah2».&lt;br /&gt;
Pieces need to be linked to the object they should replace later on.&amp;lt;br /&amp;gt;&lt;br /&gt;
NOTE: make sure the names of the objects you want to use as pieces are in lower case only i.e. $debris or $piece1. Debris would not work.&lt;br /&gt;
&lt;br /&gt;
WARNING Be aware that the search function in the code also returns nodes with only partially matching strings. If you have problems with pieces spawning out of nowhere or existing nodes being cloned for no reason, look into the name strings and change them to avoid this issue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
If you don’t specify anything in the piece properties, they will be spawned as particles, which means they will have no collision and will disappear after a few seconds. If you want the pieces to behave like actual physicalized objects, you have to add «entity» into their properties box.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Sample setup&lt;br /&gt;
 [[Image:PrebrokenObject pieces.jpg]]&lt;br /&gt;
&lt;br /&gt;
Practical examples of how pieces can be used:&lt;br /&gt;
&lt;br /&gt;
— Optimization: If you create a dummy object with a nodraw material (like a simple cube) and spawn it as a piece, the jointed object will simply disappear once the joint breaks — it will be replaced by an invisible object. This can be helpful since the piece that is broken off will not fall down and interact with the remaining pieces, potentially causing problems, and it is also beneficial performance-wise. Once the original object is seperated from its joint, no further physics calculations will be necessary.&lt;br /&gt;
&lt;br /&gt;
— Adding dynamic detail: Pieces replace their original object once this object is «broken off» (seperated from it’s joint), so you can take the original object and cut it up into smaller pieces. An example of this is the huts in crysis, most roof panels have two sub-pieces that spawn once the panel breaks off. This results in more detailed breaking and smaller debris. Don’t forget to add «entity» and a realistic mass to the piece properties, and make sure the piece is physicalized, or else the pieces will fall through the ground and/or disappear after a few seconds. (in case they are only small «fluff» pieces, this might actually be intended)&lt;br /&gt;
&lt;br /&gt;
— Adding static detail: You can also spawn small debris pieces, that, instead of falling down, stay where they appear (for example steel cables sticking out of a concrete wall). To do this, you have to add the following lines to the properties of the piece:&lt;br /&gt;
&lt;br /&gt;
entity&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
mass=0&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
density=0&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Entity because you want the object to stay where it is once it is spawned, and because you want it to be physicalized. The object needs to be physicalized (i.e. contain polygons with a physicalized material) in order for this to work.&lt;br /&gt;
Mass and density need to be 0 to assign the objects infinite mass, which results in the object staying where it spawns and not reacting to force. If it wasn’t 0, it would fall down upon spawning.&lt;br /&gt;
&lt;br /&gt;
==== Level of detail settings ====&lt;br /&gt;
LodCreation per object can easily be added by naming them $lod1; $lod2, $lod3… and linking them to the relevant subobjects. In order to make differentiation easier, a postfix can be added; i.e. «$lod1_wooden plank»&lt;br /&gt;
&lt;br /&gt;
==== Occlusion Proxy ====&lt;br /&gt;
An OcclusionProxy can be added by naming it $occlusion and linking it to the relevant jointed object; like a big sheet of metal on a metal fence or a wooden wall on a hut. Occlusion proxy is allowed to have open edges and need to be as low as possible (something around 2-10 polys).&lt;br /&gt;
&lt;br /&gt;
==== Instancing within breakable objects ====&lt;br /&gt;
[[AssetCreation_InstancingObjects]] Instancing objects] is used to optimize render time by reducing drawcalls and memory consumption.&lt;br /&gt;
The engine automatically detects identical geometry elements within the exported objects. &amp;lt;br /&amp;gt;&lt;br /&gt;
There is no special setup needed to take advantage of this feature. UVs and relative point position to the pivot need to be identical in objects in order to qualify them for instancing.&lt;br /&gt;
&lt;br /&gt;
==== Linking Objects to simplify export ====&lt;br /&gt;
Linked objects don’t need to be exported, just the Root node needs to be added to the exporter list. All child nodes will automatically be exported. The name and pivot will be derived from the root joint.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Example of linking objects and joints for simpler export&lt;br /&gt;
 [[Image:PrebrokenObject NamingAndHierarchy.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Setup in Sandbox ===&lt;br /&gt;
&lt;br /&gt;
Add the object as a brush or a Geom. Entity. In case of a brush, the engine will detext automatically that the object is breakable.&lt;br /&gt;
For multiplayer where breaking objects has a massive impact on the data transfer, breakability is automatically disabled (might change later)&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
* p_debug_joints 1 shows the default debug mode for joints (see picture below); p_draw_helpers needs to be activated&lt;br /&gt;
* CAUTION Never scale a joint If you need a new size, create a new joint. the scaling value will be passed on to the engine and causes wrong results in the simulation.&lt;br /&gt;
* The «spikes» on the joint objects show the orientation. For limits to properly reflect their names (i.e. pull, twist, etc), the spikes must be directed along the «natural» joints axes. However, it’s also possible to keep them always pointing up, for consistency.&lt;br /&gt;
* The blue colored numbers show the mass of the single pieces. Note the «0.00kg» this is the mass of the top node — in this case a dummy.&lt;br /&gt;
* Joints linked to the world are displayed red.&lt;br /&gt;
* When a force is applied to a joint, the direction is shown (in this case shift and bend), together with the strength and the limit of the particular joint. Green text represents an impact with an impulse much lower then the joint limit. Yellow represents values closer to the joint limit. Red represents values which were higher than the limit — in this case the joint is broken.&lt;br /&gt;
* NOTE: the debug mode is handy to see how the impulse of weapons react with the breakable object. set the general limit first and then fine tune the specific limits by setting them explicitly for shift, bend…&lt;br /&gt;
&lt;br /&gt;
* Example of debug display&lt;br /&gt;
 [[Image:PrebrokenObject sign example.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Категория:Official:Asset_Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-14T14:44:56Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностью вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Вес геометрии====&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Обычно применяется модифицируя и уничтожая в стеке модификаторов для того, чтобы вы могли применить модификатор границ. Это удаляет неважные и ненужные для геометрии образования, которые в будущем могут стать причиной проблем.}&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
Оператор, примененный в 3Ds MAX, не имеет значения. Вы можете использовать или Physique, или Skin при создании веса геометрии. Оба поддерживаются движком&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Когда вершины одновременно влияют на более, чем две кости,  вес на одной из них, влияющее меньше всего. будет удален и восстановлен после того, как в зоне влияния останутся две кости:}}&lt;br /&gt;
&lt;br /&gt;
В нашем примере Skin используется для веса костей рук. Модификатор имеет значение 0, но кроме этого есть еще и значение стандартной позиции, настроенной ранее. Это значение стандартно в движке и помогает в процессе отладки.&lt;br /&gt;
&lt;br /&gt;
Только кости, необходимые для деформации меша в настройках путей, добавлены в лист костей модификатора&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Кости в иерархии, имеющие отрицательное значение в начале своих имен, будут игнорироваться экспортером. Это оставляет размер экспортируемого персонажа малым. В данном пункте они были в иерархии слева для создания легкой связки выделения, когда используется физический модификатор. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт персонажа====&lt;br /&gt;
&lt;br /&gt;
Когда вы закончили настройку веса персонажа, вы готовы к экспорту рук в движок.&lt;br /&gt;
Если плагин установлен в директорию 3Ds MAX, то будет виден на командной панели во вкладке утилиты. Выделите вашу геометрию рук и нажмите &amp;quot;Add selected&amp;quot; в секции &amp;quot;Object Export&amp;quot;, если она не была автоматически добавлена. В секции &amp;quot;Bone Export&amp;quot; это автоматически добавит самый верхний узел иерархии, путей в этом случае.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Установите Drop-down лист в &amp;quot;Object Export&amp;quot; секции &amp;quot;Export To&amp;quot;  Персонажу(*.chr) и нажмите &amp;quot;Export Nodes&amp;quot;. Этот экспорт компилирует версию вашего объекта в папку с max-файлом. Если вы хотите определить имя, отличное от исходного, вашему персонажу(обычно оно генерируется на основе названия max-файла), то выберите одно из раскрывающегося списка &amp;quot;Export To&amp;quot;.ю Экспорт возможен только в директорию или поддиректорию max-файла.&lt;br /&gt;
&lt;br /&gt;
Сейчас вы можете открыть Character Editor в редакторе...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...и загрузить своего персонажа.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
Большая зеленая стрелка показывает направление в движке, относительно которого все персонажи должны стоять.&lt;br /&gt;
&lt;br /&gt;
=== Вооружение для вида от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Геометрия вооружения====&lt;br /&gt;
&lt;br /&gt;
Модель рук теперь готова и мы можем подготовить оружие для их совместного использования. Вы видите стандартную модель вооружения, с некоторыми элементами, выделенными красным.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Чтобы процесс добавления веса сделать удобнее, вы можете перемещать  части, предназначеннst для последующей анимации и присвоения собственных костей, на определенное количество юнитов(units). После применения модификатора веса вы с легкостью сможете переместить их на исходную позицию для анимации костей, имеющих вес такого же значения, кроме главной модели.}}&lt;br /&gt;
&lt;br /&gt;
Для геометрии применяются правила, расписанные в секции рук&lt;br /&gt;
&lt;br /&gt;
Ни одно перемещение не должно быть применено к геометрии и после применения модификатора веса должен быть сделан reset-x-form и удалена из стека модификаторов, для избавления от нежелательных трансформаций. Центр(&amp;quot;pivot&amp;quot;) должен быть выравнен во всемирных координатах по центру, а модель иметь точку в позитивной y-координате.&lt;br /&gt;
&lt;br /&gt;
==== Иерархия оружия====&lt;br /&gt;
&lt;br /&gt;
Те же самые правила трансформации должны быть сохранены для костей, созданными вами для иерархии оружия,или хотя бы некоторым из них, служащий определенной цели. В 3Ds MAX это не имеет значения, если кости или хелперы(dummies) использованы для определения иерархии. Экспортер рассматривает их как кости, пока происходит экспорт. &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon Term(Термин Оружия): используется для присоединения к дулу эффекта выстрела.&lt;br /&gt;
Shells(Оболочка): используется при присоединении эффекта частиц для оболочки. &lt;br /&gt;
Collision(Коллизия): используется для вычисления позиции влияния , когда используется оружие ближнего боя. &lt;br /&gt;
Разнообразные прикрепления хелперов, использующиеся для контроля позиции частей оружия. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Хелперы или кости, которые не влияют на элементы или части геометрии вооружения, должны быть добавлены в модификатор деформации. Удостоверьтесь, что они добавлены в иерархию прежде, чем будет выполнен экспорт персонажа, иначе они не будут доступны в движке.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|До применения модификатора деформации, объедините в руках персонажа из исходного max-файла, источник верхнего узла оружия на корневой кости рук персонажа.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|когда используется Физический модификатор, выберите самый верхний узел в иерархии с которым вы хотите деформировать ваш меш на инициализации.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт оружия====&lt;br /&gt;
&lt;br /&gt;
После завершения установки веса, вы можете экспортировать вашего персонажа в движок. Для этого выделите меш вашего оружия, зайдите в CryEngine экспортер на панели утилит командной панели и добавьте его в секцию узлов(node section). Переключитесь на Character на &amp;quot;Export To&amp;quot;  и нажмите кнопку &amp;quot;Export Node&amp;quot;. Это экспортирование вашего персонажа в папку с max-файлом и наследует его имя. Вы можете также изменить имя вручную, используя настройки стандартного имени файла.&lt;br /&gt;
&lt;br /&gt;
Чтобы увидеть вашего персонажа в Character Editor с мешом, привязанным к костям, вы должны добавить им skin-присоединение, установив в свойствах присоединения &amp;quot;Skin&amp;quot;, выбрать руки и после создать новое присоединение. После этих действий персонаж прикреплен к костям и виден в редакторе.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Анимации для персонажа от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Подготовка====&lt;br /&gt;
&lt;br /&gt;
Для того, чтобы Компилятор ресурсов(Resource compiler) корректно обращался с оружием от первого лица, вы должны создать запись в файле в animations.cba. В данном файла вся информация описывает вашего загруженного персонажа, то есть сжатое отношение анимации, путь к персонажу и прочее.&lt;br /&gt;
Это пример записи, которая содержит все необходимые настройки для оружия от первого лица. Для детального рассмотрения этих параметров скачайте документ-референс в CBA-файле. (Ссылка) &lt;br /&gt;
Если этот файл будет отсутствовать, то экспортер не сможет экспортировать анимацию, так как ему необходимо знать файл персонажа.&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Экспорт анимации====&lt;br /&gt;
&lt;br /&gt;
В 3Ds MAX вы имеете два способа экспортирования анимации для анимации вашего персонажа. Наилегчайший путь, это установить временной отрезок на линии времени в точной позиции старта и конца анимации, предназначенной для экспорта.в движке &lt;br /&gt;
Это хорошая идея - иметь начальную и конечную позицию по умолчанию, в таком случае смешивание анимаций будет происходить гладко.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Вы можете создать свободную камеру во центре всемирных координат, которая будет смотреть в направлении положительной оси Y. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view. Вы также можете использовать соединение constraints в камере для вызова хелпера &amp;quot;camera_helper&amp;quot;, который является исходным для главной кости рук персонажа, а после активировать параметры контроля камеры для изменения анимации, позволяет им контролировать этот хелпер. Обратите внимание, что точка старта и конца анимации для камеры должна обычно начинаться и заканчиваться в центре всемирных координат для предотвращения ненужных &amp;quot;прыжков&amp;quot; в вашей анимации в движке,между анимации, имеющей данный активированный хелпер и той, которая не имеет его.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Теперь установите временной проомежуток, который вы можете переместить в экспортер. Проверьте, добавлен ли правый объект в секцию узлов(node section) панели объектов. Это должно автоматически добавить основание вашего персонажа в лист &amp;quot;Bone Export&amp;quot;. Если это не так, сделайте это вручную. &lt;br /&gt;
Нажмите &amp;quot;Export Bones&amp;quot;, введите желаемое имя анимации и сохраните её в папку, в которую вы ранее сохранили файл animations.cba.&lt;br /&gt;
&lt;br /&gt;
Для предпросмотра вашей анимации в Редакторе персонажей, вы должны создать ещё один файл, который объясняет движку, которая анимация доступна данному персонажу(&amp;quot;cal-file&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Ниже приведен cal-файл для примера оружия.&lt;br /&gt;
Он содержит путь к папке анимации, имя анимации и их двоичную копию, так как назвали бы их &amp;quot;на диске&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Файл должен быть сохранен в папку с персонажем, и иметь такое же имя, кроме расширения файла(*.cal*)&lt;br /&gt;
Путь файла, который указывает папку анимации в корневой папке игры.&lt;br /&gt;
Теперь введите все доступные анимации в cal-файл, и экспортируйте его из 3Ds MAX, они будут показаны в листе &amp;quot;Available Animations&amp;quot; Редактора персонажей.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Второй способ экспорта анимации использует окно &amp;quot;Sub Ranges&amp;quot;, на панели таймингов(&amp;quot;Timing&amp;quot;)экспортера CryEngine . Вы можете добавить анимацию в лист, выделив &amp;quot;new range&amp;quot; введя и выбрав имя вашей анимации. Проверьте корректность введенного времени старта и конца. Проверьте, если источник вашего персонажа все ещё находится в листе костей. КОгда вы активируете &amp;quot;Export file per range&amp;quot; в области &amp;quot;Sub range&amp;quot;, после нажатия &amp;quot;Export Bones&amp;quot;, экспортер спросит путь экспорта, и экспортирует любую анимацию из списка &amp;quot;Sub ranges&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Многоуровневая анимация====&lt;br /&gt;
&lt;br /&gt;
Время от времени вы можете только изменить специфические части анимации, которые используются в иерархии. Один пример может иметь различные позиции пальцев дял правой руки, когда вы захотите многократно использовать для различных типов оружия. Это одно использование для многоуровневой анимации, которая должна быть активирована в коде, и переписана существующая анимация в определенной части вашей анимации.&lt;br /&gt;
&lt;br /&gt;
Уровни также могут использоваться для контроля размещения присоединений к оружию. В данном случае глушитель и магазин являются присоединениями. &lt;br /&gt;
&lt;br /&gt;
Для экспорта многоуровневой анимации вы должны проверить, что лист костей содержит только самые верхние узлы частей, которые должны влиять.&lt;br /&gt;
&lt;br /&gt;
Также для этого вида анимации вы можете использовать только статическую позицию. Для достижения активации &amp;quot;Manual range&amp;quot; в панели таймингов экспортера и введите точки старта и конца, чтобы установить то же время.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
После экспорта анимации и добавления в cal-файле, вы можете протестировать её в Редакторе Персонажей.&lt;br /&gt;
&lt;br /&gt;
Для добавления присоединения к вашему персонажу, создайте одно новое присоединения на панели присоединений Редактора персонажей.&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
В свойствах присоединения выберите &amp;quot;Done Attachment&amp;quot; и выберите кость вашего объекта для присоединения из раскрывающегося списка(в данном случае silencer_attach)&lt;br /&gt;
После выделите корректный объект из браузера объектов, вы можете создать новое присоединения и нажмите &amp;quot;Apply&amp;quot; для загрузки из редактора. Это должно ясно обозначится на стандартной позиции вашей выделенной кости, когда вы создадите присоединение.&lt;br /&gt;
&lt;br /&gt;
Для тестирования слоя, вы можете активировать первичную анимацию на стандартном персонаже(то есть на &amp;quot;idle&amp;quot;-анимации) по одну выделенному из листа &amp;quot;Available animations&amp;quot;. Затем выберите одну из &amp;quot;вторичных&amp;quot; слотов анимации на панели анимации персонажей, и выберите слой анимации в листе . Части анимации, которые вызваны из &amp;quot;primary&amp;quot; анимации на данной кости должны быть описаны, на новой многоуровневой анимации.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Категория:Официальная_документация:Создание_ресурсов:Основы]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_%D0%B7%D0%B0%D0%B4%D0%B0%D0%BD%D0%B8%D0%B9_%D0%BC%D0%B8%D1%81%D1%81%D0%B8%D0%B8</id>
		<title>Настройка заданий миссии</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_%D0%B7%D0%B0%D0%B4%D0%B0%D0%BD%D0%B8%D0%B9_%D0%BC%D0%B8%D1%81%D1%81%D0%B8%D0%B8"/>
				<updated>2011-06-14T12:51:00Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Настройка заданий миссии ==&lt;br /&gt;
&lt;br /&gt;
=== Введение ===&lt;br /&gt;
В этом руководстве будет описан процесс настройки текста задания для вашего уровня. Предполагается что вы имеете базовые знания потокового графа и размещения объектов.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;'''Этот метод работает только с патчем 1.2'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Создание текста задания для вашего уровня ===&lt;br /&gt;
&lt;br /&gt;
==== Файл «Objectives.xml» ====&lt;br /&gt;
&lt;br /&gt;
Файл, который содержит всю информацию о вашем задании называется «Objectives.xml». Он должен быть размещен в одной папке с CRY-файлом для вашего уровня. Обратите внимание, что новые задания не перезапишут существующие задания.&lt;br /&gt;
Русский текст в этом файле можно вводить двумя способами:&lt;br /&gt;
# Пересохранив файл в формате UTF-8, для этого следует использовать бесплатный текстовый редактор «Notepad++».&lt;br /&gt;
# Либо использовать локализацию текста, к примеру, «@mission_name» (название задания) и «@mission_description» (описание задания).&lt;br /&gt;
&lt;br /&gt;
Когда вы откроете файл в текстовом редакторе, то увидите много текста. Не волнуйтесь, мы разделим его на полезные куски.&lt;br /&gt;
&lt;br /&gt;
Пример файла «Objectives.xml» используемый в этом руководстве, может быть скачан [http://wiki.crymod.net/images/a/ac/Objectives.xml  отсюда], для этого нажмите правой кнопкой мыши по ссылке и выберите «Сохранить как…».&lt;br /&gt;
&lt;br /&gt;
Также, переименовав этот файл в «Objectives_new.xml», его можно использовать в моде, сохранив в папку каталога вашего мода '''Game/Libs/UI''' , при этом индивидуально сохранять в папках каждого уровня не надо, а просто создавайте дополнительные теги для каждого уровня.&lt;br /&gt;
&lt;br /&gt;
==== Настройка ====&lt;br /&gt;
Текст в файле будет выглядеть следующим образом, но с большим количеством различных тегов с названиями уровней.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;Root&amp;gt;&lt;br /&gt;
&amp;lt;Levelname&amp;gt;&lt;br /&gt;
 &amp;lt;Objective_01 Name=&amp;quot;Заголовок задания миссии&amp;quot; Description=&amp;quot;Описание задания миссии&amp;quot; Secondary=&amp;quot;true/false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/Levelname&amp;gt;&lt;br /&gt;
&amp;lt;/Root&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
В начало и в конец файла заданий, вам необходимо поместить теги '''&amp;lt;Root&amp;gt;''' и '''&amp;lt;/Root&amp;gt;''', соответственно.&lt;br /&gt;
&lt;br /&gt;
Далее, вам нужно создать тег для вашего уровня. Если ваш уровень назван «Levelname», то теги будут '''&amp;lt;Levelname&amp;gt;''' и '''&amp;lt;/Levelname&amp;gt;''' .&lt;br /&gt;
&lt;br /&gt;
==== Номер задания ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;Root&amp;gt;&lt;br /&gt;
&amp;lt;Levelname&amp;gt;&lt;br /&gt;
 &amp;lt;Objective_01 Name=&amp;quot;Заголовок задания миссии&amp;quot; Description=&amp;quot;Описание задания миссии&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/Levelname&amp;gt;&lt;br /&gt;
&amp;lt;/Root&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Теперь мы создадим задание и его текст.&lt;br /&gt;
&lt;br /&gt;
В тегах уровня, вам нужно будет поместить другой тег, содержащий номер задания. Например, если это первое задание в вашем уровне, то откройте тег '''&amp;lt;Objective_01'''.&lt;br /&gt;
&lt;br /&gt;
Пожалуйста, обратите внимание, если вы хотите использовать несколько заданий в вашем уровне, просто скопируйте всю эту строку, в строку второго задания, как показано ниже:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;Root&amp;gt;&lt;br /&gt;
&amp;lt;Levelname&amp;gt;&lt;br /&gt;
 &amp;lt;Objective_01 Name=&amp;quot;Заголовок задания миссии&amp;quot; Description=&amp;quot;Описание задания миссии&amp;quot; /&amp;gt; &lt;br /&gt;
 &amp;lt;Objective_02 Name=&amp;quot;Заголовок задания миссии&amp;quot; Description=&amp;quot;Описание задания миссии&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/Levelname&amp;gt;&lt;br /&gt;
&amp;lt;/Root&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Название задания ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;Root&amp;gt;&lt;br /&gt;
&amp;lt;Levelname&amp;gt;&lt;br /&gt;
 &amp;lt;Objective_01 Name=&amp;quot;Заголовок задания миссии&amp;quot; Description=&amp;quot;Описание задания миссии&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/Levelname&amp;gt;&lt;br /&gt;
&amp;lt;/Root&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Далее мы должны добавить название вашего задания.  После '''&amp;lt;Objective_01''', добавьте '''Name=&amp;quot;Заголовок задания миссии&amp;quot;''', где «Заголовок задания миссии» — название вашего задания — «Lower Control Rods», в примере ниже.&lt;br /&gt;
&lt;br /&gt;
[[Файл:Sandbox_Objectives_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
Вы можете заметить, что у задание в начале присутствует символ «@», в существующем «Objectives.xml».  Его можно не добавлять к своим заданиям, так как он используется только для локализации текста.&lt;br /&gt;
&lt;br /&gt;
==== Описание задания ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;Root&amp;gt;&lt;br /&gt;
&amp;lt;Levelname&amp;gt;&lt;br /&gt;
 &amp;lt;Objective_01 Name=&amp;quot;Заголовок задания миссии&amp;quot; Description=&amp;quot;Описание задания миссии&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/Levelname&amp;gt;&lt;br /&gt;
&amp;lt;/Root&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Теперь нам нужно создать описание задания.  Описание — это длинный текст под названием задание.  Замените '''Описание задания миссии''' требуемым текстом.  Чтобы завершить описание, просто закройте тег '''/&amp;amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
[[Файл:Sandbox_Objectives_image002.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Второстепенное задание — True/False ===&lt;br /&gt;
&lt;br /&gt;
Установите значение '''true''', если вы хотите чтобы задание было вторичной (желтой) миссией.&lt;br /&gt;
По умолчанию установлено значение '''false''', ничего не меняйте, миссия была основной.&lt;br /&gt;
&lt;br /&gt;
=== Сущность «Mission Objective»===&lt;br /&gt;
==== Размещение сущности «Mission Objective» ====&lt;br /&gt;
Теперь у вас есть настроенный XML-файл миссии, и его можно использовать в игре. Разместите '''Entity/MissionObjective''' на ваш уровень.&lt;br /&gt;
&lt;br /&gt;
[[Файл:Sandbox_Objectives_image003.jpg]] &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Вариант 1'''&lt;br /&gt;
&lt;br /&gt;
Теперь перейдите в '''Entity Properties''' и введите название вашего задания в таком формате: &amp;lt;code&amp;gt;НазванияУровня.Задание_Номер&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Например, мы хотим использовать задание «Objective_03» в уровне названном «Test», поэтому мы вводим: &amp;lt;code&amp;gt;Test.Objective_03&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Файл:Sandbox_Objectives_image00x.jpg]] &amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Вариант 2'''&lt;br /&gt;
&lt;br /&gt;
Теперь, перейдите в '''Entity Properties''', и щелкните по кнопке «Objectives Browser», показанной на изображении ниже.&lt;br /&gt;
&lt;br /&gt;
[[Файл:Sandbox_Objectives_image004.jpg]]&lt;br /&gt;
&lt;br /&gt;
И выберите желаемое задание из списка.&lt;br /&gt;
&lt;br /&gt;
[[Файл:Sandbox_Objectives_image005.jpg]]&lt;br /&gt;
&lt;br /&gt;
Получить подробную информацию о создании задания миссии можно [[Настройка основной логики игры|здесь]].&lt;br /&gt;
&lt;br /&gt;
=== Цели миссии ===&lt;br /&gt;
&lt;br /&gt;
==== Что такое «цель миссии»? ====&lt;br /&gt;
Цель миссии — это фрагмент текста расположенный несколько выше раздела со списком заданиями, как показано на изображении ниже.&lt;br /&gt;
&lt;br /&gt;
Вы должны дать игроку краткие обзор того, чего нужно достичь в вашем уровне, в целом.&lt;br /&gt;
&lt;br /&gt;
[[Файл:Sandbox_Objectives_image006.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Вызов цели миссии ====&lt;br /&gt;
Вы должны настроить задание, точно так же, как и раньше, но, чтобы вызвать его, мы должны создать потоковый граф.&lt;br /&gt;
&lt;br /&gt;
Добавьте нод '''Objectives (Add Node/Hud/)''' в '''Flow Graph''', настройте его свойства, выбрав подходящий '''Goal''', и соедините любой нод, по вашему усмотрению, с входящим портом '''SetGoal'''.&lt;br /&gt;
&lt;br /&gt;
[[Файл:Sandbox_Objectives_image007.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Категория:Официальная документация:Основы - Настройка геймплея]]&lt;br /&gt;
&lt;br /&gt;
== См. также ==&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-14T06:46:41Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностью вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Вес геометрии====&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Обычно применяется модифицируя и уничтожая в стеке модификаторов для того, чтобы вы могли применить модификатор границ. Это удаляет неважные и ненужные для геометрии образования, которые в будущем могут стать причиной проблем.}&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
Оператор, примененный в 3Ds MAX, не имеет значения. Вы можете использовать или Physique, или Skin при создании веса геометрии. Оба поддерживаются движком&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Когда вершины одновременно влияют на более, чем две кости,  вес на одной из них, влияющее меньше всего. будет удален и восстановлен после того, как в зоне влияния останутся две кости:}}&lt;br /&gt;
&lt;br /&gt;
В нашем примере Skin используется для веса костей рук. Модификатор имеет значение 0, но кроме этого есть еще и значение стандартной позиции, настроенной ранее. Это значение стандартно в движке и помогает в процессе отладки.&lt;br /&gt;
&lt;br /&gt;
Только кости, необходимые для деформации меша в настройках путей, добавлены в лист костей модификатора&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Кости в иерархии, имеющие отрицательное значение в начале своих имен, будут игнорироваться экспортером. Это оставляет размер экспортируемого персонажа малым. В данном пункте они были в иерархии слева для создания легкой связки выделения, когда используется физический модификатор. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт персонажа====&lt;br /&gt;
&lt;br /&gt;
Когда вы закончили настройку веса персонажа, вы готовы к экспорту рук в движок.&lt;br /&gt;
Если плагин установлен в директорию 3Ds MAX, то будет виден на командной панели во вкладке утилиты. Выделите вашу геометрию рук и нажмите &amp;quot;Add selected&amp;quot; в секции &amp;quot;Object Export&amp;quot;, если она не была автоматически добавлена. В секции &amp;quot;Bone Export&amp;quot; это автоматически добавит самый верхний узел иерархии, путей в этом случае.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Установите Drop-down лист в &amp;quot;Object Export&amp;quot; секции &amp;quot;Export To&amp;quot;  Персонажу(*.chr) и нажмите &amp;quot;Export Nodes&amp;quot;. Этот экспорт компилирует версию вашего объекта в папку с max-файлом. Если вы хотите определить имя, отличное от исходного, вашему персонажу(обычно оно генерируется на основе названия max-файла), то выберите одно из раскрывающегося списка &amp;quot;Export To&amp;quot;.ю Экспорт возможен только в директорию или поддиректорию max-файла.&lt;br /&gt;
&lt;br /&gt;
Сейчас вы можете открыть Character Editor в редакторе...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...и загрузить своего персонажа.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
Большая зеленая стрелка показывает направление в движке, относительно которого все персонажи должны стоять.&lt;br /&gt;
&lt;br /&gt;
=== Вооружение для вида от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Геометрия вооружения====&lt;br /&gt;
&lt;br /&gt;
Модель рук теперь готова и мы можем подготовить оружие для их совместного использования. Вы видите стандартную модель вооружения, с некоторыми элементами, выделенными красным.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Чтобы процесс добавления веса сделать удобнее, вы можете перемещать  части, предназначеннst для последующей анимации и присвоения собственных костей, на определенное количество юнитов(units). После применения модификатора веса вы с легкостью сможете переместить их на исходную позицию для анимации костей, имеющих вес такого же значения, кроме главной модели.}}&lt;br /&gt;
&lt;br /&gt;
Для геометрии применяются правила, расписанные в секции рук&lt;br /&gt;
&lt;br /&gt;
Ни одно перемещение не должно быть применено к геометрии и после применения модификатора веса должен быть сделан reset-x-form и удалена из стека модификаторов, для избавления от нежелательных трансформаций. Центр(&amp;quot;pivot&amp;quot;) должен быть выравнен во всемирных координатах по центру, а модель иметь точку в позитивной y-координате.&lt;br /&gt;
&lt;br /&gt;
==== Иерархия оружия====&lt;br /&gt;
&lt;br /&gt;
Те же самые правила трансформации должны быть сохранены для костей, созданными вами для иерархии оружия,или хотя бы некоторым из них, служащий определенной цели. В 3Ds MAX это не имеет значения, если кости или хелперы(dummies) использованы для определения иерархии. Экспортер рассматривает их как кости, пока происходит экспорт. &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon Term(Термин Оружия): используется для присоединения к дулу эффекта выстрела.&lt;br /&gt;
Shells(Оболочка): используется при присоединении эффекта частиц для оболочки. &lt;br /&gt;
Collision(Коллизия): используется для вычисления позиции влияния , когда используется оружие ближнего боя. &lt;br /&gt;
Разнообразные прикрепления хелперов, использующиеся для контроля позиции частей оружия. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Хелперы или кости, которые не влияют на элементы или части геометрии вооружения, должны быть добавлены в модификатор деформации. Удостоверьтесь, что они добавлены в иерархию прежде, чем будет выполнен экспорт персонажа, иначе они не будут доступны в движке.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|До применения модификатора деформации, объедините в руках персонажа из исходного max-файла, источник верхнего узла оружия на корневой кости рук персонажа.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|когда используется Физический модификатор, выберите самый верхний узел в иерархии с которым вы хотите деформировать ваш меш на инициализации.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт оружия====&lt;br /&gt;
&lt;br /&gt;
После завершения установки веса, вы можете экспортировать вашего персонажа в движок. Для этого выделите меш вашего оружия, зайдите в CryEngine экспортер на панели утилит командной панели и добавьте его в секцию узлов(node section). Переключитесь на Character на &amp;quot;Export To&amp;quot;  и нажмите кнопку &amp;quot;Export Node&amp;quot;. Это экспортирование вашего персонажа в папку с max-файлом и наследует его имя. Вы можете также изменить имя вручную, используя настройки стандартного имени файла.&lt;br /&gt;
&lt;br /&gt;
Чтобы увидеть вашего персонажа в Character Editor с мешом, привязанным к костям, вы должны добавить им skin-присоединение, установив в свойствах присоединения &amp;quot;Skin&amp;quot;, выбрать руки и после создать новое присоединение. После этих действий персонаж прикреплен к костям и виден в редакторе.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Анимации для персонажа от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Подготовка====&lt;br /&gt;
&lt;br /&gt;
Для того, чтобы Компилятор ресурсов(Resource compiler) корректно обращался с оружием от первого лица, вы должны создать запись в файле в animations.cba. В данном файла вся информация описывает вашего загруженного персонажа, то есть сжатое отношение анимации, путь к персонажу и прочее.&lt;br /&gt;
Это пример записи, которая содержит все необходимые настройки для оружия от первого лица. Для детального рассмотрения этих параметров скачайте документ-референс в CBA-файле. (Ссылка) &lt;br /&gt;
Если этот файл будет отсутствовать, то экспортер не сможет экспортировать анимацию, так как ему необходимо знать файл персонажа.&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Экспорт анимации====&lt;br /&gt;
&lt;br /&gt;
В 3Ds MAX вы имеете два способа экспортирования анимации для анимации вашего персонажа. Наилегчайший путь, это установить временной отрезок на линии времени в точной позиции старта и конца анимации, предназначенной для экспорта.в движке &lt;br /&gt;
Это хорошая идея - иметь начальную и конечную позицию по умолчанию, в таком случае смешивание анимаций будет происходить гладко.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Вы можете создать свободную камеру во центре всемирных координат, которая будет смотреть в направлении положительной оси Y. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view. Вы также можете использовать соединение constraints в камере для вызова хелпера &amp;quot;camera_helper&amp;quot;, который является исходным для главной кости рук персонажа, а после активировать параметры контроля камеры для изменения анимации, позволяет им контролировать этот хелпер. Обратите внимание, что точка старта и конца анимации для камеры должна обычно начинаться и заканчиваться в центре всемирных координат для предотвращения ненужных &amp;quot;прыжков&amp;quot; в вашей анимации в движке,между анимации, имеющей данный активированный хелпер и той, которая не имеет его.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Теперь установите временной проомежуток, который вы можете переместить в экспортер. Проверьте, добавлен ли правый объект в секцию узлов(node section) панели объектов. Это должно автоматически добавить основание вашего персонажа в лист &amp;quot;Bone Export&amp;quot;. Если это не так, сделайте это вручную. &lt;br /&gt;
Нажмите &amp;quot;Export Bones&amp;quot;, введите желаемое имя анимации и сохраните её в папку, в которую вы ранее сохранили файл animations.cba.&lt;br /&gt;
&lt;br /&gt;
Для предпросмотра вашей анимации в Редакторе персонажей, вы должны создать ещё один файл, который объясняет движку, которая анимация доступна данному персонажу(&amp;quot;cal-file&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Ниже приведен cal-файл для примера оружия.&lt;br /&gt;
Он содержит путь к папке анимации, имя анимации и их двоичную копию, так как назвали бы их &amp;quot;на диске&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Файл должен быть сохранен в папку с персонажем, и иметь такое же имя, кроме расширения файла(*.cal*)&lt;br /&gt;
Путь файла, который указывает папку анимации в корневой папке игры.&lt;br /&gt;
Теперь введите все доступные анимации в cal-файл, и экспортируйте его из 3Ds MAX, они будут показаны в листе &amp;quot;Available Animations&amp;quot; Редактора персонажей.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Второй способ экспорта анимации использует окно &amp;quot;Sub Ranges&amp;quot;, на панели таймингов(&amp;quot;Timing&amp;quot;)экспортера CryEngine . Вы можете добавить анимацию в лист, &lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Многоуровневая анимация====&lt;br /&gt;
&lt;br /&gt;
Время от времени вы можете только изменить специфические части анимации, которые используются в иерархии. Один пример может иметь различные позиции пальцев дял правой руки, когда вы захотите многократно использовать для различных типов оружия. Это одно использование для многоуровневой анимации, которая должна быть активирована в коде, и переписана существующая анимация в определенной части вашей анимации.&lt;br /&gt;
&lt;br /&gt;
Уровни также могут использоваться для контроля размещения присоединений к оружию. В данном случае глушитель и магазин являются присоединениями. &lt;br /&gt;
&lt;br /&gt;
Для экспорта многоуровневой анимации вы должны проверить, что лист костей содержит только самые верхние узлы частей, которые должны влиять.&lt;br /&gt;
&lt;br /&gt;
Также для этого вида анимации вы можете использовать только статическую позицию. &lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-13T15:20:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностью вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Вес геометрии====&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Обычно применяется модифицируя и уничтожая в стеке модификаторов для того, чтобы вы могли применить модификатор границ. Это удаляет неважные и ненужные для геометрии образования, которые в будущем могут стать причиной проблем.}&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
Оператор, примененный в 3Ds MAX, не имеет значения. Вы можете использовать или Physique, или Skin при создании веса геометрии. Оба поддерживаются движком&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Когда вершины одновременно влияют на более, чем две кости,  вес на одной из них, влияющее меньше всего. будет удален и восстановлен после того, как в зоне влияния останутся две кости:}}&lt;br /&gt;
&lt;br /&gt;
В нашем примере Skin используется для веса костей рук. Модификатор имеет значение 0, но кроме этого есть еще и значение стандартной позиции, настроенной ранее. Это значение стандартно в движке и помогает в процессе отладки.&lt;br /&gt;
&lt;br /&gt;
Только кости, необходимые для деформации меша в настройках путей, добавлены в лист костей модификатора&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Кости в иерархии, имеющие отрицательное значение в начале своих имен, будут игнорироваться экспортером. Это оставляет размер экспортируемого персонажа малым. В данном пункте они были в иерархии слева для создания легкой связки выделения, когда используется физический модификатор. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт персонажа====&lt;br /&gt;
&lt;br /&gt;
Когда вы закончили настройку веса персонажа, вы готовы к экспорту рук в движок.&lt;br /&gt;
Если плагин установлен в директорию 3Ds MAX, то будет виден на командной панели во вкладке утилиты. Выделите вашу геометрию рук и нажмите &amp;quot;Add selected&amp;quot; в секции &amp;quot;Object Export&amp;quot;, если она не была автоматически добавлена. В секции &amp;quot;Bone Export&amp;quot; это автоматически добавит самый верхний узел иерархии, путей в этом случае.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Установите Drop-down лист в &amp;quot;Object Export&amp;quot; секции &amp;quot;Export To&amp;quot;  Персонажу(*.chr) и нажмите &amp;quot;Export Nodes&amp;quot;. Этот экспорт компилирует версию вашего объекта в папку с max-файлом. Если вы хотите определить имя, отличное от исходного, вашему персонажу(обычно оно генерируется на основе названия max-файла), то выберите одно из раскрывающегося списка &amp;quot;Export To&amp;quot;.ю Экспорт возможен только в директорию или поддиректорию max-файла.&lt;br /&gt;
&lt;br /&gt;
Сейчас вы можете открыть Character Editor в редакторе...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...и загрузить своего персонажа.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
Большая зеленая стрелка показывает направление в движке, относительно которого все персонажи должны стоять.&lt;br /&gt;
&lt;br /&gt;
=== Вооружение для вида от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Геометрия вооружения====&lt;br /&gt;
&lt;br /&gt;
Модель рук теперь готова и мы можем подготовить оружие для их совместного использования. Вы видите стандартную модель вооружения, с некоторыми элементами, выделенными красным.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Чтобы процесс добавления веса сделать удобнее, вы можете перемещать  части, предназначеннst для последующей анимации и присвоения собственных костей, на определенное количество юнитов(units). После применения модификатора веса вы с легкостью сможете переместить их на исходную позицию для анимации костей, имеющих вес такого же значения, кроме главной модели.}}&lt;br /&gt;
&lt;br /&gt;
Для геометрии применяются правила, расписанные в секции рук&lt;br /&gt;
&lt;br /&gt;
Ни одно перемещение не должно быть применено к геометрии и после применения модификатора веса должен быть сделан reset-x-form и удалена из стека модификаторов, для избавления от нежелательных трансформаций. Центр(&amp;quot;pivot&amp;quot;) должен быть выравнен во всемирных координатах по центру, а модель иметь точку в позитивной y-координате.&lt;br /&gt;
&lt;br /&gt;
==== Иерархия оружия====&lt;br /&gt;
&lt;br /&gt;
Те же самые правила трансформации должны быть сохранены для костей, созданными вами для иерархии оружия,или хотя бы некоторым из них, служащий определенной цели. В 3Ds MAX это не имеет значения, если кости или хелперы(dummies) использованы для определения иерархии. Экспортер рассматривает их как кости, пока происходит экспорт. &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon Term(Термин Оружия): используется для присоединения к дулу эффекта выстрела.&lt;br /&gt;
Shells(Оболочка): используется при присоединении эффекта частиц для оболочки. &lt;br /&gt;
Collision(Коллизия): используется для вычисления позиции влияния , когда используется оружие ближнего боя. &lt;br /&gt;
Разнообразные прикрепления хелперов, использующиеся для контроля позиции частей оружия. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Хелперы или кости, которые не влияют на элементы или части геометрии вооружения, должны быть добавлены в модификатор деформации. Удостоверьтесь, что они добавлены в иерархию прежде, чем будет выполнен экспорт персонажа, иначе они не будут доступны в движке.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|До применения модификатора деформации, объедините в руках персонажа из исходного max-файла, источник верхнего узла оружия на корневой кости рук персонажа.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|когда используется Физический модификатор, выберите самый верхний узел в иерархии с которым вы хотите деформировать ваш меш на инициализации.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт оружия====&lt;br /&gt;
&lt;br /&gt;
После завершения установки веса, вы можете экспортировать вашего персонажа в движок. Для этого выделите меш вашего оружия, зайдите в CryEngine экспортер на панели утилит командной панели и добавьте его в секцию узлов(node section). Переключитесь на Character на &amp;quot;Export To&amp;quot;  и нажмите кнопку &amp;quot;Export Node&amp;quot;. Это экспортирование вашего персонажа в папку с max-файлом и наследует его имя. Вы можете также изменить имя вручную, используя настройки стандартного имени файла.&lt;br /&gt;
&lt;br /&gt;
Чтобы увидеть вашего персонажа в Character Editor с мешом, привязанным к костям, вы должны добавить им skin-присоединение, установив в свойствах присоединения &amp;quot;Skin&amp;quot;, выбрать руки и после создать новое присоединение. После этих действий персонаж прикреплен к костям и виден в редакторе.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Анимации для персонажа от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Подготовка====&lt;br /&gt;
&lt;br /&gt;
Для того, чтобы Компилятор ресурсов(Resource compiler) корректно обращался с оружием от первого лица, вы должны создать запись в файле в animations.cba. В данном файла вся информация описывает вашего загруженного персонажа, то есть сжатое отношение анимации, путь к персонажу и прочее.&lt;br /&gt;
Это пример записи, которая содержит все необходимые настройки для оружия от первого лица. Для детального рассмотрения этих параметров скачайте документ-референс в CBA-файле. (Ссылка) &lt;br /&gt;
Если этот файл будет отсутствовать, то экспортер не сможет экспортировать анимацию, так как ему необходимо знать файл персонажа.&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Экспорт анимации====&lt;br /&gt;
&lt;br /&gt;
В 3Ds MAX вы имеете два способа экспортирования анимации для анимации вашего персонажа. Наилегчайший путь, это установить временной отрезок на линии времени в точной позиции старта и конца анимации, предназначенной для экспорта.в движке &lt;br /&gt;
Это хорошая идея - иметь начальную и конечную позицию по умолчанию, в таком случае смешивание анимаций будет происходить гладко.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Вы можете создать свободную камеру во центре всемирных координат, которая будет смотреть в направлении положительной оси y. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view. &lt;br /&gt;
Вы также можете использовать соединение constraints в камере для вызова хелпера &amp;quot;camera_helper&amp;quot;, который исходный для главной кости рук персонажа, а после активировать параметры контроля камеры для изменения анимации, позволяет им контролировать этот хелпер. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;quot;jumps&amp;quot;; in your animation in the engine, between animations which have this helper activated and those which haven`t.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-13T14:47:39Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностью вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Вес геометрии====&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Обычно применяется модифицируя и уничтожая в стеке модификаторов для того, чтобы вы могли применить модификатор границ. Это удаляет неважные и ненужные для геометрии образования, которые в будущем могут стать причиной проблем.}&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
Оператор, примененный в 3Ds MAX, не имеет значения. Вы можете использовать или Physique, или Skin при создании веса геометрии. Оба поддерживаются движком&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Когда вершины одновременно влияют на более, чем две кости,  вес на одной из них, влияющее меньше всего. будет удален и восстановлен после того, как в зоне влияния останутся две кости:}}&lt;br /&gt;
&lt;br /&gt;
В нашем примере Skin используется для веса костей рук. Модификатор имеет значение 0, но кроме этого есть еще и значение стандартной позиции, настроенной ранее. Это значение стандартно в движке и помогает в процессе отладки.&lt;br /&gt;
&lt;br /&gt;
Только кости, необходимые для деформации меша в настройках путей, добавлены в лист костей модификатора&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Кости в иерархии, имеющие отрицательное значение в начале своих имен, будут игнорироваться экспортером. Это оставляет размер экспортируемого персонажа малым. В данном пункте они были в иерархии слева для создания легкой связки выделения, когда используется физический модификатор. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт персонажа====&lt;br /&gt;
&lt;br /&gt;
Когда вы закончили настройку веса персонажа, вы готовы к экспорту рук в движок.&lt;br /&gt;
Если плагин установлен в директорию 3Ds MAX, то будет виден на командной панели во вкладке утилиты. Выделите вашу геометрию рук и нажмите &amp;quot;Add selected&amp;quot; в секции &amp;quot;Object Export&amp;quot;, если она не была автоматически добавлена. В секции &amp;quot;Bone Export&amp;quot; это автоматически добавит самый верхний узел иерархии, путей в этом случае.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Установите Drop-down лист в &amp;quot;Object Export&amp;quot; секции &amp;quot;Export To&amp;quot;  Персонажу(*.chr) и нажмите &amp;quot;Export Nodes&amp;quot;. Этот экспорт компилирует версию вашего объекта в папку с max-файлом. Если вы хотите определить имя, отличное от исходного, вашему персонажу(обычно оно генерируется на основе названия max-файла), то выберите одно из раскрывающегося списка &amp;quot;Export To&amp;quot;.ю Экспорт возможен только в директорию или поддиректорию max-файла.&lt;br /&gt;
&lt;br /&gt;
Сейчас вы можете открыть Character Editor в редакторе...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...и загрузить своего персонажа.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
Большая зеленая стрелка показывает направление в движке, относительно которого все персонажи должны стоять.&lt;br /&gt;
&lt;br /&gt;
=== Вооружение для вида от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Геометрия вооружения====&lt;br /&gt;
&lt;br /&gt;
Модель рук теперь готова и мы можем подготовить оружие для их совместного использования. Вы видите стандартную модель вооружения, с некоторыми элементами, выделенными красным.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Чтобы процесс добавления веса сделать удобнее, вы можете перемещать  части, предназначеннst для последующей анимации и присвоения собственных костей, на определенное количество юнитов(units). После применения модификатора веса вы с легкостью сможете переместить их на исходную позицию для анимации костей, имеющих вес такого же значения, кроме главной модели.}}&lt;br /&gt;
&lt;br /&gt;
Для геометрии применяются правила, расписанные в секции рук&lt;br /&gt;
&lt;br /&gt;
Ни одно перемещение не должно быть применено к геометрии и после применения модификатора веса должен быть сделан reset-x-form и удалена из стека модификаторов, для избавления от нежелательных трансформаций. Центр(&amp;quot;pivot&amp;quot;) должен быть выравнен во всемирных координатах по центру, а модель иметь точку в позитивной y-координате.&lt;br /&gt;
&lt;br /&gt;
==== Иерархия оружия====&lt;br /&gt;
&lt;br /&gt;
Те же самые правила трансформации должны быть сохранены для костей, созданными вами для иерархии оружия,или хотя бы некоторым из них, служащий определенной цели. В 3Ds MAX это не имеет значения, если кости или хелперы(dummies) использованы для определения иерархии. Экспортер рассматривает их как кости, пока происходит экспорт. &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon Term(Термин Оружия): используется для присоединения к дулу эффекта выстрела.&lt;br /&gt;
Shells(Оболочка): используется при присоединении эффекта частиц для оболочки. &lt;br /&gt;
Collision(Коллизия): используется для вычисления позиции влияния , когда используется оружие ближнего боя. &lt;br /&gt;
Разнообразные прикрепления хелперов, использующиеся для контроля позиции частей оружия. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Хелперы или кости, которые не влияют на элементы или части геометрии вооружения, должны быть добавлены в модификатор деформации. Удостоверьтесь, что они добавлены в иерархию прежде, чем будет выполнен экспорт персонажа, иначе они не будут доступны в движке.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|До применения модификатора деформации, объедините в руках персонажа из исходного max-файла, источник верхнего узла оружия на корневой кости рук персонажа.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|когда используется Физический модификатор, выберите самый верхний узел в иерархии с которым вы хотите деформировать ваш меш на инициализации.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт оружия====&lt;br /&gt;
&lt;br /&gt;
После завершения установки веса, вы можете экспортировать вашего персонажа в движок. Для этого выделите меш вашего оружия, зайдите в CryEngine экспортер на панели утилит командной панели и добавьте его в секцию узлов(node section). Переключитесь на Character на &amp;quot;Export To&amp;quot;  и нажмите кнопку &amp;quot;Export Node&amp;quot;. Это экспортирование вашего персонажа в папку с max-файлом и наследует его имя. Вы можете также изменить имя вручную, используя настройки стандартного имени файла.&lt;br /&gt;
&lt;br /&gt;
Чтобы увидеть вашего персонажа в Character Editor с мешом, привязанным к костям, вы должны добавить им skin-присоединение, установив в свойствах присоединения &amp;quot;Skin&amp;quot;, выбрать руки и после создать новое присоединение. После этих действий персонаж прикреплен к костям и виден в редакторе.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Анимации для персонажа от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Подготовка====&lt;br /&gt;
&lt;br /&gt;
Для того, чтобы Компилятор ресурсов(Resource compiler) корректно обращался с оружием от первого лица, вы должны создать запись в файле в animations.cba. В данном файла вся информация описывает вашего загруженного персонажа, то есть сжатое отношение анимации, путь к персонажу и прочее.&lt;br /&gt;
Это пример записи, которая содержит все необходимые настройки для оружия от первого лица. Для детального рассмотрения этих параметров скачайте документ-референс в CBA-файле. (Ссылка) &lt;br /&gt;
Если этот файл будет отсутствовать, то экспортер не сможет экспортировать анимацию, так как ему необходимо знать файл персонажа.&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Экспорт анимации====&lt;br /&gt;
&lt;br /&gt;
В 3Ds MAX вы имеете два способа экспортирования анимации для анимации вашего персонажа. Наилегчайший путь, это установить временной отрезок на линии времени в точной позиции старта и конца анимации, предназначенной для экспорта.в движке &lt;br /&gt;
Это хорошая идея - иметь начальную и конечную позицию по умолчанию, в таком случае смешивание анимаций будет происходить гладко.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-12T15:51:17Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностью вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Вес геометрии====&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Обычно применяется модифицируя и уничтожая в стеке модификаторов для того, чтобы вы могли применить модификатор границ. Это удаляет неважные и ненужные для геометрии образования, которые в будущем могут стать причиной проблем.}&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
Оператор, примененный в 3Ds MAX, не имеет значения. Вы можете использовать или Physique, или Skin при создании веса геометрии. Оба поддерживаются движком&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Когда вершины одновременно влияют на более, чем две кости,  вес на одной из них, влияющее меньше всего. будет удален и восстановлен после того, как в зоне влияния останутся две кости:}}&lt;br /&gt;
&lt;br /&gt;
В нашем примере Skin используется для веса костей рук. Модификатор имеет значение 0, но кроме этого есть еще и значение стандартной позиции, настроенной ранее. Это значение стандартно в движке и помогает в процессе отладки.&lt;br /&gt;
&lt;br /&gt;
Только кости, необходимые для деформации меша в настройках путей, добавлены в лист костей модификатора&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Кости в иерархии, имеющие отрицательное значение в начале своих имен, будут игнорироваться экспортером. Это оставляет размер экспортируемого персонажа малым. В данном пункте они были в иерархии слева для создания легкой связки выделения, когда используется физический модификатор. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт персонажа====&lt;br /&gt;
&lt;br /&gt;
Когда вы закончили настройку веса персонажа, вы готовы к экспорту рук в движок.&lt;br /&gt;
Если плагин установлен в директорию 3Ds MAX, то будет виден на командной панели во вкладке утилиты. Выделите вашу геометрию рук и нажмите &amp;quot;Add selected&amp;quot; в секции &amp;quot;Object Export&amp;quot;, если она не была автоматически добавлена. В секции &amp;quot;Bone Export&amp;quot; это автоматически добавит самый верхний узел иерархии, путей в этом случае.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Установите Drop-down лист в &amp;quot;Object Export&amp;quot; секции &amp;quot;Export To&amp;quot;  Персонажу(*.chr) и нажмите &amp;quot;Export Nodes&amp;quot;. Этот экспорт компилирует версию вашего объекта в папку с max-файлом. Если вы хотите определить имя, отличное от исходного, вашему персонажу(обычно оно генерируется на основе названия max-файла), то выберите одно из раскрывающегося списка &amp;quot;Export To&amp;quot;.ю Экспорт возможен только в директорию или поддиректорию max-файла.&lt;br /&gt;
&lt;br /&gt;
Сейчас вы можете открыть Character Editor в редакторе...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...и загрузить своего персонажа.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
Большая зеленая стрелка показывает направление в движке, относительно которого все персонажи должны стоять.&lt;br /&gt;
&lt;br /&gt;
=== Вооружение для вида от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Геометрия вооружения====&lt;br /&gt;
&lt;br /&gt;
Модель рук теперь готова и мы можем подготовить оружие для их совместного использования. Вы видите стандартную модель вооружения, с некоторыми элементами, выделенными красным.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Чтобы процесс добавления веса сделать удобнее, вы можете перемещать  части, предназначеннst для последующей анимации и присвоения собственных костей, на определенное количество юнитов(units). После применения модификатора веса вы с легкостью сможете переместить их на исходную позицию для анимации костей, имеющих вес такого же значения, кроме главной модели.}}&lt;br /&gt;
&lt;br /&gt;
Для геометрии применяются правила, расписанные в секции рук&lt;br /&gt;
&lt;br /&gt;
Ни одно перемещение не должно быть применено к геометрии и после применения модификатора веса должен быть сделан reset-x-form и удалена из стека модификаторов, для избавления от нежелательных трансформаций. Центр(&amp;quot;pivot&amp;quot;) должен быть выравнен во всемирных координатах по центру, а модель иметь точку в позитивной y-координате.&lt;br /&gt;
&lt;br /&gt;
==== Иерархия оружия====&lt;br /&gt;
&lt;br /&gt;
Те же самые правила трансформации должны быть сохранены для костей, созданными вами для иерархии оружия,или хотя бы некоторым из них, служащий определенной цели. В 3Ds MAX это не имеет значения, если кости или хелперы(dummies) использованы для определения иерархии. Экспортер рассматривает их как кости, пока происходит экспорт. &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Weapon Term(Термин Оружия): используется для присоединения к дулу эффекта выстрела.&lt;br /&gt;
Shells(Оболочка): используется при присоединении эффекта частиц для оболочки. &lt;br /&gt;
Collision(Коллизия): используется для вычисления позиции влияния , когда используется оружие ближнего боя. &lt;br /&gt;
Разнообразные прикрепления хелперов, использующиеся для контроля позиции частей оружия. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Хелперы или кости, которые не влияют на элементы или части геометрии вооружения.&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-11T17:23:31Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностью вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Вес геометрии====&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Обычно применяется модифицируя и уничтожая в стеке модификаторов для того, чтобы вы могли применить модификатор границ. Это удаляет неважные и ненужные для геометрии образования, которые в будущем могут стать причиной проблем.}&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
Оператор, примененный в 3Ds MAX, не имеет значения. Вы можете использовать или Physique, или Skin при создании веса геометрии. Оба поддерживаются движком&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Когда вершины одновременно влияют на более, чем две кости,  вес на одной из них, влияющее меньше всего. будет удален и восстановлен после того, как в зоне влияния останутся две кости:}}&lt;br /&gt;
&lt;br /&gt;
В нашем примере Skin используется для веса костей рук. Модификатор имеет значение 0, но кроме этого есть еще и значение стандартной позиции, настроенной ранее. Это значение стандартно в движке и помогает в процессе отладки.&lt;br /&gt;
&lt;br /&gt;
Только кости, необходимые для деформации меша в настройках путей, добавлены в лист костей модификатора&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Кости в иерархии, имеющие отрицательное значение в начале своих имен, будут игнорироваться экспортером. Это оставляет размер экспортируемого персонажа малым. В данном пункте они были в иерархии слева для создания легкой связки выделения, когда используется физический модификатор. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт персонажа====&lt;br /&gt;
&lt;br /&gt;
Когда вы закончили настройку веса персонажа, вы готовы к экспорту рук в движок.&lt;br /&gt;
Если плагин установлен в директорию 3Ds MAX, то будет виден на командной панели во вкладке утилиты. Выделите вашу геометрию рук и нажмите &amp;quot;Add selected&amp;quot; в секции &amp;quot;Object Export&amp;quot;, если она не была автоматически добавлена. В секции &amp;quot;Bone Export&amp;quot; это автоматически добавит самый верхний узел иерархии, путей в этом случае.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Установите Drop-down лист в &amp;quot;Object Export&amp;quot; секции &amp;quot;Export To&amp;quot;  Персонажу(*.chr) и нажмите &amp;quot;Export Nodes&amp;quot;. Этот экспорт компилирует версию вашего объекта в папку с max-файлом. Если вы хотите определить имя, отличное от исходного, вашему персонажу(обычно оно генерируется на основе названия max-файла), то выберите одно из раскрывающегося списка &amp;quot;Export To&amp;quot;.ю Экспорт возможен только в директорию или поддиректорию max-файла.&lt;br /&gt;
&lt;br /&gt;
Сейчас вы можете открыть Character Editor в редакторе...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...и загрузить своего персонажа.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
Большая зеленая стрелка показывает направление в движке, относительно которого все персонажи должны стоять.&lt;br /&gt;
&lt;br /&gt;
=== Вооружение для вида от первого лица===&lt;br /&gt;
&lt;br /&gt;
==== Геометрия вооружения====&lt;br /&gt;
&lt;br /&gt;
Модель рук теперь готова и мы можем подготовить оружие для их совместного использования. Вы видите стандартную модель вооружения, с некоторыми элементами, выделенными красным.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Совет|Чтобы процесс добавления веса сделать удобнее, вы можете перемещать  части, предназначеннst для последующей анимации и присвоения собственных костей, на определенное количество юнитов(units). После применения модификатора веса вы с легкостью сможете переместить их на исходную позицию для анимации костей, имеющих вес такого же значения, кроме главной модели.}}&lt;br /&gt;
&lt;br /&gt;
Для геометрии применяются правила, расписанные в секции рук&lt;br /&gt;
&lt;br /&gt;
Ни одно перемещение не должно быть применено к геометрии и после применения модификатора веса должен быть сделан reset-x-form и удалена из стека модификаторов, для избавления от нежелательных трансформаций. Центр(&amp;quot;pivot&amp;quot;) должен быть выравнен во всемирных координатах по центру, а модель иметь точку в позитивной y-координате.&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Hierarchy====&lt;br /&gt;
&lt;br /&gt;
The same transformation rules should be kept for the bones you create for the weapon hierarchy, or at least to some of them which serve a specific purpose.&lt;br /&gt;
In 3ds max it doesn&amp;amp;#8217;t matter if bones or helpers (dummies) are used to define a hierarchy. The exporter treats them both as bones when they are exported.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
Weapon Term: used to attach the muzzle-flash effects to.&lt;br /&gt;
Shells: used to attach the particle effect for the shells to.&lt;br /&gt;
Collision: used for determining the position of impact when used as a melee weapon.&lt;br /&gt;
Various attachment helpers, which are used to control the position of weapon parts. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-11T09:46:07Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностью вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Вес геометрии====&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Обычно применяется модифицируя и уничтожая в стеке модификаторов для того, чтобы вы могли применить модификатор границ. Это удаляет неважные и ненужные для геометрии образования, которые в будущем могут стать причиной проблем.}&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
Оператор, примененный в 3Ds MAX, не имеет значения. Вы можете использовать или Physique, или Skin при создании веса геометрии. Оба поддерживаются движком&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Когда вершины одновременно влияют на более, чем две кости,  вес на одной из них, влияющее меньше всего. будет удален и восстановлен после того, как в зоне влияния останутся две кости:}}&lt;br /&gt;
&lt;br /&gt;
В нашем примере Skin используется для веса костей рук. Модификатор имеет значение 0, но кроме этого есть еще и значение стандартной позиции, настроенной ранее. Это значение стандартно в движке и помогает в процессе отладки.&lt;br /&gt;
&lt;br /&gt;
Только кости, необходимые для деформации меша в настройках путей, добавлены в лист костей модификатора&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Кости в иерархии, имеющие отрицательное значение в начале своих имен, будут игнорироваться экспортером. Это оставляет размер экспортируемого персонажа малым. В данном пункте они были в иерархии слева для создания легкой связки выделения, когда используется физический модификатор. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Экспорт персонажа====&lt;br /&gt;
&lt;br /&gt;
Когда вы закончили настройку веса персонада, вы готовы к экспорту рук в движок.&lt;br /&gt;
Если плагин установлен в директорию 3Ds MAX, то будет виден на командной панели во вкладке утилиты. Выделите вашу геометрию рук и нажмите &amp;quot;Add selected&amp;quot; в секции &amp;quot;Object Export&amp;quot;, если она не была автоматически добавлена. В секции &amp;quot;Bone Export&amp;quot; это автоматически должно добавить самый верхний узел иерархии, путей в этом случае&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the Drop-down-list in the &amp;amp;#8220;Object Export&amp;amp;#8221; section under &amp;amp;#8220;Export To&amp;amp;#8221; to &amp;amp;#8220;Character (*.chr), and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports a compiled version of your object to the same folder your max-file has been saved to. If you want to specify a different name for your character (which is usually generated from the name of the max-file) you can specify one by activating the option below the &amp;amp;#8220;Export To&amp;amp;#8221; drop down list. Exporting is only possible to the same folder that the max-file resides in, or to a sub-folder from that one.&lt;br /&gt;
&lt;br /&gt;
Now you can open the Character Editor under &amp;amp;#8220;view&amp;amp;#8221; in the editor&amp;amp;#8230;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;#8230;and load your character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
The big green arrow shows you the &amp;amp;#8220;forward direction&amp;amp;#8221; in the engine, which all characters should be facing to (Y+).&lt;br /&gt;
&lt;br /&gt;
=== 1st Person Weapon===&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Geometry====&lt;br /&gt;
&lt;br /&gt;
Now that the arms model is ready, we can prepare a weapon to use with it. Here you can see a basic weapon model, with some elements highlighted in red.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To make the weighting process more convenient, you can move away the parts which are meant to be animated later and should get their own bones, by a known amount of units or its multiples. Later after you applied your weighting modifier you can easily move them back to their original position by animating the bones they have been weighted to, the same amount you moved them apart from the main model earlier.&lt;br /&gt;
&lt;br /&gt;
For the geometry the same rules apply like have been pointed out in the arms section.&lt;br /&gt;
No translations should be applied to the geometry, and before applying the weighting modifier do a reset-x-form, and collapse it in the modifier stack, to get rid of unwanted transforms. The pivot should be aligned to the world coordinate center, and the model should point in the positive y-direction.&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Hierarchy====&lt;br /&gt;
&lt;br /&gt;
The same transformation rules should be kept for the bones you create for the weapon hierarchy, or at least to some of them which serve a specific purpose.&lt;br /&gt;
In 3ds max it doesn&amp;amp;#8217;t matter if bones or helpers (dummies) are used to define a hierarchy. The exporter treats them both as bones when they are exported.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
Weapon Term: used to attach the muzzle-flash effects to.&lt;br /&gt;
Shells: used to attach the particle effect for the shells to.&lt;br /&gt;
Collision: used for determining the position of impact when used as a melee weapon.&lt;br /&gt;
Various attachment helpers, which are used to control the position of weapon parts. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Sodiet</id>
		<title>Участник:Sodiet</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Sodiet"/>
				<updated>2011-06-07T09:57:12Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: Новая страница: «{{Шаблон:Стаж|23|2|2011|dmy=1}}»&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Шаблон:Стаж|23|2|2011|dmy=1}}&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-07T09:55:31Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: и значение&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностью вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Вес геометрии====&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Обычно применяется модифицируя и уничтожая в стеке модификаторов для того, чтобы вы могли применить модификатор границ. Это удаляет неважные и ненужные для геометрии образования, которые в будущем могут стать причиной проблем.}&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
Оператор, примененный в 3Ds MAX, не имеет значения. Вы можете использовать или Physique, или Skin при создании веса геометрии. Оба поддерживаются движком&lt;br /&gt;
&lt;br /&gt;
{{Примечание|title=Информация|Когда вершины одновременно влияют на более, чем две кости,  вес на одной из них, влияющее меньше всего. будет удален и восстановлен после того, как в зоне влияния останутся две кости:}}&lt;br /&gt;
&lt;br /&gt;
В нашем примере Skin используется для веса костей рук. Модификатор имеет значение 0, но кроме этого есть еще и значение стандартной позиции, настроенной ранее. Это значение стандартно в движке и помогает в процессе отладки.&lt;br /&gt;
&lt;br /&gt;
Только кости, необходимые для деформации меша в настройках путей, добавлены в лист костей модификатора&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Bones in the hierarchy which have an underscore at the beginning of their name won&amp;amp;#8217;t be considered by the exporter. This keeps the size of the exported character low. In this case they were only left in the hierarchy to make the selection of links easier, when using the physique modifier.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Character====&lt;br /&gt;
&lt;br /&gt;
Once you have finished weighting the character, you are ready to export the arms to the engine.&lt;br /&gt;
If the plug-ins are installed correctly into your 3dsmax plug-ins folder, you should find the Cryengine exporter in the command panel under utilities.&lt;br /&gt;
Select your arms geometry and hit the &amp;amp;#8220;Add selected&amp;amp;#8221; button in the &amp;amp;#8220;Object Export&amp;amp;#8221; section, if it&amp;amp;#8217;s not already added automatically. In the &amp;amp;#8220;Bone Export&amp;amp;#8221; section it should automatically add the highest node of your hierarchy, &amp;amp;#8220;root&amp;amp;#8221; in this case.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Set the Drop-down-list in the &amp;amp;#8220;Object Export&amp;amp;#8221; section under &amp;amp;#8220;Export To&amp;amp;#8221; to &amp;amp;#8220;Character (*.chr), and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports a compiled version of your object to the same folder your max-file has been saved to. If you want to specify a different name for your character (which is usually generated from the name of the max-file) you can specify one by activating the option below the &amp;amp;#8220;Export To&amp;amp;#8221; drop down list. Exporting is only possible to the same folder that the max-file resides in, or to a sub-folder from that one.&lt;br /&gt;
&lt;br /&gt;
Now you can open the Character Editor under &amp;amp;#8220;view&amp;amp;#8221; in the editor&amp;amp;#8230;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;#8230;and load your character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
The big green arrow shows you the &amp;amp;#8220;forward direction&amp;amp;#8221; in the engine, which all characters should be facing to (Y+).&lt;br /&gt;
&lt;br /&gt;
=== 1st Person Weapon===&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Geometry====&lt;br /&gt;
&lt;br /&gt;
Now that the arms model is ready, we can prepare a weapon to use with it. Here you can see a basic weapon model, with some elements highlighted in red.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To make the weighting process more convenient, you can move away the parts which are meant to be animated later and should get their own bones, by a known amount of units or its multiples. Later after you applied your weighting modifier you can easily move them back to their original position by animating the bones they have been weighted to, the same amount you moved them apart from the main model earlier.&lt;br /&gt;
&lt;br /&gt;
For the geometry the same rules apply like have been pointed out in the arms section.&lt;br /&gt;
No translations should be applied to the geometry, and before applying the weighting modifier do a reset-x-form, and collapse it in the modifier stack, to get rid of unwanted transforms. The pivot should be aligned to the world coordinate center, and the model should point in the positive y-direction.&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Hierarchy====&lt;br /&gt;
&lt;br /&gt;
The same transformation rules should be kept for the bones you create for the weapon hierarchy, or at least to some of them which serve a specific purpose.&lt;br /&gt;
In 3ds max it doesn&amp;amp;#8217;t matter if bones or helpers (dummies) are used to define a hierarchy. The exporter treats them both as bones when they are exported.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
Weapon Term: used to attach the muzzle-flash effects to.&lt;br /&gt;
Shells: used to attach the particle effect for the shells to.&lt;br /&gt;
Collision: used for determining the position of impact when used as a melee weapon.&lt;br /&gt;
Various attachment helpers, which are used to control the position of weapon parts. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-07T09:13:44Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image001.jpg]]&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностья вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Weighting the Geometry====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Always apply a &amp;amp;#8220;reset x-form&amp;amp;#8221; modifier and collapse it in the modifier stack, before you apply the envelope modifier. This removes unwanted transformations to the geometry, which could cause problems later on.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which operator is used in max doesn&amp;amp;#8217;t matter. You can either use Physique, or Skin to weight your model. Both are supported in the engine.&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Whenever a vertex is influenced by more than two bones, the weighting on the ones with the weakest influence gets deleted and gets normalized between the remaining two bones.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example Skin is used to weight the arms to the bones. The modifier is applied at frame 0, which also defines the &amp;amp;#8220;default pose&amp;amp;#8221; which was keyed earlier. This also defines the default pose in the engine and helps in debugging problems later on in the process.&lt;br /&gt;
&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Bones in the hierarchy which have an underscore at the beginning of their name won&amp;amp;#8217;t be considered by the exporter. This keeps the size of the exported character low. In this case they were only left in the hierarchy to make the selection of links easier, when using the physique modifier.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Character====&lt;br /&gt;
&lt;br /&gt;
Once you have finished weighting the character, you are ready to export the arms to the engine.&lt;br /&gt;
If the plug-ins are installed correctly into your 3dsmax plug-ins folder, you should find the Cryengine exporter in the command panel under utilities.&lt;br /&gt;
Select your arms geometry and hit the &amp;amp;#8220;Add selected&amp;amp;#8221; button in the &amp;amp;#8220;Object Export&amp;amp;#8221; section, if it&amp;amp;#8217;s not already added automatically. In the &amp;amp;#8220;Bone Export&amp;amp;#8221; section it should automatically add the highest node of your hierarchy, &amp;amp;#8220;root&amp;amp;#8221; in this case.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Set the Drop-down-list in the &amp;amp;#8220;Object Export&amp;amp;#8221; section under &amp;amp;#8220;Export To&amp;amp;#8221; to &amp;amp;#8220;Character (*.chr), and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports a compiled version of your object to the same folder your max-file has been saved to. If you want to specify a different name for your character (which is usually generated from the name of the max-file) you can specify one by activating the option below the &amp;amp;#8220;Export To&amp;amp;#8221; drop down list. Exporting is only possible to the same folder that the max-file resides in, or to a sub-folder from that one.&lt;br /&gt;
&lt;br /&gt;
Now you can open the Character Editor under &amp;amp;#8220;view&amp;amp;#8221; in the editor&amp;amp;#8230;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;#8230;and load your character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
The big green arrow shows you the &amp;amp;#8220;forward direction&amp;amp;#8221; in the engine, which all characters should be facing to (Y+).&lt;br /&gt;
&lt;br /&gt;
=== 1st Person Weapon===&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Geometry====&lt;br /&gt;
&lt;br /&gt;
Now that the arms model is ready, we can prepare a weapon to use with it. Here you can see a basic weapon model, with some elements highlighted in red.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To make the weighting process more convenient, you can move away the parts which are meant to be animated later and should get their own bones, by a known amount of units or its multiples. Later after you applied your weighting modifier you can easily move them back to their original position by animating the bones they have been weighted to, the same amount you moved them apart from the main model earlier.&lt;br /&gt;
&lt;br /&gt;
For the geometry the same rules apply like have been pointed out in the arms section.&lt;br /&gt;
No translations should be applied to the geometry, and before applying the weighting modifier do a reset-x-form, and collapse it in the modifier stack, to get rid of unwanted transforms. The pivot should be aligned to the world coordinate center, and the model should point in the positive y-direction.&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Hierarchy====&lt;br /&gt;
&lt;br /&gt;
The same transformation rules should be kept for the bones you create for the weapon hierarchy, or at least to some of them which serve a specific purpose.&lt;br /&gt;
In 3ds max it doesn&amp;amp;#8217;t matter if bones or helpers (dummies) are used to define a hierarchy. The exporter treats them both as bones when they are exported.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
Weapon Term: used to attach the muzzle-flash effects to.&lt;br /&gt;
Shells: used to attach the particle effect for the shells to.&lt;br /&gt;
Collision: used for determining the position of impact when used as a melee weapon.&lt;br /&gt;
Various attachment helpers, which are used to control the position of weapon parts. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:FirstPersonCharacters_image001.jpg</id>
		<title>Файл:FirstPersonCharacters image001.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:FirstPersonCharacters_image001.jpg"/>
				<updated>2011-06-07T09:13:03Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image018.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image018.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image018.jpg"/>
				<updated>2011-06-07T09:11:58Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image017.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image017.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image017.jpg"/>
				<updated>2011-06-07T09:11:51Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image016.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image016.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image016.jpg"/>
				<updated>2011-06-07T09:11:45Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:FixFirstPersonCharacters_image015.jpg</id>
		<title>Файл:FixFirstPersonCharacters image015.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:FixFirstPersonCharacters_image015.jpg"/>
				<updated>2011-06-07T09:11:38Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:FirstPersonCharacters_image014.gif</id>
		<title>Файл:FirstPersonCharacters image014.gif</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:FirstPersonCharacters_image014.gif"/>
				<updated>2011-06-07T09:11:29Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:FirstPersonCharacters_image013.jpg</id>
		<title>Файл:FirstPersonCharacters image013.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:FirstPersonCharacters_image013.jpg"/>
				<updated>2011-06-07T09:11:19Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Fixed_FirstPersonCharacters_image012.jpg</id>
		<title>Файл:Fixed FirstPersonCharacters image012.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Fixed_FirstPersonCharacters_image012.jpg"/>
				<updated>2011-06-07T09:11:09Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image010.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image010.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image010.jpg"/>
				<updated>2011-06-07T09:08:31Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image011.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image011.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image011.jpg"/>
				<updated>2011-06-07T09:08:20Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image009.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image009.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image009.jpg"/>
				<updated>2011-06-07T09:07:26Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image008.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image008.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image008.jpg"/>
				<updated>2011-06-07T09:07:15Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image007.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image007.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image007.jpg"/>
				<updated>2011-06-07T09:07:05Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image005.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image005.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image005.jpg"/>
				<updated>2011-06-07T09:06:47Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image004.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image004.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image004.jpg"/>
				<updated>2011-06-07T09:06:39Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image003.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image003.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image003.jpg"/>
				<updated>2011-06-07T09:06:27Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image002.jpg</id>
		<title>Файл:Sandbox FirstPersonCharacters image002.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Sandbox_FirstPersonCharacters_image002.jpg"/>
				<updated>2011-06-07T09:06:03Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-06T09:36:01Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
http://wiki.crymod.com/images/a/ae/FirstPersonCharacters_image001.jpg&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Иерархия рук ====&lt;br /&gt;
&lt;br /&gt;
Ниже иерархия будет использоваться для изменения геометрии рук. Заметьте, что основани, являющееся верхней костью в иерархии, также расположено во всемирном центре и не имеют примененного вращения.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Три красные кости в предплечьях являются хелперами запястья и используются для деформации запястий. Они имеют простое выражение, которое соединяет кости рук во время вращения по оси X&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Как раз сейчас удобно перевести позицию и вращение всех элементов иерархии в значение 0. Таким образом вы будете иметь функцию возврата назад.}}&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Полностья вся иерархия рук в схематичном виде&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
Хелперы запястий должны быть скрыты после после применения оператора границы, чтобы они не были случайно анимированы. Это заставило бы прикладные выражения становиться неэффективными.  &lt;br /&gt;
&lt;br /&gt;
Необязательно сохранять точно такую же иерархию структуры, использующуюся здесь. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Weighting the Geometry====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Always apply a &amp;amp;#8220;reset x-form&amp;amp;#8221; modifier and collapse it in the modifier stack, before you apply the envelope modifier. This removes unwanted transformations to the geometry, which could cause problems later on.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which operator is used in max doesn&amp;amp;#8217;t matter. You can either use Physique, or Skin to weight your model. Both are supported in the engine.&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Whenever a vertex is influenced by more than two bones, the weighting on the ones with the weakest influence gets deleted and gets normalized between the remaining two bones.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example Skin is used to weight the arms to the bones. The modifier is applied at frame 0, which also defines the &amp;amp;#8220;default pose&amp;amp;#8221; which was keyed earlier. This also defines the default pose in the engine and helps in debugging problems later on in the process.&lt;br /&gt;
&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Bones in the hierarchy which have an underscore at the beginning of their name won&amp;amp;#8217;t be considered by the exporter. This keeps the size of the exported character low. In this case they were only left in the hierarchy to make the selection of links easier, when using the physique modifier.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Character====&lt;br /&gt;
&lt;br /&gt;
Once you have finished weighting the character, you are ready to export the arms to the engine.&lt;br /&gt;
If the plug-ins are installed correctly into your 3dsmax plug-ins folder, you should find the Cryengine exporter in the command panel under utilities.&lt;br /&gt;
Select your arms geometry and hit the &amp;amp;#8220;Add selected&amp;amp;#8221; button in the &amp;amp;#8220;Object Export&amp;amp;#8221; section, if it&amp;amp;#8217;s not already added automatically. In the &amp;amp;#8220;Bone Export&amp;amp;#8221; section it should automatically add the highest node of your hierarchy, &amp;amp;#8220;root&amp;amp;#8221; in this case.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Set the Drop-down-list in the &amp;amp;#8220;Object Export&amp;amp;#8221; section under &amp;amp;#8220;Export To&amp;amp;#8221; to &amp;amp;#8220;Character (*.chr), and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports a compiled version of your object to the same folder your max-file has been saved to. If you want to specify a different name for your character (which is usually generated from the name of the max-file) you can specify one by activating the option below the &amp;amp;#8220;Export To&amp;amp;#8221; drop down list. Exporting is only possible to the same folder that the max-file resides in, or to a sub-folder from that one.&lt;br /&gt;
&lt;br /&gt;
Now you can open the Character Editor under &amp;amp;#8220;view&amp;amp;#8221; in the editor&amp;amp;#8230;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;#8230;and load your character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
The big green arrow shows you the &amp;amp;#8220;forward direction&amp;amp;#8221; in the engine, which all characters should be facing to (Y+).&lt;br /&gt;
&lt;br /&gt;
=== 1st Person Weapon===&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Geometry====&lt;br /&gt;
&lt;br /&gt;
Now that the arms model is ready, we can prepare a weapon to use with it. Here you can see a basic weapon model, with some elements highlighted in red.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To make the weighting process more convenient, you can move away the parts which are meant to be animated later and should get their own bones, by a known amount of units or its multiples. Later after you applied your weighting modifier you can easily move them back to their original position by animating the bones they have been weighted to, the same amount you moved them apart from the main model earlier.&lt;br /&gt;
&lt;br /&gt;
For the geometry the same rules apply like have been pointed out in the arms section.&lt;br /&gt;
No translations should be applied to the geometry, and before applying the weighting modifier do a reset-x-form, and collapse it in the modifier stack, to get rid of unwanted transforms. The pivot should be aligned to the world coordinate center, and the model should point in the positive y-direction.&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Hierarchy====&lt;br /&gt;
&lt;br /&gt;
The same transformation rules should be kept for the bones you create for the weapon hierarchy, or at least to some of them which serve a specific purpose.&lt;br /&gt;
In 3ds max it doesn&amp;amp;#8217;t matter if bones or helpers (dummies) are used to define a hierarchy. The exporter treats them both as bones when they are exported.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
Weapon Term: used to attach the muzzle-flash effects to.&lt;br /&gt;
Shells: used to attach the particle effect for the shells to.&lt;br /&gt;
Collision: used for determining the position of impact when used as a melee weapon.&lt;br /&gt;
Various attachment helpers, which are used to control the position of weapon parts. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-06T09:17:36Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
http://wiki.crymod.com/images/a/ae/FirstPersonCharacters_image001.jpg&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Примечание|Меш/Геометрия должны быть всегда в центре всемирных координат без вращения}} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Arm Hierarchy====&lt;br /&gt;
&lt;br /&gt;
Below is the hierarchy which will be used to deform the arm&amp;amp;#8217;s geometry. Note that the root, which is the top bone of the hierarchy, is also located at the world centre and has no rotations applied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The three red coloured bones in the lower arms are twist helpers, and are used to help the deformation around the wrist. They have a simple expression applied to them which is connected to the hand&amp;amp;#8217;s bones X- rotation.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now is a good time to set a position and rotation key on all elements of the hierarchy at frame 0. This way you will always have the option to go back to the &amp;amp;#8220;initial Pose&amp;amp;#8221; of the character. &amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the whole arm hierarchy in the schematic view.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
The wrist helpers should be hidden after the envelope operator is applied, so that they won&amp;amp;#8217;t accidentally be animated. This would cause the applied expressions to become ineffective.&lt;br /&gt;
&lt;br /&gt;
There is no need to keep the hierarchy the same structure we used here. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Weighting the Geometry====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Always apply a &amp;amp;#8220;reset x-form&amp;amp;#8221; modifier and collapse it in the modifier stack, before you apply the envelope modifier. This removes unwanted transformations to the geometry, which could cause problems later on.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which operator is used in max doesn&amp;amp;#8217;t matter. You can either use Physique, or Skin to weight your model. Both are supported in the engine.&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Whenever a vertex is influenced by more than two bones, the weighting on the ones with the weakest influence gets deleted and gets normalized between the remaining two bones.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example Skin is used to weight the arms to the bones. The modifier is applied at frame 0, which also defines the &amp;amp;#8220;default pose&amp;amp;#8221; which was keyed earlier. This also defines the default pose in the engine and helps in debugging problems later on in the process.&lt;br /&gt;
&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Bones in the hierarchy which have an underscore at the beginning of their name won&amp;amp;#8217;t be considered by the exporter. This keeps the size of the exported character low. In this case they were only left in the hierarchy to make the selection of links easier, when using the physique modifier.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Character====&lt;br /&gt;
&lt;br /&gt;
Once you have finished weighting the character, you are ready to export the arms to the engine.&lt;br /&gt;
If the plug-ins are installed correctly into your 3dsmax plug-ins folder, you should find the Cryengine exporter in the command panel under utilities.&lt;br /&gt;
Select your arms geometry and hit the &amp;amp;#8220;Add selected&amp;amp;#8221; button in the &amp;amp;#8220;Object Export&amp;amp;#8221; section, if it&amp;amp;#8217;s not already added automatically. In the &amp;amp;#8220;Bone Export&amp;amp;#8221; section it should automatically add the highest node of your hierarchy, &amp;amp;#8220;root&amp;amp;#8221; in this case.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Set the Drop-down-list in the &amp;amp;#8220;Object Export&amp;amp;#8221; section under &amp;amp;#8220;Export To&amp;amp;#8221; to &amp;amp;#8220;Character (*.chr), and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports a compiled version of your object to the same folder your max-file has been saved to. If you want to specify a different name for your character (which is usually generated from the name of the max-file) you can specify one by activating the option below the &amp;amp;#8220;Export To&amp;amp;#8221; drop down list. Exporting is only possible to the same folder that the max-file resides in, or to a sub-folder from that one.&lt;br /&gt;
&lt;br /&gt;
Now you can open the Character Editor under &amp;amp;#8220;view&amp;amp;#8221; in the editor&amp;amp;#8230;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;#8230;and load your character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
The big green arrow shows you the &amp;amp;#8220;forward direction&amp;amp;#8221; in the engine, which all characters should be facing to (Y+).&lt;br /&gt;
&lt;br /&gt;
=== 1st Person Weapon===&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Geometry====&lt;br /&gt;
&lt;br /&gt;
Now that the arms model is ready, we can prepare a weapon to use with it. Here you can see a basic weapon model, with some elements highlighted in red.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To make the weighting process more convenient, you can move away the parts which are meant to be animated later and should get their own bones, by a known amount of units or its multiples. Later after you applied your weighting modifier you can easily move them back to their original position by animating the bones they have been weighted to, the same amount you moved them apart from the main model earlier.&lt;br /&gt;
&lt;br /&gt;
For the geometry the same rules apply like have been pointed out in the arms section.&lt;br /&gt;
No translations should be applied to the geometry, and before applying the weighting modifier do a reset-x-form, and collapse it in the modifier stack, to get rid of unwanted transforms. The pivot should be aligned to the world coordinate center, and the model should point in the positive y-direction.&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Hierarchy====&lt;br /&gt;
&lt;br /&gt;
The same transformation rules should be kept for the bones you create for the weapon hierarchy, or at least to some of them which serve a specific purpose.&lt;br /&gt;
In 3ds max it doesn&amp;amp;#8217;t matter if bones or helpers (dummies) are used to define a hierarchy. The exporter treats them both as bones when they are exported.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
Weapon Term: used to attach the muzzle-flash effects to.&lt;br /&gt;
Shells: used to attach the particle effect for the shells to.&lt;br /&gt;
Collision: used for determining the position of impact when used as a melee weapon.&lt;br /&gt;
Various attachment helpers, which are used to control the position of weapon parts. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-06T09:14:23Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
http://wiki.crymod.com/images/a/ae/FirstPersonCharacters_image001.jpg&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{{Примечание:}}} &amp;lt;br&amp;gt;&lt;br /&gt;
Keep mesh/geometry at the world center with no rotation.&lt;br /&gt;
&lt;br /&gt;
==== Arm Hierarchy====&lt;br /&gt;
&lt;br /&gt;
Below is the hierarchy which will be used to deform the arm&amp;amp;#8217;s geometry. Note that the root, which is the top bone of the hierarchy, is also located at the world centre and has no rotations applied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The three red coloured bones in the lower arms are twist helpers, and are used to help the deformation around the wrist. They have a simple expression applied to them which is connected to the hand&amp;amp;#8217;s bones X- rotation.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now is a good time to set a position and rotation key on all elements of the hierarchy at frame 0. This way you will always have the option to go back to the &amp;amp;#8220;initial Pose&amp;amp;#8221; of the character. &amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the whole arm hierarchy in the schematic view.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
The wrist helpers should be hidden after the envelope operator is applied, so that they won&amp;amp;#8217;t accidentally be animated. This would cause the applied expressions to become ineffective.&lt;br /&gt;
&lt;br /&gt;
There is no need to keep the hierarchy the same structure we used here. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Weighting the Geometry====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Always apply a &amp;amp;#8220;reset x-form&amp;amp;#8221; modifier and collapse it in the modifier stack, before you apply the envelope modifier. This removes unwanted transformations to the geometry, which could cause problems later on.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which operator is used in max doesn&amp;amp;#8217;t matter. You can either use Physique, or Skin to weight your model. Both are supported in the engine.&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Whenever a vertex is influenced by more than two bones, the weighting on the ones with the weakest influence gets deleted and gets normalized between the remaining two bones.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example Skin is used to weight the arms to the bones. The modifier is applied at frame 0, which also defines the &amp;amp;#8220;default pose&amp;amp;#8221; which was keyed earlier. This also defines the default pose in the engine and helps in debugging problems later on in the process.&lt;br /&gt;
&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Bones in the hierarchy which have an underscore at the beginning of their name won&amp;amp;#8217;t be considered by the exporter. This keeps the size of the exported character low. In this case they were only left in the hierarchy to make the selection of links easier, when using the physique modifier.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Character====&lt;br /&gt;
&lt;br /&gt;
Once you have finished weighting the character, you are ready to export the arms to the engine.&lt;br /&gt;
If the plug-ins are installed correctly into your 3dsmax plug-ins folder, you should find the Cryengine exporter in the command panel under utilities.&lt;br /&gt;
Select your arms geometry and hit the &amp;amp;#8220;Add selected&amp;amp;#8221; button in the &amp;amp;#8220;Object Export&amp;amp;#8221; section, if it&amp;amp;#8217;s not already added automatically. In the &amp;amp;#8220;Bone Export&amp;amp;#8221; section it should automatically add the highest node of your hierarchy, &amp;amp;#8220;root&amp;amp;#8221; in this case.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Set the Drop-down-list in the &amp;amp;#8220;Object Export&amp;amp;#8221; section under &amp;amp;#8220;Export To&amp;amp;#8221; to &amp;amp;#8220;Character (*.chr), and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports a compiled version of your object to the same folder your max-file has been saved to. If you want to specify a different name for your character (which is usually generated from the name of the max-file) you can specify one by activating the option below the &amp;amp;#8220;Export To&amp;amp;#8221; drop down list. Exporting is only possible to the same folder that the max-file resides in, or to a sub-folder from that one.&lt;br /&gt;
&lt;br /&gt;
Now you can open the Character Editor under &amp;amp;#8220;view&amp;amp;#8221; in the editor&amp;amp;#8230;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;#8230;and load your character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
The big green arrow shows you the &amp;amp;#8220;forward direction&amp;amp;#8221; in the engine, which all characters should be facing to (Y+).&lt;br /&gt;
&lt;br /&gt;
=== 1st Person Weapon===&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Geometry====&lt;br /&gt;
&lt;br /&gt;
Now that the arms model is ready, we can prepare a weapon to use with it. Here you can see a basic weapon model, with some elements highlighted in red.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To make the weighting process more convenient, you can move away the parts which are meant to be animated later and should get their own bones, by a known amount of units or its multiples. Later after you applied your weighting modifier you can easily move them back to their original position by animating the bones they have been weighted to, the same amount you moved them apart from the main model earlier.&lt;br /&gt;
&lt;br /&gt;
For the geometry the same rules apply like have been pointed out in the arms section.&lt;br /&gt;
No translations should be applied to the geometry, and before applying the weighting modifier do a reset-x-form, and collapse it in the modifier stack, to get rid of unwanted transforms. The pivot should be aligned to the world coordinate center, and the model should point in the positive y-direction.&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Hierarchy====&lt;br /&gt;
&lt;br /&gt;
The same transformation rules should be kept for the bones you create for the weapon hierarchy, or at least to some of them which serve a specific purpose.&lt;br /&gt;
In 3ds max it doesn&amp;amp;#8217;t matter if bones or helpers (dummies) are used to define a hierarchy. The exporter treats them both as bones when they are exported.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
Weapon Term: used to attach the muzzle-flash effects to.&lt;br /&gt;
Shells: used to attach the particle effect for the shells to.&lt;br /&gt;
Collision: used for determining the position of impact when used as a melee weapon.&lt;br /&gt;
Various attachment helpers, which are used to control the position of weapon parts. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0</id>
		<title>Персонажи от первого лица</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0%D0%B6%D0%B8_%D0%BE%D1%82_%D0%BF%D0%B5%D1%80%D0%B2%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B8%D1%86%D0%B0"/>
				<updated>2011-06-06T09:13:34Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Персонаж первого лица==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Обзор ===&lt;br /&gt;
Данный документ рассказывает о создании комплектов оружия, если быть точнее, предоставляет пример оружия, основную анимацию и объясняет процесс экспорта в движок.&lt;br /&gt;
Другие пакеты будут рассмотрены после появления экспотеров для них&lt;br /&gt;
=== Характеристики оружия===&lt;br /&gt;
==== Настройки геометрии====&lt;br /&gt;
http://wiki.crymod.com/images/a/ae/FirstPersonCharacters_image001.jpg&lt;br /&gt;
&lt;br /&gt;
На данном изображении вы видите пример меша пары рук, обычно использующийся для создания вооружения персонадам от первого лица&lt;br /&gt;
&lt;br /&gt;
Локальные трансформации этого меша должны быть нулевыми по всем осям. А центр (&amp;quot;pivot&amp;quot;) располагаться в центре всемирных координат(Position 0,0,0; Rotation 0,0,0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Примечание:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Keep mesh/geometry at the world center with no rotation.&lt;br /&gt;
&lt;br /&gt;
==== Arm Hierarchy====&lt;br /&gt;
&lt;br /&gt;
Below is the hierarchy which will be used to deform the arm&amp;amp;#8217;s geometry. Note that the root, which is the top bone of the hierarchy, is also located at the world centre and has no rotations applied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image002.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The three red coloured bones in the lower arms are twist helpers, and are used to help the deformation around the wrist. They have a simple expression applied to them which is connected to the hand&amp;amp;#8217;s bones X- rotation.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Now is a good time to set a position and rotation key on all elements of the hierarchy at frame 0. This way you will always have the option to go back to the &amp;amp;#8220;initial Pose&amp;amp;#8221; of the character. &amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image003.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the whole arm hierarchy in the schematic view.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image004.jpg]] &lt;br /&gt;
&lt;br /&gt;
The wrist helpers should be hidden after the envelope operator is applied, so that they won&amp;amp;#8217;t accidentally be animated. This would cause the applied expressions to become ineffective.&lt;br /&gt;
&lt;br /&gt;
There is no need to keep the hierarchy the same structure we used here. Also changing the way the wrists are solved is possible.&lt;br /&gt;
&lt;br /&gt;
==== Weighting the Geometry====&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Always apply a &amp;amp;#8220;reset x-form&amp;amp;#8221; modifier and collapse it in the modifier stack, before you apply the envelope modifier. This removes unwanted transformations to the geometry, which could cause problems later on.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image005.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Which operator is used in max doesn&amp;amp;#8217;t matter. You can either use Physique, or Skin to weight your model. Both are supported in the engine.&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Whenever a vertex is influenced by more than two bones, the weighting on the ones with the weakest influence gets deleted and gets normalized between the remaining two bones.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example Skin is used to weight the arms to the bones. The modifier is applied at frame 0, which also defines the &amp;amp;#8220;default pose&amp;amp;#8221; which was keyed earlier. This also defines the default pose in the engine and helps in debugging problems later on in the process.&lt;br /&gt;
&lt;br /&gt;
Only bones which are necessary to deform the mesh in a proper way were added to the bone list in the modifier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image006.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Info:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Bones in the hierarchy which have an underscore at the beginning of their name won&amp;amp;#8217;t be considered by the exporter. This keeps the size of the exported character low. In this case they were only left in the hierarchy to make the selection of links easier, when using the physique modifier.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Character====&lt;br /&gt;
&lt;br /&gt;
Once you have finished weighting the character, you are ready to export the arms to the engine.&lt;br /&gt;
If the plug-ins are installed correctly into your 3dsmax plug-ins folder, you should find the Cryengine exporter in the command panel under utilities.&lt;br /&gt;
Select your arms geometry and hit the &amp;amp;#8220;Add selected&amp;amp;#8221; button in the &amp;amp;#8220;Object Export&amp;amp;#8221; section, if it&amp;amp;#8217;s not already added automatically. In the &amp;amp;#8220;Bone Export&amp;amp;#8221; section it should automatically add the highest node of your hierarchy, &amp;amp;#8220;root&amp;amp;#8221; in this case.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image007.jpg]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
Set the Drop-down-list in the &amp;amp;#8220;Object Export&amp;amp;#8221; section under &amp;amp;#8220;Export To&amp;amp;#8221; to &amp;amp;#8220;Character (*.chr), and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports a compiled version of your object to the same folder your max-file has been saved to. If you want to specify a different name for your character (which is usually generated from the name of the max-file) you can specify one by activating the option below the &amp;amp;#8220;Export To&amp;amp;#8221; drop down list. Exporting is only possible to the same folder that the max-file resides in, or to a sub-folder from that one.&lt;br /&gt;
&lt;br /&gt;
Now you can open the Character Editor under &amp;amp;#8220;view&amp;amp;#8221; in the editor&amp;amp;#8230;&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image008.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;#8230;and load your character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image009.jpg]] &lt;br /&gt;
&lt;br /&gt;
The big green arrow shows you the &amp;amp;#8220;forward direction&amp;amp;#8221; in the engine, which all characters should be facing to (Y+).&lt;br /&gt;
&lt;br /&gt;
=== 1st Person Weapon===&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Geometry====&lt;br /&gt;
&lt;br /&gt;
Now that the arms model is ready, we can prepare a weapon to use with it. Here you can see a basic weapon model, with some elements highlighted in red.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image010.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To make the weighting process more convenient, you can move away the parts which are meant to be animated later and should get their own bones, by a known amount of units or its multiples. Later after you applied your weighting modifier you can easily move them back to their original position by animating the bones they have been weighted to, the same amount you moved them apart from the main model earlier.&lt;br /&gt;
&lt;br /&gt;
For the geometry the same rules apply like have been pointed out in the arms section.&lt;br /&gt;
No translations should be applied to the geometry, and before applying the weighting modifier do a reset-x-form, and collapse it in the modifier stack, to get rid of unwanted transforms. The pivot should be aligned to the world coordinate center, and the model should point in the positive y-direction.&lt;br /&gt;
&lt;br /&gt;
==== The Weapon Hierarchy====&lt;br /&gt;
&lt;br /&gt;
The same transformation rules should be kept for the bones you create for the weapon hierarchy, or at least to some of them which serve a specific purpose.&lt;br /&gt;
In 3ds max it doesn&amp;amp;#8217;t matter if bones or helpers (dummies) are used to define a hierarchy. The exporter treats them both as bones when they are exported.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image011.jpg]] &lt;br /&gt;
&lt;br /&gt;
All those names can be changed code wise of course; the names here are for demonstration purposes.&lt;br /&gt;
&lt;br /&gt;
Weapon Term: used to attach the muzzle-flash effects to.&lt;br /&gt;
Shells: used to attach the particle effect for the shells to.&lt;br /&gt;
Collision: used for determining the position of impact when used as a melee weapon.&lt;br /&gt;
Various attachment helpers, which are used to control the position of weapon parts. (attachment_top; attachment_side; attachment_bottom; etc)&lt;br /&gt;
&lt;br /&gt;
Helpers or bones which don&amp;amp;#8217;t influence elements or parts of the weapon geometry, won&amp;amp;#8217;t need to be added to the deform modifier. Make sure they are added to the hierarchy before exporting the character, or they won&amp;amp;#8217;t be accessible by the engine.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Before a deforming modifier is applied, merge in the arms character from its source max-file, and parent the highest node from the weapon rig under the root bone of the arms character.&lt;br /&gt;
&lt;br /&gt;
[[Image:fixed_FirstPersonCharacters_image012.jpg]] &lt;br /&gt;
&lt;br /&gt;
'''Hint:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When using the Physique modifier chose the highest node in the hierarchy with which you want to deform your mesh upon initialisation.&lt;br /&gt;
&lt;br /&gt;
==== Exporting the Weapon====&lt;br /&gt;
&lt;br /&gt;
After weighting is done, you can export your character to the engine. For this select the mesh of your weapon, go to the Cryengine rollout in the utilities pane of the command panel and add it to the node section. Switch to &amp;amp;#8220;Character&amp;amp;#8221; under &amp;amp;#8220;Export to...&amp;amp;#8221; and click the &amp;amp;#8220;Export Nodes&amp;amp;#8221; button. This exports your character into the same folder as the max file and inherits the name of your max file. You can also specify the name manually using the custom file name option.&lt;br /&gt;
&lt;br /&gt;
In order to view your character in the Character Editor with the mesh skinned to the bones, you have to add them as a &amp;amp;#8220;skin attachment&amp;amp;#8221; by setting the choice to &amp;amp;#8220;skin&amp;amp;#8221; in the attachments properties, selecting the arms object, and then creating a &amp;amp;#8220;new&amp;amp;#8221; attachment.  After you hit &amp;amp;#8220;Apply&amp;amp;#8221; the character is attached to the bones, and becomes visible in the editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image013.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Animations for 1st Person Characters===&lt;br /&gt;
&lt;br /&gt;
==== Preliminary tasks====&lt;br /&gt;
&lt;br /&gt;
In order to have the Resource compiler handling the 1st person weapons correctly you have to create an entry in the animations.cba file. In this file all information concerning your character is stored, i.e. compression ratio of animations, the path to the character etc.&lt;br /&gt;
Here is a sample entry which has all the required settings for a 1st person weapon. For a detailed description of these parameters, see the reference document on the CBA file parameters. (LINK)&lt;br /&gt;
If this entry is missing the exporter won&amp;amp;#8217;t export animations, because it needs to know the location of the character-file.&lt;br /&gt;
&lt;br /&gt;
==== Exporting Animations====&lt;br /&gt;
&lt;br /&gt;
In 3ds max you have two different ways of exporting animations for your character. The easiest way is to set the time range in the timeline to the exact frames of the start and end positions of the animation you want to export.&lt;br /&gt;
It&amp;amp;#8217;s always a good idea to have all animations start and end in a default pose, so that blending in the engine works in a smooth way.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' &amp;lt;br&amp;gt;&lt;br /&gt;
You can also create a free camera at the world coordinate center which is looking in the direction of the positive y-axis. When you set its FOV (field of view) to the same value you use in-game, it becomes an accurate representation of what your animation will look like from the players view.&lt;br /&gt;
You can also use &amp;amp;#8220;link constraints&amp;amp;#8221; on the camera to a helper called &amp;amp;#8220;camera_helper&amp;amp;#8221;, which is parented to the &amp;amp;#8220;root-bone&amp;amp;#8221; of the arms character, and later activate the camera control parameter for specific animations to let them be controlled by this helper. Mind, that the start and end frame of the animation for the camera should always start and end at the world coordinate centre to prevent unwanted &amp;amp;#8220;jumps&amp;amp;#8221; in your animation in the engine, between animations which have this helper activated and those which haven&amp;amp;#8217;t.&lt;br /&gt;
&lt;br /&gt;
Once you set your time range, you can move on to the exporter. Make sure the right object is added in the node section of the objects pane. This should automatically add the root of your character in the &amp;amp;#8220;Bone Export&amp;amp;#8221; list. If not, do so manually.&lt;br /&gt;
Hit the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, enter the desired name of the animation and save it to the folder you entered earlier in the animations.cba file.&lt;br /&gt;
&lt;br /&gt;
To preview your animation in the Character Editor, you have to create one more file which tells the engine which animations are available for this character (a &amp;amp;#8220;cal-file&amp;amp;#8221;).&lt;br /&gt;
Below is the cal-file for the example weapon.&lt;br /&gt;
It has the path of the animations folder in it, and the names of the animations, and their binary counterparts, like they would be called &amp;amp;#8220;on disk&amp;amp;#8221;.&lt;br /&gt;
&lt;br /&gt;
Scar_fp.cal&lt;br /&gt;
&lt;br /&gt;
#filepath = Animations1st_personSCAR_fp&lt;br /&gt;
&lt;br /&gt;
select_01				=	select_01.caf&lt;br /&gt;
fire_bullets_right_01		=	fire_bullets_right_01.caf&lt;br /&gt;
idle_right_01				=	idle_right_01.caf&lt;br /&gt;
reload_01				=	reload_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
zoom_in_ironsight_01			=	zoom_in_ironsight_01.caf&lt;br /&gt;
fire_bullets_right_ironsight_01		=	fire_bullets_right_ironsight_01.caf&lt;br /&gt;
idle_right_ironsight_01			=	idle_right_ironsight_01.caf&lt;br /&gt;
zoom_out_ironsight_01			=	zoom_out_ironsight_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//layers control placement of attachments&lt;br /&gt;
&lt;br /&gt;
silencer_on_layer_01		=	silencer_on_layer_01.caf&lt;br /&gt;
reflex_on_layer_01			=	reflex_on_layer_01.caf&lt;br /&gt;
scope_on_layer_01			=	scope_on_layer_01.caf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file needs to be saved to the same folder the character is saved to, and has to have the same name, except for the file extension, which is &amp;amp;#8220;.cal&amp;amp;#8221;.&lt;br /&gt;
The file path which points to the animations folder is relative to your games root folder.&lt;br /&gt;
Once you entered all available animations into the cal-file, and exported them from 3ds max, they will show up in the &amp;amp;#8220;Available Animations&amp;amp;#8221;-list in the character editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:FirstPersonCharacters_image014.gif]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second option to export animations is to use the &amp;amp;#8220;Sub Ranges&amp;amp;#8221; dialog, in the &amp;amp;#8220;Timing&amp;amp;#8221; pane of the Cryengine exporter. You can add animations into the list, by highlighting the &amp;amp;#8220;new range&amp;amp;#8221; entry and typing the name of your animation. Make sure the start and end times are entered correctly. Check if the root of your character is still showing up in the bone list. When you activate the &amp;amp;#8220;Export file per range&amp;amp;#8221; in the &amp;amp;#8220;sub ranges&amp;amp;#8221; area, after hitting the &amp;amp;#8220;Export Bones&amp;amp;#8221; button, the exporter will ask for a location, and will export any of the entered animations from the &amp;amp;#8220;sub ranges&amp;amp;#8221; &amp;amp;#8211; list.&lt;br /&gt;
&lt;br /&gt;
[[Image:FixFirstPersonCharacters_image015.jpg]]&lt;br /&gt;
&lt;br /&gt;
==== Layered Animations====&lt;br /&gt;
&lt;br /&gt;
Sometimes you might only want to change specific parts of an animation which is used on a hierarchy. One example might be a different pose for the fingers for the right hand, when you want to reuse it for another type of weapon. This is one use for layered animations, which could be activated by code, and overwrite the existing animations on certain parts of your hierarchy.&lt;br /&gt;
&lt;br /&gt;
Layers are also used to control placement of attachments on weapons. In this case the silencer and the magazine are solved as attachments.&lt;br /&gt;
&lt;br /&gt;
To export layered animations you have to make sure that the bone list only contains the highest node of the parts that should be influenced.&lt;br /&gt;
&lt;br /&gt;
Also for these kinds of layers you might only use a static pose. To achieve this activate &amp;amp;#8220;manual range&amp;amp;#8221; in the timing pane of the exporter and set the start and end frame to be the same time.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image016.jpg]] &lt;br /&gt;
&lt;br /&gt;
After the animation is exported and added to the cal-file, you can test it in the Character Editor.&lt;br /&gt;
&lt;br /&gt;
To add an attachment to your character, you have to create a new one in the attachments pane of the Character Editor.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image017.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the attachment properties select Bone Attachment and select the bone you want the object to be attached to from the drop down list. (silencer_attach, in this case).&lt;br /&gt;
After you have selected the correct object from the objects browser, you can create the new attachment and click &amp;amp;#8220;apply&amp;amp;#8221; to load it into the editor. It should show up at the default position of the bone you selected when you created the attachment.&lt;br /&gt;
&lt;br /&gt;
To test the layer, you can activate a primary animation on the base character (i.e. an &amp;amp;#8220;idle&amp;amp;#8221; animation) by selecting one from the &amp;amp;#8220;available animations&amp;amp;#8221; list. Then switch to one of the &amp;amp;#8220;secondary&amp;amp;#8221; animation slots in the character animation pane, and select the layer animation in the list. The parts of the animation which were triggered from the &amp;amp;#8220;primary&amp;amp;#8221; animation on this bone should be overwritten, by the new layered animation.&lt;br /&gt;
&lt;br /&gt;
[[Image:Sandbox_FirstPersonCharacters_image018.jpg]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	<entry>
		<id>http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B</id>
		<title>Хрупкие объекты</title>
		<link rel="alternate" type="text/html" href="http://wiki.crymod.net/index.php/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B5_%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B"/>
				<updated>2011-06-06T08:51:33Z</updated>
		
		<summary type="html">&lt;p&gt;Sodiet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{В_процессе_перевода}}&lt;br /&gt;
&lt;br /&gt;
== Breakable Objects==&lt;br /&gt;
Breakable objects consist of separate pieces which are held together by joints.&amp;lt;br&amp;gt;&lt;br /&gt;
The single parts can be separately disjointed, by applying physical force (bullets, player interaction, explosions) bigger than the joint limits.&amp;lt;br&amp;gt;&lt;br /&gt;
In general, Breakable objects are placed in Sandbox as brushes &amp;lt;br&amp;gt;&lt;br /&gt;
A perfect example for a breakable objects would be a road sign, a wooden fence, or a wooden shag.&lt;br /&gt;
&lt;br /&gt;
==== Table of Content====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sample File===&lt;br /&gt;
&lt;br /&gt;
Sample File:  [http://wiki.crymod.com/images/5/5b/Breakable_example.max Breakable-Example]&lt;br /&gt;
&lt;br /&gt;
=== General Setup in 3d applications===&lt;br /&gt;
* The objects must have several nodes in max, each with its own physics.&lt;br /&gt;
* Nodes are held together with joints (each joint can connect only 2 parts). &lt;br /&gt;
* Naming convention for Joints: $joint01, $joint02,... &lt;br /&gt;
* Joints are represented in the 3d application with helper objects (dummies, Nulls..). They need to intersect with the physics proxy of 1 or max. two geometry objects.&lt;br /&gt;
* The Z-orientation of the joint pivot should normally point upward (see Debug section)&lt;br /&gt;
* Alternatively, one can explicitly specify part names in the joint name using this format: $joint1_part1_part2. This can be useful at complicated junctions where geometrical intersections can find more than 2 parts&lt;br /&gt;
* When a joint object intersects only with one node, a joint between the object and the world is created.&lt;br /&gt;
* The size of the dummy object does _not_ have any effect on the strength.&lt;br /&gt;
* It is, however, used to re-attach joints to broken parts if some geometries also have procedural breaking on (namely: when a part breaks procedurally, all joints that are attached to it are checked for intersections with the newly formed pieces, and are re-attached to them if needed)&lt;br /&gt;
* The strength of the joints and the mass of the separate are defined in the node properties (different name in every 3d application; in 3ds: objects Properties)&lt;br /&gt;
* Specific joint limits are relative to the joint's normal, represented by the helper node's *z* axis. For joints that specify part names explicitly, care must be taken that the normal points into the 1st parts (otherwise push and pull limits will switch meanings)&lt;br /&gt;
* Turn OFF &amp;quot;Merge All Nodes&amp;quot; on export&lt;br /&gt;
* Objects can be placed as brush or geom. Entity &lt;br /&gt;
&lt;br /&gt;
* example for dummy placement&lt;br /&gt;
 [[Image:PrebrokenObject dummyplacement.jpg]]&lt;br /&gt;
&lt;br /&gt;
* Example for joint properties&lt;br /&gt;
 [[Image:PrebrokenObject objectproperties.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time an external force (from collisions with other objects, or bullet hits) is applied to the object, the system calculates internal forces needed to hold the object parts together, and if some forces breach the threshold, the corresponding joints are removed. Then part connectivities via remaining joints are recomputed and isolated islands are moved to new entities.&lt;br /&gt;
&lt;br /&gt;
==== Node Properties====&lt;br /&gt;
The nodes need properties attached (depending on software) to work correctly in the engine.&lt;br /&gt;
&lt;br /&gt;
*entity (render geometry property)&amp;lt;br&amp;gt;&lt;br /&gt;
If the render geometry properties include &amp;quot;entity&amp;quot;, the object will not fade out after being disconnected from the main object. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*box (render geometry property)&amp;lt;br&amp;gt;&lt;br /&gt;
If the render geometry properties include &amp;quot;box&amp;quot;, the engine will use a simple box (based on the bounding box of the object's physics proxy) as the collision geometry. This helps speeding up physics calculation. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*mass=VALUE (render geometry property)&amp;lt;br&amp;gt;&lt;br /&gt;
Mass defines the weight of an object based on real world physics&amp;lt;br&amp;gt;&lt;br /&gt;
mass=0 sets the object to &amp;quot;unmovable&amp;quot;. This is used on the basement of a house for example or the sign pole which should not be movable and always stay in the original position. When used in brushes and Geom Entities, this is the final part's mass. When used in regular Entities, all parts masses are scaled so that their total mass gives the mass specified in the entity properties.&lt;br /&gt;
*CAUTION* You must either define this value or density to ensure the simulation is working correctly.&lt;br /&gt;
&lt;br /&gt;
*density=VALUE&lt;br /&gt;
The engine automatically calculates the mass for an object based on the density and the bounding box of an object.&lt;br /&gt;
Can be used alternatively to mass.&lt;br /&gt;
&lt;br /&gt;
*limit=VALUE (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
limit is a general value for several different kind of forces applied to the joint. It contains a combination of the values below.&amp;lt;br&amp;gt;&lt;br /&gt;
CAUTION This value needs to be defined, otherwise the simulation will not work correctly.&lt;br /&gt;
Crysis Example values: 100 - 500 can be broken by a bullet; 10000 can be broken by the impact of a driving vehicle or a big explosion.&lt;br /&gt;
&lt;br /&gt;
The following values are optional and are used to fine tune the &amp;quot;limit&amp;quot; settings.&amp;lt;br&amp;gt;&lt;br /&gt;
*bend=VALUE  (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
maximum torque around an axis perpendicular to the normal.&lt;br /&gt;
&lt;br /&gt;
*twist=VALUE (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
maximum torque around the normal&lt;br /&gt;
&lt;br /&gt;
*pull=VALUE (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
maximum force applied to the joint&amp;amp;#8217;s 1st object against the joint normal (the parts are &amp;quot;pulled together&amp;quot; as a reaction to external forces pulling them apart)&lt;br /&gt;
&lt;br /&gt;
*push=VALUE (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
maximum force applied to the joint's 1st object (i.e. the one whose name is listed first in the joint's name, or if the names were not specified, the object the joint's z axis points towards) along the joint normal; joint normal is the joint's z axis, so for this value to actually be &amp;quot;push apart&amp;quot; (as a reaction to external forces pressing the parts together), this axis must be directed inside the 1st object&lt;br /&gt;
&lt;br /&gt;
*shift=VALU  (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
maximum force in the direction perpendicular to normal&lt;br /&gt;
&lt;br /&gt;
Addition: joints also support non-fully-rigid (non-6dof) constraints. A full rigid constraint will become a dynamic constraint if its either bend and twist limit gets broken and the joint has a non-0 &amp;quot;constrant_limit&amp;quot; property.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Broken &amp;quot;bends&amp;quot; will become &amp;quot;socket&amp;quot; constraints, and &amp;quot;twists&amp;quot; will become hinges. The newly created dynamic constraint will inherit pull and shift limits from the joint. The constraint&amp;amp;#8217;s frame will be that of the joint&amp;amp;#8217;s helper in max. In order to preserve the meaning of &amp;quot;twisting&amp;quot;, however, the axes will be swapped (z of the joint's helper will become the constraint's x - since both represent the &amp;quot;twising&amp;quot; axis, x will become y, and y wil become z). Thus, for hinges, z asis of the helper should be directed along the desired hinge direction. For socket's, z axis should be the axis the attached part &amp;quot;bends around&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the list of related properties:&amp;lt;br&amp;gt;&lt;br /&gt;
*constraint_limit=VALUE  (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
Force limit for the newly created constraint, is checked when the constraint hits a rotation limit and is being pushed further&lt;br /&gt;
&lt;br /&gt;
*constraint_minang=VALUE (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
*constraint_maxang=VALUE  (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
Rotation limits for the constraint (the interpretation is the same as in standalone constraints). The default is no limits&lt;br /&gt;
&lt;br /&gt;
*constraint_damping=VALUE  (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
Angular damping (default 0)&lt;br /&gt;
&lt;br /&gt;
*constraint_collides=VALUE  (Joint object property)&amp;lt;br&amp;gt;&lt;br /&gt;
Whether the constraint parts will ignore collisions with each other (default 1)&lt;br /&gt;
&lt;br /&gt;
For example, to quickly create an unbreakable hinge constraint, one should put this into the joint&amp;amp;#8217;s properties:&amp;lt;br&amp;gt;&lt;br /&gt;
twist = 0 (the constraint will created at the first activation, regardless of force)&amp;lt;br&amp;gt;&lt;br /&gt;
constraint_limit = 1E20 (just something big enough)&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the general &amp;quot;limit = xx&amp;quot; is not required, since we want the limits other than twist to remain unbreakable.&amp;lt;br&amp;gt;&lt;br /&gt;
Also note that the nodes that have dynamic constraints between them should always be physicalized as entities (not particles).&lt;br /&gt;
&lt;br /&gt;
==== Dissolving into particlespieces====&lt;br /&gt;
Jointed Objects can be set up to break in smaller pieces when being detached from the joint. i.e. a wooden sheet breaks into several planks. &lt;br /&gt;
The object properties must contain the information about the pieces used. i.e. &amp;quot;pieces=$blah1&amp;quot;, &amp;quot;pieces=$rock1&amp;quot;.&lt;br /&gt;
Several objects can share the same name, but it is also possible to set up the pieces with different names, i.e. &amp;quot;pieces=$blah1,$blah2&amp;quot;. &lt;br /&gt;
Pieces need to be linked to the object they should replace later on.&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: make sure the names of the objects you want to use as pieces are  in lower case only i.e. $debris or $piece1. Debris would not work.&lt;br /&gt;
&lt;br /&gt;
WARNING Be aware that the search function in the code also returns nodes with only partially matching strings. If you have problems with pieces spawning out of nowhere or existing nodes being cloned for no reason, look into the name strings and change them to avoid this issue.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you don't specify anything in the piece properties, they will be spawned as particles, which means they will have no collision and will disappear after a few seconds. If you want the pieces to behave like actual physicalized objects, you have to add &amp;quot;entity&amp;quot; into their properties box.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Sample setup&lt;br /&gt;
 [[Image:PrebrokenObject pieces thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
Practical examples of how pieces can be used:&lt;br /&gt;
&lt;br /&gt;
- Optimization: If you create a dummy object with a nodraw material (like a simple cube) and spawn it as a piece, the jointed object will simply disappear once the joint breaks - it will be replaced by an invisible object. This can be helpful since the piece that is broken off will not fall down and interact with the remaining pieces, potentially causing problems, and it is also beneficial performance-wise. Once the original object is seperated from its joint, no further physics calculations will be necessary.&lt;br /&gt;
&lt;br /&gt;
- Adding dynamic detail: Pieces replace their original object once this object is &amp;quot;broken off&amp;quot; (seperated from it's joint), so you can take the original object and cut it up into smaller pieces. An example of this is the huts in crysis, most roof panels have two sub-pieces that spawn once the panel breaks off. This results in more detailed breaking and smaller debris. Don't forget to add &amp;quot;entity&amp;quot; and a realistic mass to the piece properties, and make sure the piece is physicalized, or else the pieces will fall through the ground and/or disappear after a few seconds. (in case they are only small &amp;quot;fluff&amp;quot; pieces, this might actually be intended)&lt;br /&gt;
&lt;br /&gt;
- Adding static detail: You can also spawn small debris pieces, that, instead of falling down, stay where they appear (for example steel cables sticking out of a concrete wall). To do this, you have to add the following lines to the properties of the piece: &lt;br /&gt;
&lt;br /&gt;
entity&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
mass=0&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
density=0&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Entity because you want the object to stay where it is once it is spawned, and because you want it to be physicalized. The object needs to be physicalized (i.e. contain polygons with a physicalized material) in order for this to work.&lt;br /&gt;
Mass and density need to be 0 to assign the objects infinite mass, which results in the object staying where it spawns and not reacting to force. If it wasn't 0, it would fall down upon spawning.&lt;br /&gt;
&lt;br /&gt;
==== Level of detail settings====&lt;br /&gt;
LodCreation per object can easily be added by naming them $lod1; $lod2, $lod3... and linking them to the relevant subobjects. In order to make differentiation easier, a postfix can be added; i.e. &amp;quot;$lod1_wooden plank&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Occlusion Proxy====&lt;br /&gt;
An OcclusionProxy can be added by naming it $occlusion and linking it to the relevant jointed object; like a big sheet of metal on a metal fence or a wooden wall on a hut. Occlusion proxy is allowed to have open edges and need to be as low as possible (something around 2-10 polys).&lt;br /&gt;
&lt;br /&gt;
==== Instancing within breakable objects====&lt;br /&gt;
[[AssetCreation_InstancingObjects]] Instancing objects] is used to optimize render time by reducing drawcalls and memory consumption. &lt;br /&gt;
The engine automatically detects identical geometry elements within the exported objects. &amp;lt;br&amp;gt;&lt;br /&gt;
There is no special setup needed to take advantage of this feature. UVs and relative point position to the pivot need to be identical in objects in order to qualify them for instancing.&lt;br /&gt;
&lt;br /&gt;
==== Linking Objects to simplify export====&lt;br /&gt;
Linked objects don&amp;amp;#65533;t need to be exported, just the Root node needs to be added to the exporter list. All child nodes will automatically be exported. The name and pivot will be derived from the root joint.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Example of linking objects and joints for simpler export&lt;br /&gt;
 [[Image:PrebrokenObject NamingAndHierarchy.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Setup in Sandbox===&lt;br /&gt;
&lt;br /&gt;
Add the object as a brush or a Geom. Entity. In case of a brush, the engine will detext automatically that the object is breakable.&lt;br /&gt;
For multiplayer where breaking objects has a massive impact on the data transfer, breakability is automatically disabled (might change later)&lt;br /&gt;
&lt;br /&gt;
=== Debugging===&lt;br /&gt;
* p_debug_joints 1 shows the default debug mode for joints (see picture below); p_draw_helpers needs to be activated&lt;br /&gt;
* CAUTION Never scale a joint If you need a new size, create a new joint. the scaling value will be passed on to the engine and  causes wrong results in the simulation.&lt;br /&gt;
* The &amp;quot;spikes&amp;quot; on the joint objects show the orientation. For limits to properly reflect their names (i.e. pull, twist, etc), the spikes must be directed along the &amp;quot;natural&amp;quot; joints axes. However, it's also possible to keep them always pointing up, for consistency.&lt;br /&gt;
* The blue colored numbers show the mass of the single pieces. Note the &amp;quot;0.00kg&amp;quot; this is the mass of the top node - in this case a dummy.&lt;br /&gt;
* Joints linked to the world are displayed red.&lt;br /&gt;
* When a force is applied to a joint, the direction is shown (in this case shift and bend), together with the strength and the limit of the particular joint. Green text represents an impact with an impulse much lower then the joint limit. Yellow represents  values closer to the joint limit. Red represents values which were higher than the limit - in this case the joint is broken.&lt;br /&gt;
* NOTE: the debug mode is handy to see how the impulse of weapons react with the breakable object. set the general limit first and then fine tune the specific limits by setting them explicitly for shift, bend...&lt;br /&gt;
&lt;br /&gt;
* Example of debug display&lt;br /&gt;
 [[Image:PrebrokenObject sign example thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Official:Asset_Creation:Basics]]&lt;/div&gt;</summary>
		<author><name>Sodiet</name></author>	</entry>

	</feed>