L3DT users' community
Large 3D terrain generator

Importing opensim raw files

Got a problem or need advice?

Importing opensim raw files

Postby Manual Gearbox » Wed May 22, 2013 11:02 pm

I am struggling with importing raw files created from terrain in opensim. I am pretty certain that the format of the raw output I get when I export a terrain in opensim (using the viewer tools as I am not oneof the happy few with console access) is a 13 channel greyscale (8-bit) raw format. I know this because this loads ok in Gimp using the domino plugin and it is defined as such on various web pages I consulted. NB: many of these same web pages suggest the use of r32 files in console mode, which is a bit confusing ...

Anyhow, whatever I try in terms of options on the import panel to load what I believe to be this 13 channel, 8-bit raw file, I get no sane result. Always some skewed tiling of black and white pixels (min and max height) with a number of other pixels thrown in. My terrain is (still) a simple flat with a large lake in the middle. None of this can be recognised from the imported result, which is always the same (see attached).

I am using L3DT 11.11 on windows 7 with a 12 core i7 cpu and 32 GB of memory.

Can anybody help me get this sorted? Am I doing something wrong, is could this function be incomplete or broken?

Thanks
Attachments
Import.png
import result
Import.png (31.97 KiB) Viewed 20850 times
Manual Gearbox
New member
 
Posts: 3
Joined: Wed May 22, 2013 10:44 pm

Re: Importing opensim raw files

Postby Aaron » Thu May 23, 2013 9:15 am

Hi Manual Gearbox,

L3DT's RAW importer only supports single-channel RAW files, so that's going to be the problem. Can you export the file as single channel 32-bit? (i.e. R32)

If you can't export in a less unusual file format, I can write a script to load the file (this will take a few days). Can you tell me which of the 13 channels is the elevation channel, and what the other 12 channels mean?

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Importing opensim raw files

Postby Manual Gearbox » Thu May 23, 2013 10:45 am

Hi Aaron,

Thanks for your answer and offer.

I can only export those darned 13 channel files, they seem sorta the standard format offered by Second Life and Opensim. Of the 13 channels only 3 are still used: the height map, the multiplier map, and the water height. The actual terrain height is derived from height (0-255) x multiplier (0-255) / 128. Only one water height is allowed. The other channel are unused but still required for historical reasons.

Please find some info and a sample on this web page: http://wiki.secondlife.com/wiki/Tips_for_Creating_Heightfields_and_Details_on_Terrain_RAW_Files
Actually I don't think the sample provided is a good one as it suggests a uniform value in the multiplier map. I could offer a sample taken from Opensim that really uses the mulitplier map, but its large (13x256x256=851968 bytes) and I can't attach raw files to this forum. But let me know if you like to have it...

Also, this page offer a simple script for Gimp to import/export SL raw files (for inspiration) : http://dominodesigns.info/project/gimpterrain

If you could add support in some way for these 13 channel files (in and out) that would be great and surely get you many happy campers from the virtual worlds.
To be complete, there seems to be support for r32 format files, but only for those with console access, i.e. the grid administrators, not for ordinary users.

Kind regards,

Manual
Manual Gearbox
New member
 
Posts: 3
Joined: Wed May 22, 2013 10:44 pm

Re: Importing opensim raw files

Postby Aaron » Thu May 23, 2013 2:50 pm

Hi Manual,

Thanks for the info. This shouldn't be too hard to implement, although the fixed horizontal scale (1m) and restricted vertical range (0-512m) will require an interface with warnings & such. Handling water shouldn't be a problem.

Can you zip & e-mail me the example file? (to aaron@bundysoft.com) 'twould make validation easier.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Importing opensim raw files

Postby Aaron » Fri May 24, 2013 10:47 am

Hi Manual,

Thanks for the files. The importer seems to be OK:

OpenSimImport.jpg
OpenSimImport.jpg (83.06 KiB) Viewed 20836 times


I'll just finish up the exporter, and I'll post the import/export scripts here.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Importing opensim raw files

Postby Aaron » Fri May 24, 2013 2:02 pm

Hi Manual,

The importer script is available here:

http://www.bundysoft.com/wiki/doku.php? ... m_raw_file

Please let me know if you find any problems with it.

The exporter needs some more work, on account of it being glacially slow, as it tries to optimise the values of the 1st and 2nd channels to minimise the quantisation errors. To improve the speed to acceptable levels I'll probably have to rewrite the exporter as a native plugin, rather than a script. I'll let you know when it's available.

Cheerio,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Importing opensim raw files

Postby Manual Gearbox » Sat May 25, 2013 6:55 am

Thanks a million Aaron, the importer works perfectly ...

Kind regards,

Manual
Manual Gearbox
New member
 
Posts: 3
Joined: Wed May 22, 2013 10:44 pm

Re: Importing opensim raw files

Postby OhMy » Wed Jul 17, 2013 11:29 pm

I am wanting to use your script for import but do not know where I am to place what I have downloaded, I just don't want to break anything. Can someone tell me where in the application I add this script so I can use it with L3DT? I am using the non pro version for now. Any help is appreciated, thanks!
OhMy
Newbie
 
Posts: 1
Joined: Wed Jul 17, 2013 11:25 pm

Re: Importing opensim raw files

Postby Aaron » Thu Jul 18, 2013 12:07 pm

Hi OhMy,

You can put the script anywhere and run it from L3DT, but the recommended location (for neatness) is found by clicking on the following shortcut in the Windows start menu:

Start->All programs->Bundysoft->L3DT [version]->L3DT Resources

Clicking on this shortcut will open the L3DT resources folder, in which you will find a 'scripts' subdirectory. Place the script file in that folder.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia


Return to Help and support

Who is online

Users browsing this forum: No registered users and 3 guests

cron