Model export tutorial

From Mod Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 18:48, 5 February 2008 (edit)
Bac9-flcl (Talk | contribs)
(New page: ==Создание моделей и добавление в игру== Итак, для работы нам понадобятся следующие инструменты: * '''Autode...)
← Previous diff
Current revision (19:15, 5 February 2008) (edit) (undo)
Bac9-flcl (Talk | contribs)

 
(7 intermediate revisions not shown.)
Line 1: Line 1:
-==Создание моделей и добавление в игру==+For a work with the model, we need following software:
-Итак, для работы нам понадобятся следующие инструменты:+* '''Autodesk 3D Studio Max 6''', '''7''' or '''8''' (on another versions work of export plug-in may appear buggy and unstable)
- +* '''3DS Max STALKER Plug-In''' for export to object format (.obj)
-* '''Autodesk 3D Studio Max''' версий '''6''','''7''' или '''8''' (на других вроде плагин экспорта не работает, но я не уверен)+
-* '''3DS Max STALKER Plug-In''' для экспорта в формат object (.obj)+
* '''S.T.A.L.K.E.R. SDK''' * '''S.T.A.L.K.E.R. SDK'''
-При создании собственных текстур потребуется:+For the textures we'll need:
* '''Adobe Photoshop''' * '''Adobe Photoshop'''
-* '''DDS-плагин''' от nVidia+* '''DDS Plug-in for Photoshop''' by '''nVidia'''
-Приступим к креативу. Пример будем рассматривать на примитивной модели кубика.+Let's start. For example, we'll try to export a simple primitive like cube.
-'''1)''' Запускаем 3DS Max и создаем наш кубик.+'''1)''' Open '''3DS Max''' and create the cube.
-[[Изображение:Model_Tutorial_1.jpg]]+[[Image:Model_Tutorial_1.jpg]]
-'''2)''' Далее накладываем на него текстуру. Запускаем редактор материалов (кнопка «М» по дефолту), выбираем тип материала, нажав на кнопку Standart (1), и в раскрывшемся списке выбираем S.T.A.L.K.E.R. Mtl (2), далее, в свитке Blinn Basic Parameters, щелкаем на маленькую кнопку напротив Diffuse (3), в раскрывшемся списке выбираем Bitmap (4), и выбираем требуемую текстуру из папки gamedata нашего SDK. Для примера я выбрал ...gamedata\textures\wpn\wpn_pkm_lenta.dds.+'''2)''' Open '''Material Editor''' («М» button by default), choose material type by pressing on '''Standart''' (1) button. Choose '''S.T.A.L.K.E.R. Mtl''' (2) in the opened list. Then, in '''Blinn Basic Parameters''' section, click on the small button near '''Diffuse''' (3), then, in opened list choose '''Bitmap''' (4), and select suitable texture from '''gamedata''' folder of our '''SDK'''. For example, I used '''gamedata\textures\wpn\wpn_pkm_lenta.dds'''.
-Далее назначаем нашу текстуру для кубика и настраиваем ее внешний вид либо в самом Редакторе Материалов, либо, если объект сложный, - модификатором Unwrap UVW (кто работает в 3DS Max - знает). +Then, we need to apply our texture to cube and configure it's visual settings: in '''Material Editor''', or, if the object is detailed, - with '''Unwrap UVW''' tool.
-[[Изображение:Model_Tutorial_2.jpg]]+[[Image:Model_Tutorial_2.jpg]]
-'''3)''' После текстуривания нашего объекта отмасштабируем его до нормальных размеров игры (для облегчения этого процесса я импортирую в сцену какую-нибудь модель из игры, например, АК-74), и приступаем к созданию костей. +'''3)''' After texturing, we need to change size of our object to give it a normal looking ingame (not a skyscraper, eh). To make it easier, I imported one of the game models to the scene, for example, AK74. Now, let's work with bones.
-Идем в Create -> Systems -> Bones и создаем пару костей внутри нашей коробки приблизительно такого вида (см. рисунок). Первую косточку обзываем, например, kost, вторую можно не трогать и вообще ее можно потом удалить.+Choose '''Create -> Systems -> Bones''' and create a pair of bones inside our box (placed as on the picture). Name the first bone (for example, "kost"). Leave second, it's not needed yet.
-[[Изображение:Model_Tutorial_3.jpg]]+[[Image:Model_Tutorial_3.jpg]]
-'''4)''' Теперь выделяем нашу коробку и в закладке Modify добавляем ей модификатор Physique (1). В свертке модификатора жмем кнопку Attach to Node (2), кликаем по нашей косточке с именем kost и в развернувшемся списке выбираем Riquid (3) и жмем Initialize (4) (см. рисунок).+'''4)''' Select our box. Open '''Modify''' section, and add '''Physique''' (1) modifier to it. In modifier settings, choose '''Attach''' to '''Node''' (2), then click on our bone named "kost", and choose '''Riquid''' (3) in opened list. Then, click '''Initialize''' (4).
-[[Изображение:Model_Tutorial_4.jpg]]+[[Image:Model_Tutorial_4.jpg]]
-'''5)''' Далее, в свитке Physique level of Detail меняем параметр Skin Update на Rigid, в дереве модификатора Physique выбираем вершины нашего объекта (Vertex), выделяем все вершины нашего кубика при нажатой кнопке Select, выбираем тип вершин Rigid (4), жмем кнопку Assign to Link (5) и кликаем по нашей косточке.+'''5)''' Next, in '''Physique''' level of '''Detail''' section, change '''Skin Update''' parameter to '''Rigid''', then, in '''Physique''' modifier tree choose the vertexes of our object with pressed '''Select''' button. Choose vertex type: '''Rigid''' (4), press '''Assign to Link''' (5), and click on our bone.
-[[Изображение:Model_Tutorial_5.jpg]]+[[Image:Model_Tutorial_5.jpg]]
-'''6)''' Теперь все готово к экспорту в формат object (.obj), который понимает Actor Editor из SDK. Идем на закладку Utilites и жмем кнопку S.T.A.L.K.E.R. Export (1) (кнопка эта у вас там будет находиться при правильной настройке плагина). Выделяем наш кубик и жмем кнопку Export Skin. Сохраняем, наблюдая лог в окошке на отсутствие ошибок.+'''6)''' Now, all ready for export to object format (.obj), which is understood by '''Actor Editor''' from '''SDK'''. Open '''Utilites''' section, press '''S.T.A.L.K.E.R. Export''' (1) button (this button will present only if the plugin was configured right). Select our box and choose '''Export Skin'''. Save. Look at the log - are there no errors?
-[[Изображение:Model_Tutorial_6.jpg]]+[[Image:Model_Tutorial_6.jpg]]
-'''7)''' Запускаем Actor Editor из комплекта SDK и загружаем нашу сохраненную модель и видим приблизительно следующую картину:+'''7)''' Open '''Actor Editor''' from '''SDK''', and load our saved model. We'll see something like that:
-[[Изображение:Model_Tutorial_7.jpg]]+[[Image:Model_Tutorial_7.jpg]]
-'''8)''' В панели Object Items видим характеристики нашего объекта (нас интересуют только Surfaces и Bones). В Surfaces задаются материалы и шейдеры для нашего объекта. Раскрываем список Surfaces, выбираем 01-Default (это я забыл материал в Максе обозвать) и устанавливаем параметры:+'''8)''' On '''Object Items''' panel, we see our object settings (we're interested only in '''Surfaces''' and '''Bones'''). Materials and shaders are set in '''Surfaces'''. Open '''Surfaces''' list, choose '''01-Default''' (I forgot to name that material during my work in 3DSMax), and set the following parameters:
* '''Shader:''' models/model * '''Shader:''' models/model
Line 60: Line 58:
-[[Изображение:Model_Tutorial_8.jpg]]+[[Image:Model_Tutorial_8.jpg]]
- +
-'''9)''' Видимо использовать можно и другие, но я еще не разобрался до конца.+
- +
-Далее настраиваем нашу косточку. Раскрываем список Bones, выбираем нашу kost. Далее жмем напротив Generate Shape кнопку All, настраиваем вес параметром Mass, можно настроить материал параметром Game Material (я оставил default_object) затем выбираем тип баунд_бокса нажатием кнопки Type. Я выбрал Box. Его кстати можно потом вращать, двигать и масштабировать.+
-[[Изображение:Model_Tutorial_9.jpg]]+'''9)''' Now, we need to configure our bone. Open the Bones list, and choose our "kost". Click on the '''All''' button near the '''Generate Shape''', configure the weight with '''Mass''' parameter. You can set the material with '''Game Material''' parameter (I didn't touch that, just keep '''default_object''') then choose '''bound_box''' type with pressing the '''Type''' button. I used the '''Box'''. You can rotate it, change it size, etc.
-'''10)''' После настройки параметров экспортируем нашу коробочку в .ogf-файл из меню File -> Export, и подменяем полученной моделью, например, болт. Далее ходим и швыряемся магазинами от ПКМ в головы зазевавшимся неписям :)+[[Image:Model_Tutorial_9.jpg]]
-==Авторы==+'''10)''' Now, when all parameters are set, export our box to .ogf-file with '''File -> Export''', and use our model as the visual for something (for example, bolt). Then walk and throw these things to NPC :)
-'''Статья создана:''' [[Участник:tambovski|tambovski]].+==Authors==
-'''Копирование без разрешения автора запрещено.''' [http://www.amkmod.ru AMK Mod Team]+'''Article created by''' [[Участник:tambovski|tambovski]]<br>
 +[http://www.amkmod.ru AMK Mod Team]
[[Category:Articles]] [[Category:Articles]]

Current revision

For a work with the model, we need following software:

  • Autodesk 3D Studio Max 6, 7 or 8 (on another versions work of export plug-in may appear buggy and unstable)
  • 3DS Max STALKER Plug-In for export to object format (.obj)
  • S.T.A.L.K.E.R. SDK

For the textures we'll need:

  • Adobe Photoshop
  • DDS Plug-in for Photoshop by nVidia

Let's start. For example, we'll try to export a simple primitive like cube.

1) Open 3DS Max and create the cube.


Image:Model_Tutorial_1.jpg

2) Open Material Editor («М» button by default), choose material type by pressing on Standart (1) button. Choose S.T.A.L.K.E.R. Mtl (2) in the opened list. Then, in Blinn Basic Parameters section, click on the small button near Diffuse (3), then, in opened list choose Bitmap (4), and select suitable texture from gamedata folder of our SDK. For example, I used gamedata\textures\wpn\wpn_pkm_lenta.dds.

Then, we need to apply our texture to cube and configure it's visual settings: in Material Editor, or, if the object is detailed, - with Unwrap UVW tool.


Image:Model_Tutorial_2.jpg

3) After texturing, we need to change size of our object to give it a normal looking ingame (not a skyscraper, eh). To make it easier, I imported one of the game models to the scene, for example, AK74. Now, let's work with bones.

Choose Create -> Systems -> Bones and create a pair of bones inside our box (placed as on the picture). Name the first bone (for example, "kost"). Leave second, it's not needed yet.


Image:Model_Tutorial_3.jpg

4) Select our box. Open Modify section, and add Physique (1) modifier to it. In modifier settings, choose Attach to Node (2), then click on our bone named "kost", and choose Riquid (3) in opened list. Then, click Initialize (4).


Image:Model_Tutorial_4.jpg

5) Next, in Physique level of Detail section, change Skin Update parameter to Rigid, then, in Physique modifier tree choose the vertexes of our object with pressed Select button. Choose vertex type: Rigid (4), press Assign to Link (5), and click on our bone.


Image:Model_Tutorial_5.jpg

6) Now, all ready for export to object format (.obj), which is understood by Actor Editor from SDK. Open Utilites section, press S.T.A.L.K.E.R. Export (1) button (this button will present only if the plugin was configured right). Select our box and choose Export Skin. Save. Look at the log - are there no errors?


Image:Model_Tutorial_6.jpg

7) Open Actor Editor from SDK, and load our saved model. We'll see something like that:


Image:Model_Tutorial_7.jpg

8) On Object Items panel, we see our object settings (we're interested only in Surfaces and Bones). Materials and shaders are set in Surfaces. Open Surfaces list, choose 01-Default (I forgot to name that material during my work in 3DSMax), and set the following parameters:

  • Shader: models/model
  • Compile: def_shaders/def_vertex
  • Game Mtl: objects/small_box


Image:Model_Tutorial_8.jpg

9) Now, we need to configure our bone. Open the Bones list, and choose our "kost". Click on the All button near the Generate Shape, configure the weight with Mass parameter. You can set the material with Game Material parameter (I didn't touch that, just keep default_object) then choose bound_box type with pressing the Type button. I used the Box. You can rotate it, change it size, etc.

Image:Model_Tutorial_9.jpg

10) Now, when all parameters are set, export our box to .ogf-file with File -> Export, and use our model as the visual for something (for example, bolt). Then walk and throw these things to NPC :)

Authors

Article created by tambovski
AMK Mod Team

Personal tools