Page 1 of 1

Gradient with SRTM

PostPosted: Wed Apr 14, 2010 3:28 am
by DSXC
Hey all,

I'm now trying to smooth out the gradient on the SRTM heightmaps so that there's not a huge 100m drop when you hit sea level. Some areas that would probably be OK, but on coastal beaches it's not.

Is there anyway I can use a function (preferably a script) that would allow me to smooth out the drop going slowly from 0m (water level) to -100m somewhere off the coast (say a range of 500m out). Or even to be able to start off slowly and increase the farther out you go.

At the moment I have to import each map into my terrain editor, raise the ground close to the shore and then smooth it out... but this takes ages for one map let alone 50 or more.

Is there anything like this available?

Thanks and regards,
DSXC

PostPosted: Wed Apr 14, 2010 10:12 pm
by Aaron
Hi DSXC,

L3DT does not currently have a 'fill in' function such as you request*.

It would be possible to implement this entirely within a script, but the speed would be pretty poor for this type of calculation (too many loops). I'll make a plugin to do the heavy-lifting. It's now on the to-do list for v3.0.

Best regards,
Aaron.

* Not completely true. The water table flooding algorithm does just this to fill in holes in the water map, but it would need to be adapted to fill in holes in the heightfield.

Re: Gradient with SRTM

PostPosted: Mon May 02, 2011 1:04 am
by DSXC
Hey Aaron,

I had seen this on the TODO list and now I can't seem to find it anymore. Has it been implemented without me seeing or has it been put on the back burner for now? I'd really love to be able to do this.

Also, I've been playing with C# lately and have created a LibHFZ in dotNet to use with Unity3D (well I've finished the loading side atm, I need to do the write) would you like it?

Thanks and regards,
DSXC

Re: Gradient with SRTM

PostPosted: Tue May 03, 2011 1:07 pm
by Aaron
Hi DSXC,

Sorry, this feature has been pushed back to the unscheduled features list along with all the other features that won't make it to v3.0. I think it has a good chance of percolating back onto the plan for v3.1.

A C# port of libHFZ may be very useful indeed. I'd be happy to link to or host any such code. If you e-mail a zip of the code to aaron@bundysoft.com along with any acknowledgement/copyright/licensing notices I'll pop it up on the website ASAP.

Best regards,
Aaron.