Thursday, June 19, 2008

Export Sculpties from Bailiwick 1.2 Beta

I've added the ability to export sculpties of the terrain in raw files through Bailiwick 1.2 beta. This is the only new feature in 1.2 beta, but things were shifted around internally so there may be new bugs I haven't caught yet. You can download 1.2 from the Bailiwick page.

To export a sculpty, simply choose Export->Sculpty from the File menu. If the terrain will not fit within a 1 to 1 scale in the sculpty, it will automatically append the scale to the file name after an S. For instance, if the height scale of the terrain file is 2 (heights can range from 0 to 512), then the file name would end in "S2". This means, you would then want your sculpty prim to be twice as high as it is wide (e.g. 1x1x2 meters). Bailiwick exports planar textures but planar mapping for a sculpty prim can only be selected through a script. Below is a script to change the type to planar.

By the way, Second Life currently ignores the parcels defined in a sim .raw file when you upload the file to SL. This is a Second Life issue, not a Bailiwick issue.

Here is a script to change the sculpty type to planar. First drag the sculpty texture into the prim's inventory (it should be the only texture). Then place this script into the prim's inventory. It will automatically set the sculpty texture to the texture in the inventory, set the sculpty type to planar, and then delete itself.


default
{
state_entry()
{
string theKey = "";
string theName = llGetInventoryName(INVENTORY_TEXTURE, 0);
if (theName != "")
theKey = llGetInventoryKey(theName);
if (theKey == "")
{
llOwnerSay("No sculpty texture found");
}
else
{
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT,
theKey, PRIM_SCULPT_TYPE_PLANE]);
llOwnerSay("Sculpty texture set to: " + theName);
}
llRemoveInventory(llGetScriptName());
}
}

No comments: