What's up with Downoad Raw terrain?

Tips and discussions about using OpenSim
Post Reply
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

What's up with Downoad Raw terrain?

Post by Kayaker Magic »

I'm trying to download the raw terrain files from a world. I turned off Advanced Megaregions, then I went to each sub-region, Brougt up Region Details, clicked on the Terrain tab, clicked "Download Raw terain".

It takes a while, I know. I wait. Some of the regions download in a minute or two. Others never complete.
If I foolishly get bored and walk into another region before it is finished, when it does finally tell me it has finished, the file never appears on my hard drive.
I've tried logging out and back in again, resetting the world, and some regions NEVER EVER finish downloading the raw texture map.
How can I make this work reliably?
User avatar
Ilan Tochner
Posts: 6504
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4943 times
Been thanked: 4455 times
Contact:

Re: What's up with Downoad Raw terrain?

Post by Ilan Tochner »

Hi Kayaker,

Linden Lab designed the viewer to use UDP when uploading or downloading RAW files. This means that the entire process is very brittle and is very likely to fail if the viewer or the sim need to handle more than sparse network activity while the RAW file transfer is taking place.
User avatar
Michael Timeless
Posts: 113
Joined: Thu Sep 24, 2015 5:13 am
Location: Crestwood, Illinois
Has thanked: 393 times
Been thanked: 153 times
Contact:

.RAW Terrain Creation

Post by Michael Timeless »

My primary purpose in Kitely and other grids is to create recreations of areas that I've visited and love in RL. Unfortunately, the terrain tools don't always work so well when trying to recreate actual areas. Recently, I came across a website that takes actual areas and creates terrain heightmaps that are identical to the USGS mapping data. I was ecstatic until I saw that what they created was PNG Heightmaps. I have tried to convert these to .RAW files useable in Kitely using both GIMP and Photoshop CC 2018, Version 19.1.5, without success.

Several searches on the Internet have shown that this conversion is possible but none of the links on those sites work and on the few that did work, the process didn't work when uploaded to my sandbox. Has anyone had any luck in creating .RAWs from PNG Height Maps? I am eager to learn because this program of creating realistic terrain maps is so promising for all worlds.

Thanks for any help or advice anyone has.

Mike
These users thanked the author Michael Timeless for the post (total 3):
Ilan TochnerAda RadiusChris Namaste
User avatar
Ilan Tochner
Posts: 6504
Joined: Sun Dec 23, 2012 8:44 am
Has thanked: 4943 times
Been thanked: 4455 times
Contact:

Re: What's up with Downoad Raw terrain?

Post by Ilan Tochner »

Hi Michael,

I suggest trying to save your terrain files as both 8bit PNG files and 24bit PNG files to see if the conversion tools to RAW format might work better with another PNG format as input.
These users thanked the author Ilan Tochner for the post (total 3):
Michael TimelessSelby EvansChris Namaste
User avatar
Ada Radius
Posts: 435
Joined: Sun Dec 23, 2012 6:20 pm
Has thanked: 659 times
Been thanked: 545 times

Re: .RAW Terrain Creation

Post by Ada Radius »

I've done it, but it's been a few years. I didn't use a pre-existing height map, though, I created my own - I needed a simple smooth amphitheater, and I remember using the gradient tool to get that. Here are my notes, and I regret to say I have no idea where I got the information. Someone other than me should be getting credit for at least some of this:

Starting from scratch in Photoshop: for a 256x256 sim, make a 256x256 RGB 16bit file. Then to go your channels tab, and create 10 alpha channels – you won't use them, but OpenSim won't accept the terrain files without them.
RAW files are flat, one layer, and 13 channels; RGB plus 10 alpha channels.
The red channel holds the terrain height information, the green channel determines resolution of the red channel, and the blue channel is water height, which you can also edit inworld.
Blue channel: if you want the water to be 20 meters, the default, then paint the entire channel in RGB 20,20,20 grey.
Green channel: It's a good idea to start with a RGB 32x32x32 in the entire channel. That multiplies your resolution in the red channel by 4.

Channel 2 (green) is a grayscale map that is used as a multiplier to scale the data in channel 1, resulting in the final height of each point on the map. The formula used to combine the 2 channels is: original height (channel 1) * multiplier (channel 2) / 128. A few examples will help to illustrate their interaction.
32 -- Divides pixel values by 4. The resultant elevations will be 32 / 128 = 1/4 of the original
64 -- Divides pixel values by 2. The resultant elevations will be 64 / 128 = 1/2 of the original
128 -- No effect : 128 /128 = 1 times the original.
255 -- Multiplies pixel values by 2. The resultant elevations will be twice that of the original : 255 /128 is about 2.
Red channel: if the green channel is 32, and you want a flat sim with the terrain at 22 meters, for example, then you paint the red channel with RGB 88,88,88. Which divided by 4 = 22 meters.

When you're done with your terrain painting, use a gaussian blur to eliminate noise and pixellation – each pixel affects a visible amount of terrain, and you'll see spikes if your channels aren't clean.

Be sure to name your files without spaces.

256 x 256 pixels
13 channels
Interleaved
8 bit depth
No header


Michael Timeless wrote:
Tue Oct 02, 2018 3:54 am
My primary purpose in Kitely and other grids is to create recreations of areas that I've visited and love in RL. Unfortunately, the terrain tools don't always work so well when trying to recreate actual areas. Recently, I came across a website that takes actual areas and creates terrain heightmaps that are identical to the USGS mapping data. I was ecstatic until I saw that what they created was PNG Heightmaps. I have tried to convert these to .RAW files useable in Kitely using both GIMP and Photoshop CC 2018, Version 19.1.5, without success.

Several searches on the Internet have shown that this conversion is possible but none of the links on those sites work and on the few that did work, the process didn't work when uploaded to my sandbox. Has anyone had any luck in creating .RAWs from PNG Height Maps? I am eager to learn because this program of creating realistic terrain maps is so promising for all worlds.

Thanks for any help or advice anyone has.

Mike
These users thanked the author Ada Radius for the post (total 7):
Ilan TochnerSelby EvansGraham MillsSue CaxtonMichael TimelessChris NamasteFrank SquirrelHerder
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1141 times

Re: .RAW Terrain Creation

Post by Graham Mills »

Truly not an expert but this article I compiled a while back from multiple sources suggests PNG is supported by SoaS: http://opensim4edu.10centuries.org/2017/03/18/terrains -- worth a try?
Michael Timeless wrote:
Tue Oct 02, 2018 3:54 am
My primary purpose in Kitely and other grids is to create recreations of areas that I've visited and love in RL. Unfortunately, the terrain tools don't always work so well when trying to recreate actual areas. Recently, I came across a website that takes actual areas and creates terrain heightmaps that are identical to the USGS mapping data. I was ecstatic until I saw that what they created was PNG Heightmaps. I have tried to convert these to .RAW files useable in Kitely using both GIMP and Photoshop CC 2018, Version 19.1.5, without success.

Several searches on the Internet have shown that this conversion is possible but none of the links on those sites work and on the few that did work, the process didn't work when uploaded to my sandbox. Has anyone had any luck in creating .RAWs from PNG Height Maps? I am eager to learn because this program of creating realistic terrain maps is so promising for all worlds.

Thanks for any help or advice anyone has.

Mike
These users thanked the author Graham Mills for the post (total 2):
Ilan TochnerMichael Timeless
User avatar
Michael Timeless
Posts: 113
Joined: Thu Sep 24, 2015 5:13 am
Location: Crestwood, Illinois
Has thanked: 393 times
Been thanked: 153 times
Contact:

Re: What's up with Downoad Raw terrain?

Post by Michael Timeless »

Ada and Graham
Great advice, I will attempt as soon as I get home tonight. I've tried just about everything else without luck. Thanks for the links and information.

Mike
User avatar
Constance Peregrine
Posts: 2348
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2778 times
Been thanked: 1479 times

Re: What's up with Downoad Raw terrain?

Post by Constance Peregrine »

Hi, I have it on good authority that your link to minethere blog no longer works, Graham. However, I tried this and it worked for me:

https://web.archive.org/web/20140311013 ... rains.html

A couple of other points: I am not sure but I think you can simply change the extension (which needs admin authority on windows PCs) of .png to .raw. An indicator (only for single region terrains) is that the original .png is 832 kb as single region .raw files are.

This is also true when you have a .tgz OAR file. You can change the extension and it will work. Of course if you run your own console then .tgz can be uploaded.

If when you upload a terrain over the net sometimes it results in a bunch of spikes all over it, try again, as that is a result of packet loss.

Here is another good tut: https://myosgrid.wordpress.com/2013/02/ ... r-opensim/

I don't play, for the most part, but still read stuff, especially Kitely as I like Ilan ♥♥

beep beep
These users thanked the author Constance Peregrine for the post (total 4):
Ilan TochnerChris NamasteMichael TimelessGraham Mills
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
Post Reply