L3DT users' community
Large 3D terrain generator

"Steppy" landscapes

Got a problem or need advice?

"Steppy" landscapes

Postby piratelord » Sun Dec 10, 2006 3:26 pm

I'm a member of a team working on a project, and somehow I've become the "senior heightmap tweaker" :D

Anyway, downloaded SE and played around with that, amazing results.

We eventually worked out the scale required, which basically meant a 33km x 24km map. That's also when I realised that I'll have to get pro, so while I'm waiting for my eval license details to come through, I thought I'd take a small section of the map, enlarge it to a more accurate scale, smoothed it a bit, and imported it.

On the original map, the Horz Scale was 16.1, since the image was at the max of 2048 (makes 32972.8 meters).
I decided then that the whole map should be done at a size of 8192, which allows a Horz Scale of 4.02, allowing finer detail to be worked out (although, it would be great to go even smaller on the Horz scale).

When I look in the viewer though, it's all a series of steps/ledges, no gradual change in height.
You can just about see this in the below picture.
Image

Same landscape at Horz 16.1 for comparison.
Image


How can I solve this and smooth the map better? Will this happen to me in Pro?
I'm assuming that because the max alt is 1000 (min 0), each pixel shade represents 3.9 meters.

Thanks, this is a great, easy to use tool!
piratelord
Luminary
 
Posts: 60
Joined: Sun Dec 10, 2006 2:59 pm

Postby Aaron » Tue Dec 12, 2006 4:32 pm

Hi Piratelord,

Sorry, I nearly missed this one.

Steps such as this are almost always caused by having stored or converted the heightfield to an 8-bit image at some point (eg BMP, JPG). With only 256 distinct levels, 8 bit formats produce visible quantization artefacts in terrain maps. L3DT, like many other terrain generators (and renderers), stores terrain internally at 32-bit precision, and by default uses a 16-bit file format for storage (with support for 32-bit modes on several formats.) These 'high precision' formats do not introduce visible steps, as 16-bits give you 65536 levels, and 32 bits give you 4 billion. Too many to notice, and probably always smaller than the terrain noise.

[Is anyone else having a deja vu moment here. I've written this reply before, but apparently not in this forum. Spooky.]

Anyway, to remove stepping artefacts you basically need to blur the terrain. Whilst we wait for the Guassian blur plugin to be written, the way to do that in L3DT is to down-size the heightifled using 'operations->heightfield->resample map' to, say, 1/4 the current size, and then repeat to re-size it to the original size. This gives you a linear blur.

Another, more severe approach is to generate a design map ('operations->design map->generate from HF'), and then re-generate the heightfield ('operations->heightfield->generate map'). Depending on the settings you provide, you can also add erosion, cliffs, etc. This latter option is popular in some circles, where rough design is done in PS/PSP/the GIMP, and L3DT is used to turn it into a 'real' heightfield.

I hope this helps.

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

Postby piratelord » Tue Dec 12, 2006 10:13 pm

Thanks for this. I did send you a reply email when you sent me the eval license before I read your reply above.

You've answered most of my questions. :)

I discovered the Generate Map from Heightfield method. Does a great job, but at the same time, very destructive in areas. We've put a fair amount of detail into the heightmap but some of the things L3DT does to it do improve it. So Pro's and Con's, but that's up to us to deal with.

I'll resave my heightmap as a 32bit image. It's currently in Photoshop, so blurring accurately is easy.
I'm sure I saved it as a 24bit JPG, but well, you never know.

Just to repeat what I put in my email, this is an amazing program!
piratelord
Luminary
 
Posts: 60
Joined: Sun Dec 10, 2006 2:59 pm

Postby Aaron » Tue Dec 12, 2006 10:25 pm

Hi Piratelord,

Ah, 24-bit JPEG's only have 8-bit precision for greyscales (R, G and B are each 8-bit, and all the same). What you need is an image format with 16 bits per layer, and for that your options are basically PNG or RAW. Also, you'll find that if you import a 16-bit image into PS, most of the tools/filters won't work (not written for 16-bit data.) This is why I suggested the blurring methods in L3DT.

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

Postby piratelord » Tue Dec 12, 2006 10:54 pm

I see.

Well, I was able to convert to 16-bit, but the only save format available that L3DT accepts was RAW. I tried that and got an error message, something about incorrect heightmap size.

Falling asleep at the moment, so I'll look into it again.
piratelord
Luminary
 
Posts: 60
Joined: Sun Dec 10, 2006 2:59 pm

Postby Aaron » Wed Dec 13, 2006 12:47 am

Hi Piratelord,

RAW files don't encode their width/height, so you have to enter that manually. In the import wizard there is an 'options' button that allows you to set 'import->width' and 'import->height'.

Also, just to reiterate (perhaps to the point of being tedious), the data corruption is not just restricted to the 8-bit formats. If you create the image in typical image programs it will have these 8-bit artifacts, even if you save in 16-bit precision. This is because, most of the time, they use 8 bits/layer internally. The damage is done whenever the image is squished to 8 bits, and is not un-done by expanding it to 16/32 bits again. It's kind of like stepping on a tomato, if I may use a bad analogy.

Now as far as I know, and I'm hoping someone in the community can verify/correct this statement, only PS has 16-bits/layer internal support, and even that is far from complete.

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

Postby JavaJones » Wed Dec 13, 2006 2:44 am

Photoshop CS2, the latest version, has decent 16+bit support. If you have that version, or at least CS1, then you're not screwed re: trying to get rid of the steps. Otherwise all bets are off. ;)

If you do have CS2 but you haven't been working in 16bit/channel mode in creating your base map, you'll have to run a gaussian blur or similar on it in Photoshop *after* converting to 16bit/channel.

An alternate path from Photoshop to L3DT in 16 bit accuracy is to export to 16 bit TIFF then use TerraConv to convert to .TER, which will import right into L3DT.
http://koti.mbnet.fi/pkl/tg/TerraConv.htm

- Oshyan
Visit Outland - Off the beaten path...
JavaJones
Doyen
 
Posts: 115
Joined: Mon Nov 21, 2005 10:18 pm
Location: Outland, CA, USA

Postby piratelord » Wed Dec 13, 2006 9:16 am

Thanks for this. Might try the TIFF to TER method.

Edit: Just tried the simple rescaling method. Worked quite nicely. I'm sure that'll be acceptable. Thanks!

For those very much more experienced, how long would you expect a 8196x8196 image at Horz Scale 4.02 to process?
Does anyone have experience of importing this size map into TSE? We've done a test on a small map, and it made an atlas file 40 times larger then the RAW file.
I managed to produce a RAW file from the 8196 image, and it turned out to be 130 meg, if it's the same 40x increase this is a 5gig landscape file....
piratelord
Luminary
 
Posts: 60
Joined: Sun Dec 10, 2006 2:59 pm


Return to Help and support

Who is online

Users browsing this forum: No registered users and 10 guests

cron