Wednesday, December 22, 2010

Importing Sexy Beach Zero figures

Current windows build of Khayyam can be downloaded from Floyd Sourceforge page.

Here is quick tutorial how to import SBZ figures. The similar procedure can be used for other multi-part meshes (SB3, School Mate etc) - but not all collection formats have working autodetection for textures, bones and so on.
From main menu select: Objects -> Import -> Import Xpp Mesh

Click "Choose directory..." and select the "data" subdirectory in installed game location.
At the right-left is the list of all collection files (.pp) in chosen location. For SBZ, the bodies are in file sb03_00.pp. The game format should be autodetected from file name, but if it fails, select "Sexy Beach Zero" manually from game dropdown list. After selecting correct collection file the contents of it should appear in lower-left list.
Female bodies are named cw_body_??_??.xx.
Keep "Hide extras" and "External textures" checked for now - these make oiling/massage guide mesh invisible and replace plain skin materials from predefined textures.
Select proper body model and the preview should appear at right. The common camera controls (middle and right drag) work similar way to the main window.
Click "Import". The import options dialog should appear.

If you are importing the first object, the only available option is "Import as standalone mesh". Keep "Create skeleton" checked if you want to pose the figure later. Click "Import".
Imported body appears in main window. But as there is no proper lighting, it looks plain.
Select "Object->Add->Directional Light" to make it better.

Select body by moving mouse over it (yellow highlight box should appear) and clicking. Selection is marked by orange wireframe around the body.
Now you are ready to import head. Again chose "Object->Import->Import Xpp mesh..."
From the collection list select the same collection, chose any of the head files (cw_head_??_??.xx) and click import.

The proper import options should be preselected. You have to import it as "Skin of selected mesh" so it will be controlled by the same skeleton. "Parent bone" and "Anchor bone" determine, which bones will be merged between existing body and new head skeletons. Click "Import" and voila - body has now head.
Repeat the same procedure with hair (the name of mesh is cw_hair_??_??.xx).

The next step is applying a texture to swimwear. For this we use builtin DOM editor - the most powerful tool of Khayyam.
Choose "Dialogs->Document Tree".
Expand "Scene" and then "Figure" nodes from left-hand tree view. Figure is a poseable object, that can have multiple skins (body, head, clothes) controlled by the single skeleton and additional poseable objects (like items at hand). The imported SBZ meshes are "GeometryXX" nodes. Select the first one of them (the body mesh).

At the right side there are tabs for the selected node and its parent classes. At moment we are interested in the Xpp geometry node itself (GeometryXX). You can see the list of all used internal materials, with visiblity checkboxes and optional external material ids. Importer autodetection should have made oiling guides invisible already. The body materials should have external textures attached (materialDNS_6 and materialDNS_5).
Select bra material mn_mizugi_00_00. From dropdown box below select "Create new" and click "Apply". This creates new texture override node for bra and opens material editor to define texture for it.
Texture editor looks like similar to Xpp mesh importer. First click "Choose directory" at top left and navigate to "data" directory under the installed game.  From "Show files" dropdown list chose "Collections". Select the collection with swimwear textures (sb06_00.pp). From Type dropdown list select "Sexy Beach Zero" (it is not autodetected at moment).

At lower left list are all available textures from that collection. Select the one you like and click "Apply".
The selected material is now updated with chosen texture. As a next step, apply the same texture to panties and inner sides of swimwear.
Select "mn_mizugi_01_00" from material list. From dropdown list below select the new material created for bra (materialDNS_2) and click "Apply". repeat the same procedure from the inside of swimwear (mn_mizugi_00_01 and mn_mizugi_01_01).

And thats all. You have just imported Sexy Beach Zero girl with swimwear.

For posing there is skeleton mode (the small button with figure and blue bones in toolbar).
Before proceeding further it is good idea to familiarize yourself with document tree editor a bit - for example hiding bones without skin and extra bones you may not want to edit.
Importing scene is similar to importing figure - just make sure, that you import it as standalone object.

And last thing - save often. Khayyam is still alpha, so it has a bad habit to crash frequently.


  1. seems pretty easy. but I dont understand what might be going wrong. I import Poser models, 3ds, obj ... but xpp mesh does not work. what could be wrong, since the SB3utility works perfectly.

  2. when i download the file it said dll missin but i download around 10 dll and still sayind dll missin

  3. Nice step-by-step guide man! In almost blink of an eye I did it with your help. I said almost because I did couple mistakes and had different errors from windows libraries for some reason. After fixes I did it was toooooo easy! In addition, I really enjoyed your Facebook page of Khayyam it’s so informative. Especially Rigging tutorial series. Don’t think you need their product but you definitely could contact the writers from EssayCompany to help you with quest, they can make it fast and smooth.