openclonk/docs/sdk/renderclonk.xml

79 lines
12 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE doc
SYSTEM '../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../clonk.xsl"?>
<doc>
<title>Blender clonk</title>
<h id="Blenderclonk">Blender clonk</h>
<part>
<text>This tutorial explains how to use the clonk model for Blender.</text>
<h id="WichtigeDateien">Important files:</h>
<text><img src="../images/DownloadBlender.jpg" height="50" width="95" /></text>
<text>Of course we need Blender! Without Blender we cannot do anything. So if you do not have Blender yet then download and install it from <a href="http://www.blender.org">www.blender.org</a>.</text>
<text>Blender installed? Great, so let's continue...</text>
<text>
The main file is <strong>Clonk.blend</strong>. It contains the armature object (skeleton of the Clonk) and the scripts. To create the graphics <strong>Anigrab.exe</strong> is required which should be in the same directory as the .blend file. Also, to be able to execute the scripts, a python installation is required. It can be downloaded from <a href="http://www.python.org/">www.python.org</a>. Then there are four important <strong>subfolders</strong>:
<ul>
<li>In the folder <strong>Actions</strong> all animations needed for the individual clonks are stored as .anim files.</li>
<li>The folder <strong>Clonk</strong> contains .mesh files which contain the meshes of the individual Clonks. In the corresponding .act files the sequence of actions is contained, in the same order as they should appear in the final Graphics.png output.</li>
<li>The <strong>Tools</strong> folder contains tools for the animations. These are the tools that the clonk can use for various animations such as shovel or hammer.</li>
<li>Finally the generated Graphics.png files are stored in the <strong>Graphics</strong> folder.</li>
</ul>
</text>
<h id="ClonkLaden">Loading the Clonk:</h>
<text>To launch the Render clonk the Clonk.blend file needs to be opened. In the lower right corner the Script GUI becomes visible (user interface of the scripts).</text>
<text>Using <strong>"Load Clonk"</strong> a Clonk can be loaded from the Clonks subfolder. The button next to it <img src="../images/DropDown.png" width="10" height="12"/> allows to quickly choose a Clonk via a menu.</text>
<text><strong>"Import Mesh"</strong> assists in importing a Clonk (see the Import section).</text>
<h id="Hauptmenu">Main menu</h>
<text><img src="../images/MainMenu.png" height="221" width="169" /></text>
<text>
In the main menu there are the following buttons:
<ul>
<li><strong>Action:</strong> allows to edit various settings for the action.</li>
<li><strong>Clonk:</strong> the action list of the Clonk can be edited in this section.</li>
<li><strong>Save/Load:</strong> actions and tools can be saved and loaded from here.</li>
<li><strong>Render:</strong> allows to Render the Clonk.</li>
<li><strong>Exit:</strong> return back to the previous menu to load another clonk.<br /><strong>Attention:</strong> the Clonk will not be saved, any unsaved changes will be lost!</li>
</ul>
Additionally there is a text entry which allows to specify the path to the temp directory.
</text>
<h id="Action">Action</h>
<text><img src="../images/ActionMenu.png" height="221" width="169" /></text>
<text>By using the drowdown menu at the top various <strong>Actions</strong> can be chosen. If the armature object is selected the keyframes of the individual bones appear in the action window. In the fields below the <strong>Length</strong> of the action can be specified, i.e. the number of frames of the action, as well as the <strong>Width (X)</strong> and the <strong>Height (Y)</strong> of the individual frame graphics. Additionally up to two <strong>Tools</strong> to be used by the clonk during the action can be specified. They are mapped to the bones <strong>'Tool1'</strong> or <strong>'Tool2'</strong>, respectively.</text>
<text><strong>Rename</strong> allows to rename the action. <strong>New</strong> creates a new action, either one containing the keyframes of the old action or one that does not. The lower button can be used to <strong>save</strong> the action. This should always be done when keyframes or other settings of the action have been changed. The action is then saved in the Actions subfolder.</text>
<h id="Clonk">Clonk</h>
<text><img src="../images/ClonkMenu.png" height="280" width="177" /></text>
<text>The list of the Clonk's actions is shown here. If more than one column are displayed then the columns to the right contain actions which originate from the actions contained in the column to the left of it. Since often there is not enough space to show all actions the window can be made fullscreen by clicking on <img src="../images/ButtonFullScreen.png" width="52" height="17"/>. Another click on this button restores the original window size again.</text>
<text>To modify the list one can click on an action and then select another one instead. <strong>REMOVE</strong> removes the action from the list. <strong>INSERT</strong> inserts a new action above the selected one. Actions with a U in front of them are not yet contained in the list. The separated at the lower end of the list contains the action that is used for the <strong>Picture graphics</strong> of the Clonk.</text>
<text>Below the <strong>BaseZoom</strong> can be modified. This is the zoom setting of the camera and is required if a mesh is too big and needs to be displayed smaller, or vice versa. Normally this setting is not needed however. The bottommost button <strong>saves</strong> the action list and the mesh of the clonk.</text>
<text><strong>Attention:</strong> the Clonks must always consist of a <strong>single</strong> mesh only! If there are two meshes then they can be combined via Ctrl+J.</text>
<text>Also the Clonk always needs to be saved using the script interface instead of the normal save functionality of Blender. However some exotic settings will not be exported this way. So if, after loading, a certain modifier or a certain texture setting is not activated then it is because this feature is not supported.</text>
<h id="SaveLoad">Save/Load</h>
<text><img src="../images/SaveMenu.png" height="221" width="169" /></text>
<text>Here actions and tools can be loaded. In the beginning of loading the clonk only the actions and tools the clonk actually needs are loaded. If more actions from other clonks are needed then they can be loaded using this window. A click on the button allows to select the <strong>Action/Tool</strong> with the menu system. A click on <img src="../images/DropDown.png" width="10" height="12"/> directly shows a dropdown menu with a list to be selected from.</text>
<text>This menu is also used for saving. An <strong>action</strong>, a <strong>tool</strong> or the <strong>Clonk</strong> can be saved. Actions and Clonks can also be saved in the other submenu (Action or Clonk, respectively). Tools can only be saved here.</text>
<text>The bottommost text entry can be used to change the <strong>Clonk name</strong>. For example if you have loaded and edited the default Clonk then you can rename it before saving so that the original Clonk is not overwritten.</text>
<text><strong>Attention</strong>: the normal saving functionality of Blender can NOT be used to save the Clonk. Please always use the script GUI (the window in the lower right corner).</text>
<h id="Render">Render</h>
<text><img src="../images/Render.png" height="71" width="78" /></text>
<text>By clicking on the render button a menu appears. It allows to choose various <strong>actions</strong> which should be rendered separately. By choosing <strong>-All-</strong> the whole clonk is rendered.</text>
<text>In another submenu one can choose whether to render with or without overlay. <strong>Both</strong> makes Blender render both Graphics.png and Overlay.png. <strong>Graphics/Overlay</strong> only creates one of the two. Both can be rendered into the same graphics by choosing <strong>Full</strong>. This allows to have a better look at the rendering output.</text>
<text>When rendering every frame is stored in the temp directory. All of them are combined to the final graphics using <strong>anigrab</strong>. It is stored in the output folder /Graphics/Clonk name/Graphics.png. The action are placed into the graphics in the same order as they appear in the list. The width of the graphics is chosen by the widest action. If multiple actions fit side-by-side then they will be put into the graphics that way. Finally the <strong>Picture</strong> is stored at some free space or at the end of the graphics. To be able to generate the ActMap of the Clonk conveniently the positions of the actions are stored in another file in the output folder.</text>
<text>If only a <strong>single action</strong> is rendered then it is still tried to create the whole graphics. So there should be rendered frames of the other animations in the temp directory. This allows to not always having to re-render all actions if only a single action has changed. However in the beginning the whole Graphics need to be rendered so that all frames of all actions are present in the temp directory.</text>
<h id="Anmerkung">Remark</h>
<text>Generally all materials that start with <strong>Overlay*</strong> are not rendered for <strong>Graphics</strong>. For <strong>Overlay</strong> only the materials starting with Overlay* are rendered. When choosing <strong>Full</strong> both are rendered. Additionally the color of the material OverlayColor is changed from white to blue when choosing Full.</text>
<text>The <strong>Face</strong> material is textured using the <strong>'Face'</strong> texture in normal animations and is skinned using the <strong>'Face2'</strong> texture for the picture. This is required since the high resolution face would be smeared out in the small animations, so a more coarse texture needs to be used.</text>
<h id="Tools">Tools</h>
<text>Tools are the <strong>utilities</strong> of the clonk which it can use for various animations. The tools of the standard Clonk are shovel, axe, hammer and bottle. For the knight various weapons can be chosen additionally.</text>
<text>To create a new tool first a <strong>matching mesh</strong> needs to be created. It is important that the tool only consists of a <strong>single mesh</strong>. If a mesh has been modeled then it still needs to be positioned correctly no that when used it is correctly attached to the bone. To do so the best way is to set the 'Empty' action for the armature object (or another animation which does not use a tool). Now, above the clonk's head, there are both tool bones at the same position. Now the mesh needs to be aligned so that the point at which the Clonk is to touch the mesh needs to be exactly at the bone position. Ideally, check the result from various perspectives in the end.</text>
<text>Eventually the new tool should have a matching name. The <strong>object name</strong> and the <strong>mesh name</strong> should be identical.</text>
<text><img src="../images/NewTool.png" width="200" height="67"/><br/> Now the tool can be saved via <strong>Save/Load</strong> and <strong>'Save Tool'</strong>. Select the tool from the mesh list which appears. The tool will be saved at /Tools/toolname.mesh.</text>
<h id="Importieren">Import</h>
<text>To import a clonk first Clonk.blend needs to be loaded. Now we need the Clonk mesh to import. This can be loaded from the old file via <strong>File-&gt;Append or Link</strong>. Select the file in the menu that appears, then go to objects and select the object which contains the Clonk. It is important that the loaded Clonk only consists of a single mesh! If it consists or more than one then both need to be selected (shift+right-click) and combined (Ctrl+J). Finally the new mesh needs to be renamed to the name of the Clonk.</text>
<text><img src="../images/NewClonk.png" height="67" width="200" /></text>
<text>Again object name and mesh name should be identical. Then the selected mesh can be imported via a click on <strong>'Import Mesh'</strong>. In the Clonk submenu the action of the Clonk can be adapted and the Clonk be saved. Now it can be used the same way as the other Clonks.</text>
</part>
<author>Randrian</author><date>2008-05</date>
</doc>