Difference between revisions of "Changing textures"

From XStoryPlayer Wiki
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The scene textures can be found in the <code>./pack/pack_dungeon/scenes/textures</code> directory.
 
The scene textures can be found in the <code>./pack/pack_dungeon/scenes/textures</code> directory.
 
The scene sounds can be found in the <code>./pack/pack_dungeon/scenes/sounds</code> directory.
 
 
The character sounds can be found in the <code>./pack/pack_dungeon/ai/speech/default</code> directory.
 
  
 
===Texture format===
 
===Texture format===
Line 25: Line 21:
 
<li>After editing the texture save it in the the .dds format. Make sure you also save the alpha channel. Save it in the DXT5 format and generate MIP maps.<br>
 
<li>After editing the texture save it in the the .dds format. Make sure you also save the alpha channel. Save it in the DXT5 format and generate MIP maps.<br>
 
<code>We use the DXT5 format for 4 channel textures and DXT3 for 3 channel textures.</code></li>
 
<code>We use the DXT5 format for 4 channel textures and DXT3 for 3 channel textures.</code></li>
<li>To make Saiko somewhat more alien like replace the <code>/alien_tex</code> textures (from the 'Tutorial Resource Pack') with the current Saiko body textures.<br>
+
<li>To make Saiko somewhat more alien like replace the <code>/alien_tex</code> textures (from the '[[Tutorial resource pack]]') with the current Saiko body textures.<br>
 
Both the skin color and eye color texture are changed. Also the bump texture is changed.</li>
 
Both the skin color and eye color texture are changed. Also the bump texture is changed.</li>
 
<li>To quickly see the result when editing a texture press F4 and reload the scene.<br>
 
<li>To quickly see the result when editing a texture press F4 and reload the scene.<br>
 
Because you don't have saved files you will see the fastsex Saiko dialog. After pressing Apply it will reload making the changes visible.<br>
 
Because you don't have saved files you will see the fastsex Saiko dialog. After pressing Apply it will reload making the changes visible.<br>
 
You can also do this to quickly reload after editing script code.</li>
 
You can also do this to quickly reload after editing script code.</li>
<li>After the textures are replaces Saiko should look like this:<br>
+
<li>After the textures are replaced Saiko should look like this:<br>
 
[[file:alien_tex1.jpg|400px]]</li>
 
[[file:alien_tex1.jpg|400px]]</li>
</ol>
+
<li>You can now proceed with [[Changing sounds]].</li>
 
+
 
+
===Adding talking sound===
+
 
+
<ol>
+
<li>At the moment the girls only make sounds during sex and in other special situations. It is however possible to add sound files to sentences.<br>
+
To let a character make a sound the following code can be used:
+
<syntaxhighlight lang="cpp">
+
talk.s      = "aaaahhhhhhh"; // The mouth movement is derived from this text
+
talk.file  = "scream1";    // The file in the ai/speech directory
+
talk.volume = 1.050;        // The sound volume
+
talk.text  = false;        // Do not show text in dialog window
+
</syntaxhighlight>
+
First the <code>ai/speech/saiko/</code> location is tried. If the file is not there the <code>ai/speech/default/</code> location is used.<br>
+
This allows you to add girl specific sounds.
+
</li>
+
 
</ol>
 
</ol>

Latest revision as of 13:16, 9 January 2015

The scene textures can be found in the ./pack/pack_dungeon/scenes/textures directory.

Texture format

  • XStoryPlayer color textures are in .dds file format.
  • XStoryPlayer bump/displacement/normal textures are not in the .dds file format because that results in artifacts due to its normalized nature.
A .dds file is an compressed image format like .png or .jpg.
It contains reduced (mipmapped) versions of the image and it can directly be used as a compressed texture by the graphics card.

Editing Saiko texture files

  1. Most image editors have a plugin that allows you to open .dds files. This tutorial assumes you will be using Photoshop.
    Download a .dds plugin for photoshop here.
  2. Open the /scenes/textures/character6/body_all_png.dds texture.
    It is the body skin texture used for Saiko her body. Use "Load Using Default Sizes" in the .dds popup dialog if you get this popup dialog.
  3. You can change the skin texture using Photoshop. This texture also has an alpha channel that contains the reflection parameter for the skin.
    As you can see the lips area e.g. is more reflective.
  4. After editing the texture save it in the the .dds format. Make sure you also save the alpha channel. Save it in the DXT5 format and generate MIP maps.
    We use the DXT5 format for 4 channel textures and DXT3 for 3 channel textures.
  5. To make Saiko somewhat more alien like replace the /alien_tex textures (from the 'Tutorial resource pack') with the current Saiko body textures.
    Both the skin color and eye color texture are changed. Also the bump texture is changed.
  6. To quickly see the result when editing a texture press F4 and reload the scene.
    Because you don't have saved files you will see the fastsex Saiko dialog. After pressing Apply it will reload making the changes visible.
    You can also do this to quickly reload after editing script code.
  7. After the textures are replaced Saiko should look like this:
    Alien tex1.jpg
  8. You can now proceed with Changing sounds.