
In my last post from way back in June, I mentioned that I was writing a program to help produced sculpties from sim RAW terrain files. I've been delinquent in following up on that, and to that end, have finally uploaded a copy of the TerrainTool program that will let you do this. You can find it here:
http://www.nowhere-sl.com/terraintool/
This was part of an effort to make a more full-featured terrain visualization tool in Java, which perhaps at some point will happen. In any case, it's quite useful for producing sculptie textures that can be uploaded into Second Life and used to make scale models of sim terrain.
One thing that can be useful when making these types of models, is to texture them with the actual image from the grid map. Here's a short script that will let you get that for the region you're in:
string getSimMapURL() {
string regionName = llGetRegionName();
vector rc = llGetRegionCorner();
integer regionX = (integer)(rc.x / 256);
integer regionY = (integer)(rc.y / 256);
llSay(0, "Region \"" + regionName +
"\" at: " + (string)regionX +
", " + (string)regionY);
integer mapY = 1279 - regionY;
string mapApiRestEndpoint =
"http://secondlife.com/apps/mapapi/grid/map_image/";
string mapImgUrl = mapApiRestEndpoint +
(string)regionX + "-" +
(string)mapY + "-1-0.jpg";
llSay(0, "Map Image URL: " + mapImgUrl);
return mapImgUrl;
}
default {
state_entry()
{
llSetText("Click me to get the Map URL for the current region",
<1,0,0>, 1.0);
}
touch_start(integer total_number)
{
getSimMapURL();
}
}
Simply drop that script into a prim, click on it, and you'll get an image URL like this:
http://secondlife.com/apps/mapapi/grid/map_image/926-344-1-0.jpg
Following that URL will take you to the actual image from the grid map, which should look something like this:

Simply save that image and upload it as a texture into SL, and you can apply it to your scupltie sim model.

0 comments:
Post a Comment