Difference between revisions of "Creating cloth"
From XStoryPlayer Wiki
Line 30: | Line 30: | ||
Run the filemaker and the new cloth objects should be created in the <code>/scenes/character6</code> directory. | Run the filemaker and the new cloth objects should be created in the <code>/scenes/character6</code> directory. | ||
</li> | </li> | ||
+ | <li>We can use [[XStoryPlayer]] to view and position the newly created dress.<br> | ||
+ | Edit the <code>[[settings.ini]]</code> like this:<br> | ||
+ | <syntaxhighlight lang="cpp"> | ||
+ | runtime | ||
+ | { | ||
+ | start_mode = TEST; // Start test mode of XStoryPlayer | ||
+ | debug_sys = BASIC; | ||
+ | debug_render = NONE; | ||
+ | debug_phys = NONE; | ||
+ | debug_brain = ENABLED; | ||
+ | |||
+ | pack2 = "pack/pack_abducted"; // Use this directory as source as well | ||
+ | |||
+ | save_key = ""; | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | <code> | ||
</ol> | </ol> |
Revision as of 14:23, 14 January 2015
In this tutorial you will learn how to create/change cloth. You will also learn how to use XStoryPlayer for storing cloth states.
Steps
- Copy the
/sources/scenes
for this tutorial from the 'Tutorial resource pack' to the/pack/pack_adbucted/sources
directory.
The files contains the textures and maya cloth meshes for the Saiko (Alien) character.
Open thebody.ma
file in Maya. Also open thebody.ini
file in a text editor.
- A cloth needs two meshes to work. A bind-mesh that contains the actual pattern of the cloth. If we change this mesh the shape of the cloth is changed.
Then there is also a render-mesh that is used for rendering the cloth. It has a higher sub-division level for more detail.
The dress for example has bind-mesh "dressBindShape" and render-mesh "dressShape".
The render-mesh needs to be positioned around the character so it does not intersect. - In this tutorial we want to change the shape of the dress a bit. We can use the bind-mesh for that.
Change the "dressBindShape" so it looks somewhat like this:
Save thebody.ma
file. Add the maya convert code to thestart.ini
of the filemaker:
Maya scene { src_path = "[SOURCES]"; run_path = "[RUNTIME]"; in_file = "[SOURCES]scenes/character6_cloth/body.ma"; }
Run the filemaker and the new cloth objects should be created in the
/scenes/character6
directory. - We can use XStoryPlayer to view and position the newly created dress.
Edit thesettings.ini
like this:
runtime { start_mode = TEST; // Start test mode of XStoryPlayer debug_sys = BASIC; debug_render = NONE; debug_phys = NONE; debug_brain = ENABLED; pack2 = "pack/pack_abducted"; // Use this directory as source as well save_key = ""; }
</ol>