Friday, February 06, 2009

Terrain Sculptor 1.2 - Fixed Web Map Downloads

Terrain Sculptor 1.2 uses the new web map API from Linden Lab so this feature is functional now (thanks to Henri Beauchamp for pointing me to the API info). Note that the web map API only works for the Second Life grid, not OpenSim grids. If I learn how to retrieve sim map images from OpenSim grids, I intend to add support for that.



Visit Terrain Sculptor Page

8 comments:

Henri Beauchamp said...

Thanks for the update !...

However...

1.- The link to the source code is broken (404 error).

2.- It looks like the program is no more providing a "Decal" webmap and is no more suitable for spherical sculpties, meaning I can't use its output any more for my sim scanner/sensor.

I therefore made my own version, based on your v1.1.3 version, with the web map API updated and the Decal texture support re-implemnented (I used the diffs between v1.0 and v1.1 to do this ;-P).

I named my version 1.1.5 to prevent collision with your future v1.2.x versions.

It is available here: http://sldev.free.fr/TerrainSculptor1.1.5.exe (it's an installer) for the binary and here: http://sldev.free.fr/ts115.zip for the full sources.

Cadroe said...

lol - It takes me a lot longer to test and package this stuff than it does to make a minor change, and I still mess up the link. I fixed the link to the source files.

I removed the decals when I figured out how to do planar mapping because they no longer seemed necessary. What is the problem you're having with planars? I did a test with 1.2, mapping Rodeo and surrounding sims. Here's a pic of just the Rodeo sculpty using planar mapping with the regular web map image applied - this looks right to me, but maybe you get different results.

http://www.spinmass.com/2life/TerrainSculptor/RodeoSculpt1.jpg

However, when I put four of the sculpties together, I did have to nudge them closer than you'd expect to get the seams to line up well. Maybe this is related to your problem. Here's a pic of the area around Rodeo.

http://www.spinmass.com/2life/TerrainSculptor/RodeoAreaSculpt1.jpg

Regardless of the problem, I'll just go ahead and add decals as an option for 1.21.

I'm glad you were able to get it do what you needed with the source though, and it's cool of you to share with everyone.

Henri Beauchamp said...

> What is the problem you're having with planars?

See by yourself:

http://sldev.free.fr/Spherical.png
http://sldev.free.fr/Planar.png

As you can see, the planar misses the "bottom" of the prim, thus making the ground appear like if it was "floating" in the air (and it would be worst in sims with a minimum altitude of 50m or more: the cube represents a 256x256x256m space, counted from water level).

As for the Decal texture, it's needed for spherical sculpties (else the texture repeats on the edges instead of being black).

My suggestion for v1.21 is to allow both spherical sculpties+Decals and planar sculpties+normal map.

>I'm glad you were able to get it do what you needed with the source though

I really *hate* Windoze... I had to make a new virtual machine with vanilla XP so to be able to install Visual C#... Somehow VC# refuses to install on my normal VM (and does not tell me why: it simply fires stupid and meaningless dialogs and finally dies in the middle of the install: Micro$hit stuff sucks !).

Developing under Linux is so much easier...

> and it's cool of you to share with everyone.

It's only natural, since it's Open Source... Oh, by the way, what is the License ? BSD ? GPL ?...

Cadroe said...

Henri - The planar mapping gives an accurate representation of the sim's terrain. For instance, in this picture where four sculpties of adjacent sims are put together, they only line up correctly at their edges because of the planar mapping:


http://www.spinmass.com/2life/TerrainSculptor/RodeoAreaSculpt1.jpg

The way the terrain goes down around the edges with the spherical mapping is a distortion. That's why I changed to planar mapping when I learned how to set it through a script. The decal was a workaround for this problem.

As far as I know, the sculpties produced by 1.0 are the same as the ones produced by 1.2. The effect just depends on the mapping you apply to the prim. So to get the result you're used to, it should just be a matter of using the decal which has a border around it. So I'll plan on putting back in the option to create the decals in 1.21 so they can be used with spherical mapping.

It's a BSD license. The functionality in Terrain Sculptor will be a small part of a larger project I've been working on which I'm planning on releasing under lesser GPL. If everything goes according to plan, that project will be in some sort of public version control which will make more sense :)

Henri Beauchamp said...

@Cadroe

No, the sculpties produced by v1.0 and v1.1 and later are different and v1.2's cannot be used as a spherical scuplty either (I tried and the result is not the one you would expect, with "broken"/distorted relief instead of a "closed" sculpty).

And there is *no* distortion in the spherical sculpty produced by v1.0 or my v1.1.5, since there is an explicit "border" in the mapping which is used for the closing faces: the only (small) drawback is that the spherical sculpty is a little less precise (as a few faces/vertexes are used to close the sculpty instead of being used for the relief).

The only thing to change in the code to get a spherical sculpty is to replace:
Rectangle destRect = new Rectangle(0, 0, 64, 64);
with:
Rectangle destRect = new Rectangle(2, 2, 60, 60);
in SimHeightmap.cs

I assume this could be controlled via a flag (and thus a checkbox in the menu).

Henri Beauchamp said...

As for the license, I added a "COPYING" file with the BSD License in it, in both the sources and the binary installer for TerrainSculptor v1.1.5.

You will also find the NSIS (Nullsoft free installer system: http://nsis.sourceforge.net/Main_Page)
script I used to build the installable package here:

http://sldev.free.fr/TerrainSculptor.nsi

Cadroe said...

Henri - Thanks for finding that difference between the generated sculpties. I'm not surprised I missed it, that's a small change. I'll plan on making both the decals and the old sculpty format an option in the next version.

What I meant by distortion was just that the sculpty surface goes down around the edges with spherical mapping, even though the sim terrain doesn't.

I added the license info to the README, but I guess a separate file would be good.

Henri Beauchamp said...

Grrr... LL changed the specs of their web maps API again, and this time without even announcing it in a BLOG !... See: http://forums.secondlife.com/showpost.php?p=2319785

I had to make a new version of TerrainSculptor (v1.1.6). It is available here:
http://sldev.free.fr/TerrainSculptor1.1.6.exe (installer)
http://sldev.free.fr/ts116.zip (sources)
http://sldev.free.fr/TerrainSculptor.nsi (NSIS script to make the installer from the binary).

The old-new (or new-old ?) API is apparently to become deprecated tomorrow... :-(