Saturday, January 05, 2008

Terrain Sculptor Version 1.1

Terrain Sculptor version 1.1 is now available. Terrain Sculptor is an open source program I've written which uses a libsl bot to automatically map sims and generates sculpty textures of their terrain. The key updates in this version are planar sculpties and avatar movement. (v1.0 Blog Entry)

1.0 used the default spherical projection for sculpties, which meant the sides wrapped under and joined. 1.1 uses the planar type, which produces a sculpty much like an actual sim in SL. Unfortunately a script is necessary to change the sculpty type to planar, but one is included in the README (and see below). The "decal" versions of the web map image are no longer generated because they are not neeeded with a planar sculpty.

Second Life has gotten more clever about recognizing when terrain is visible to an avatar, and it doesn't send terrain data that the client doesn't need to render. So I've added the ability to move the avatar around to force all the terrain into view. The avatar's position is updated automatically on the web map image of the sim.

Download the application.

Download the source code and Visual Studio project files.

Here is the script to change the sculpty type to planar. I thought I'd post it here because people might find it convenient for setting planar sculpties in general. First drag the sculpty texture into the prim's inventory (it should be the only texture there). 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.

string theKey = "";
string theName = llGetInventoryName(INVENTORY_TEXTURE, 0);
if (theName != "")
theKey = llGetInventoryKey(theName);
if (theKey == "")
llOwnerSay("No sculpty texture found");
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT,
llOwnerSay("Sculpty texture set to: " + theName);


Stephen said...

Error Logging In

Error retrieving login response from the server.

=\ A dialog box pops up with this when I try to log in.

Cadroe said...

stephen - Thanks for the alert, I think the wrong version of libsl got in there. I just uploaded a new version, and then downloaded it and unzipped it and was able to log in. Hopefully this will solve the problem for you.

Stephen said...

I downloaded it again and run it and received the same error. Is there something else that might be affecting proper operation? I do have a folder with the latest libsl svn elsewhere on my HDD.

Cadroe said...

It's a bit mysterious. I've downloaded it and used it successfully on two different machines with two different accounts. Unfortunately I don't think I'll be able to figure out the problem tonight. There must be something causing the difference.

Cadroe said...

Good news and bad news :)

The good news is there is a solution. I got the same behavior on my main account, which means I was able to reproduce it and therefore (hopefully) verify that it's solved. I was able to track it to a known problem in libsl with inventory parsing. This bug basically went away when they recently switched the login code to a different system. I switched to a new version of libsl and it worked.

The bad news is that the new version I used is the development version, which is not reliable. The switch was supposed to be in libsl 3.2.1, but somehow the login code in that release got reverted to an earlier version. The libsl developers don't seem to realize this and I'll let them know.

My plan is to put out Terrain Sculptor using the development version of libsl since it seems to work (although for me logins and teleports are noticeably slower). Hopefully soon there will be a new stable release of libsl with the new login code, and then I'll update Terrain Sculptor to use that.

In the meantime, if you get this error and you're in a hurry, I suggest trying an alt account without much inventory. This has worked for me and other people.

Cadroe said...

Update - I misread the bug report, the fix was not supposed to be included in libsl 3.2.1. It should show up in a later release though. So I'm going to stick with my plan, putting out a version of Terrain Sculptor using the development version of libsl with the fix. I'll leave the current version available as well. And when the libsl release with the fix comes out I'll use that.

campingbot said...

any chance of making it save terrain to a .RAW file?