Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Topographic Map Generator

Ulrika Zugzwang
Magnanimous in Victory
Join date: 10 Jun 2004
Posts: 6,382
08-22-2004 11:24
I'm in the process of beginning a large new architectural project. Before I begin, I require a topographical map of the area to help with city planning.

Does a script exist which can create a notecard with "x, y, z" land coordinates?

If not, I was thinking of creating a prim which would move around a sim in a grid and drop as low as it could, measuring the height. Kind of like electron force microscopy! Is there a script which provides some of this functionality?

Any suggestions would be appreciated.

~Ulrika~
_____________________
Chik-chik-chika-ahh
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
08-22-2004 11:26
We can't make notecards with a script.

Yes, I know, it's stupid. LL just hasn't bothered to get off their asses and give us something to do it or anything remotely similar, despite the fact that it's been a requested feature for something like five non-beta builds now.

As far as your electron microscope thing, yeah, sure.
_____________________
</sarcasm>
Ulrika Zugzwang
Magnanimous in Victory
Join date: 10 Jun 2004
Posts: 6,382
08-22-2004 11:34
Get out of here! A script can't create a notecard?! That is shocking to me.

So it looks like I need a prim, two "for" loops, and llGround. At the end of the script I'll just have it say the list to channel 0 and copy it by hand out of my history. Does this sound like a smart course of action?

~Ulrika~
_____________________
Chik-chik-chika-ahh
Essence Lumin
.
Join date: 24 Oct 2003
Posts: 806
08-22-2004 11:38
Here is a post from March 2003
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
08-22-2004 11:58
Well, you -can- technically have the storage 'persistant' in a script, by creating another script who's sole purpose is to listen for llMessageLinked and record the relevant data, but if your resolution on your topographical map is high enough, a script won't have enough memory, seeing as the scripts have less memory in them than a TI-82 calculator.

Yeah, you might end up needing to copy by hand. Fastest way is to either change the name of the object into one portion of information that you can use with a colon in it (like the sim's name) so you just have to copy/paste only, or making the name of the object something really unique so you can copy/paste it into Wordpad, Find-Replace all instances of the name (plus ": " after the name) with nothingness, and paste it back into SL.

You know, I'm seriously pissed about this persistant storage thing. If LL has enough time to waste "fixing" llSitTarget, which was never broken to begin with, they've got enough time to give us some things that've been asked for for years.
_____________________
</sarcasm>
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
08-22-2004 12:00
This is getting off-topic, but I think it's quite understandable that LL doesn't provide us with a script call to write to a notecard.

All notecard data is stored on LL's database, and if notecard creation could be done programmatically, it'd be possible for gigabytes of data to be added to their database without human intervention.

Note that, while you can create prims programatically, there have always been restrictions. Before 1.2, prims cost money to rez, and after 1.2, prim usage was tied to land ownership. Until a similar set of restrictions can be implemented for writing to notecards, I don't expect LL to give us that capability.

Of course, you can always send data to the outside world using e-mail or RPC, and then write it to persistant storage there. That way you're paying for the storage on your own.
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
08-22-2004 12:10
Ah, but their excuse ISN'T memory. If it were, then I'd think it was a valid concern, but LL has consistantly maintained that the problem is merely one of coding difficulties. Something about implimenting persistant storage is "difficult". Meaning that they COULD do it, if they bothered to put enough time into it. Meaning they're wasting their time "fixing" things that don't need it while they could spend it better in making things we've asked for for a long while.

And if memory ever DID get to be a problem for them (which I doubt), they can always limit it in the same ways that scripts are.

EDIT: Oh, and back to the topic, Ulrika, yeah, sounds good. Just remember that the vector you're putting into llGround is the distance FROM the prim in question, not the sim coordinantes. So use of llGetPos and some math might help keep things straight.
_____________________
</sarcasm>
Ulrika Zugzwang
Magnanimous in Victory
Join date: 10 Jun 2004
Posts: 6,382
08-22-2004 12:50
I'd like to reply to both threads here.

First, I've got a working beta of the script going. I'm having it report to channel 0 and grabbing the data out of my history. I plan to filter the data with perl and read it in with matlab. So thank you all for your help. Once I get it working, I'll post the results here.

As for the creation of notecards, there are analogous problems that exist in Unix as well. Unix is vulnerable to attacks which can either consume the maximum number of allowable running processes or consume the maximum allowable number of inodes on a disk. Both are hard coded limits. A user need only to create a script which spawns hundreds of processes or a script which creates thousands of empty files. It will quickly bring a server to a halt.

The solution is the implementation of a quota, which is a maximum number of processes, inodes, and disk space that a single user can consume. In SL they currently implement quotas with prims and I've heard that they are working on a script version as well to prevent a single user from bogging down the system. The last step would be for them to do the same with notecards or databases.

Either way the solution to this is easy. It's just quotas. Perhaps we should start petitioning SL for persistent data storage with the argument that we would accept quotas on that data.

~Ulrika~
_____________________
Chik-chik-chika-ahh
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
08-22-2004 12:57
The day they quota my scripts is the day I leave SL, because no quota could be fair.
_____________________
</sarcasm>
Buck Weaver
Unsolicited Onterator
Join date: 18 May 2003
Posts: 251
Re: Topographic Map Generator
08-22-2004 13:05
From: someone
Originally posted by Ulrika Zugzwang
I'm in the process of beginning a large new architectural project. Before I begin, I require a topographical map of the area to help with city planning.



Didn't Cadroe Murphy make a topographical map in this thread?

/invalid_link.html
_____________________
My karma ran over your dogma.

Thoughts become things.
Sensual Casanova
Spoiled Brat
Join date: 28 Feb 2004
Posts: 4,807
08-22-2004 17:04
I believe Gaudeon Wu made one of these... or something very similar.
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
08-22-2004 18:45
Just ship the data off world to your host which could hold all the perpetual data you desire. The key is to improve the out of world communication opposed to necessarily allowing writing to notecards. Like outbound XML-RPC, or other methodology.
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
08-22-2004 21:41
From: someone
Originally posted by Alondria LeFay
Just ship the data off world to your host which could hold all the perpetual data you desire. The key is to improve the out of world communication opposed to necessarily allowing writing to notecards. Like outbound XML-RPC, or other methodology.


Riiiiight. Because I have a couple whatever bucks to burn on a server dedicated to LSL use. However much it costs.
_____________________
</sarcasm>
Hiro Pendragon
bye bye f0rums!
Join date: 22 Jan 2004
Posts: 5,905
08-22-2004 22:00
From: someone
LL just hasn't bothered to get off their asses and give us something to do it or anything remotely similar, despite the fact that it's been a requested feature for something like five non-beta builds now.

<sarcasm>
I'm sure LL will be thoroughly encouraged to do so now that you have so kindly written this.
</sarcasm>
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
08-23-2004 01:07
From: someone
Originally posted by Hiro Pendragon
<sarcasm>
I'm sure LL will be thoroughly encouraged to do so now that you have so kindly written this.
</sarcasm>


Nothing else in the past year and a half has worked.
_____________________
</sarcasm>
Evan Otis
Rookie
Join date: 21 Jul 2004
Posts: 38
Topoghraphics: Here is the outworld link to
08-23-2004 14:13
the intriguing topographic cartography project that Cadroe Murphy is working on...
http://www.geocities.com/goreldin/Cartifex/

Best Regards,
EO
Wraith Jensen
I can walk thru walls....
Join date: 8 Aug 2004
Posts: 130
08-23-2004 15:01
Okay, so here's the thing: we can establish RPC connections to external databases. Why not use this to store your data? I'm looking at that idea myself for a couple of projects.

If GOM can do it, then we should be able to.
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
08-23-2004 15:22
Everyone's talking about outbound RPC... has it finally been implemented!?
:eek: I musta missed more then I thought!
==Chris
Wraith Jensen
I can walk thru walls....
Join date: 8 Aug 2004
Posts: 130
08-23-2004 15:28
No, no outbound RPC. But once the RPC session is established, the link is bi-directional.
Ulrika Zugzwang
Magnanimous in Victory
Join date: 10 Jun 2004
Posts: 6,382
08-23-2004 17:35
OK! I got a quick and dirty script done.

It uses two "for" loops to get the height of the land across the surface of the sim and outputs the data to channel 0. I then select history and do a CMD-A CMD-C and paste the data into vi running in a terminal. I then massage and plot the data in matlab.

The 3D Studio rendered landscapes are absolutely amazing! I plan to follow up on that to see if we can collaborate to make true topographic maps for community planning. Attached is an image of a topographic map of Seefeld with my home marked with a red diamond.

~Ulrika~
_____________________
Chik-chik-chika-ahh
Ulrika Zugzwang
Magnanimous in Victory
Join date: 10 Jun 2004
Posts: 6,382
08-23-2004 17:36
Here's a version with 3D shading.

~Ulrika~
_____________________
Chik-chik-chika-ahh
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
08-23-2004 18:59
From: someone
Originally posted by Wraith Jensen
Okay, so here's the thing: we can establish RPC connections to external databases. Why not use this to store your data? I'm looking at that idea myself for a couple of projects.

If GOM can do it, then we should be able to.


That requires a server to connect to. Some of us can't afford that.
_____________________
</sarcasm>
Ulrika Zugzwang
Magnanimous in Victory
Join date: 10 Jun 2004
Posts: 6,382
08-24-2004 00:47
Here's my code, posted as promised.

I have to warn you, that this is coding by the seat of my pants. It's just good enough to get the job done with no further refinement after it worked once for what I needed it to. With that said, here it is:
CODE

// Ulrika Zugzwang
// 2004-08-23
float x;
float y;
float z;
float xmin;
float xmax;
float ymin;
float ymax;

vector v; // relative to prim
vector r; // absolute coordinates
vector c; // orig prim pos
vector d; // new prim pos

integer max = 256;
integer step = 4;

default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}

touch_start(integer total_number)
{
c = llGetPos();
d.x = llCeil(c.x);
d.y = llCeil(c.y);
d.z = llCeil(c.z);
llMoveToTarget(d,1);

xmin = 0 - d.x; // 0 - 100 = -100
xmax = max - d.x; // 256 - 100 = 156
ymin = 0 - d.y;
ymax = max - d.y;

llSay(0, "Starting topographic measurements ... ");

for(x=xmin;x<=xmax;x=x+step){
for(y=ymin;y<=ymax;y=y+step){
v.x = x;
v.y = y;

r.x = x - xmin;
r.y = y - ymin;
r.z = llGround(v);

llSay(0,(string)r);

}
}
}
}


~Ulrika~
_____________________
Chik-chik-chika-ahh
Bosozoku Kato
insurrectionist midget
Join date: 16 Jun 2003
Posts: 452
08-24-2004 08:00
Wow that's pretty cool. Xylor you have competition! :)

Bos
Wraith Jensen
I can walk thru walls....
Join date: 8 Aug 2004
Posts: 130
08-24-2004 08:09
From: someone
Originally posted by Moleculor Satyr
Riiiiight. Because I have a couple whatever bucks to burn on a server dedicated to LSL use. However much it costs.



What, you can't afford FREE?

You're already using a computer. That can handle RPC just fine. Just need the programming.
1 2