Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Using a script to set Height Fields for terraforming?

Kell Ventura
Registered User
Join date: 17 Jul 2006
Posts: 40
06-27-2007 08:04
As noted in my prior thread to this forum (the "Sex, Lies, and Terraforming...";), I do not have the permission to import/export/replace the Terrain RAW file for the sim where my quarter sim property (128x128) resides. But I do have pretty much free rein to set the Height Field values for my parcel "in-property" using the built-in SL terraforming tools.

It made me think that a custom script should be able to run "in-property", and set the Height Field value for a particular x-y coordinate in my parcel.

If possible, this would allow me, in principle at least, to use an external tool to build the terrain for my 128x128 quarter sim, then create a script from that data and run the script "in-property" to terraform.

(RAW could be intermediary in this process -- instead of importing the RAW file directly into SL, which I can't, convert the RAW data to the custom script and then run the script "in-world" to change the Height Field values.)

Is this possible? Or is there more to this that I don't realize? I'm not a scripter, nor do I claim to have deep understanding of the SL architecture, so maybe what I'm asking for is impossible. But it doesn't hurt to ask the experts here.

Btw, if it is possible to run a script to change the "z" value for a given x-y value in the property, I'll be happy to try one out if you write it -- maybe for several grid points in a small area as a test case.

Thanks!
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
Yes
06-27-2007 08:21
Several tools like this already exist. Try SLexchange or SLboutique.

They are actually very easy to write. Basically, the scrupt reads a configuration of x,y,z values. it moves to x,y, and sets the landheight to z. The main gotcha is to no try to move underground before or after the height change...

lee
SpankMe Pinkerton
Registered User
Join date: 13 Feb 2005
Posts: 158
06-27-2007 08:33
My landbot can terraform your property in various ways. I sell it in my store Spank's Specialties in Oz. Perhaps you may want to check it out.
Kell Ventura
Registered User
Join date: 17 Jul 2006
Posts: 40
06-27-2007 08:49
From: Lee Ponzu
Several tools like this already exist. Try SLexchange or SLboutique.

They are actually very easy to write. Basically, the scrupt reads a configuration of x,y,z values. it moves to x,y, and sets the landheight to z. The main gotcha is to no try to move underground before or after the height change...

lee


O.k., thanks.

So it seems like all that is necessary is to convert a Terrain RAW file into such a script?

Next question. Is it possible to query a sim and obtain/build the existing Terrain RAW file, or at least the first two channels (the Height Field and the Height Multiplier channels) so it can be imported into some third-party graphics tool (e.g., Photoshop) for manipulation? Then after manipulation the RAW can be exported, and then the script generated from that to run in SL "in-property". (Note this question is asked since I do not have the permission to export the Terrain Raw file for the sim my parcel is located in.)

Again, what I want to do is to design the terraforming for my quarter sim (128x128) using an external tool, then convert the resulting design into a script for running in SL. I think the components are in place since it does seem like the existing external tools are set to export Terrain RAW (256x256), so it is a matter of creating the Terrain RAW --> SL script.

There is the aspect of permissions, of course. I assume that if I try to run a script to adjust the z-height for some x-y in the sim but outside my parcel, and I do not have permission to set the z-height, that SL will simply ignore the request. Of course, we'd hope that. Obviously I'd have to ask the sim owner to bake the terrain of the whole sim before I run any script in the event the script is able to splash over into the other parcels in the sim.
Kell Ventura
Registered User
Join date: 17 Jul 2006
Posts: 40
06-27-2007 08:59
From: SpankMe Pinkerton
My landbot can terraform your property in various ways. I sell it in my store Spank's Specialties in Oz. Perhaps you may want to check it out.


Your tool is definitely interesting!

Right now my inquiry is to design the terraforming externally, such as using Photoshop or a special tool, then import the data.

My case is different in that I am not the sim owner, but own a quarter sim parcel (128x128), and I have the permission to adjust the height of all points in the quarter sim from 0 to 100 meters (water height 20 meters). So I'm trying to see what could be done here. Most of the external tools/procedures assume the user owns the whole 256x256 sim and has full access to the Terrain RAW file, which I don't.