Page 1 of 1

sloping an entire design map

PostPosted: Tue Nov 23, 2010 7:57 pm
by ChilledOut
I just started using L3DT and it seems like a very interesting program. I am trying to figure out how to add a steady slope to my design map. I want to keep the details that are on the current design map, but also overlay a steady slope, so that one end of the terrain is low and the other end is very high, but there is still considerable variation within it. I also would like the process to be easily repeatable so I can test many iterations of the design map. I feel like there may be a way to do this by blending in an external file. Any ideas?

Thanks!
Josh

PostPosted: Wed Nov 24, 2010 10:03 pm
by Aaron
Hi ChilledOut,

There's no nice pre-baked way to do this in L3DT at the moment. It could be done by a script, or by using ZeoGraph. I'll pop this on the to-do list, and post back here when it's available.

Best regards,
Aaron.

PostPosted: Wed Dec 08, 2010 3:56 pm
by ChilledOut
Hi Aaron,

I've been playing around with scripts and ZeoGraph to get this to work, but I must admit I'm a bit lost. I am able to get the map, and save the map, but I don't see any way to change the values. (The is for a design map. I do see ways to modify a heightfield.) Mind pointing me in the right direction?

Thanks,
Josh

PostPosted: Wed Dec 08, 2010 8:43 pm
by Aaron
Hi ChilledOut,

I've got a nice 'design map slope' script working in the next developmental build. I'm debugging the other changes in the build now, and I'll let you know when it's ready for testing (in a few day's time, I expect). I apologise for the delay.

To make your own script you would need to extract the height layer from the design map (using 'calc.DM.GetLayer'), then modify the heights in the layer using 'map.GetPixel' / 'map.SetPixel' (in a do/while loop), then apply the changes back to the design map using 'calc.DM.SetLayer'.

Best regards,
Aaron.

PostPosted: Wed Dec 08, 2010 9:47 pm
by ChilledOut
Oh wow cool! That makes a lot of sense and now I do understand how to do it. However, I'm not in a huge rush so I'll wait for your build. Thanks very much!

Josh

PostPosted: Mon Dec 13, 2010 11:14 am
by Aaron
Hi ChilledOut,

I've included an option to add a slope to the design map in the latest developmental build of L3DT Pro. If you have a license, you may download the dev build (Pro v2.9 build 2) from the link in your sales / registration receipt e-mail.

To use the slope overlay, select the 'Graphs->DM_SlopeOverlay' menu option. You will then be asked to enter the slope angle and heading. The slope is measured in degrees above horizontal, and the heading is measured in degrees clockwise from north. For example, a slope angle of 30 degrees with a heading of 270 degrees would result in a 30 degree uphill slope to the west. The terrain altitude pivots around the centre, so the average altitude of the map is unchanged.

Please note that this developmental build contains some experimental features and changes, so you may experience bugs or other odd behaviour. If you do, I would greatly appreciate it if you could report any issues you find.

Best regards,
Aaron.

PostPosted: Mon Dec 13, 2010 6:13 pm
by ChilledOut
Thanks Aaron, it works great!

PostPosted: Mon Dec 13, 2010 9:14 pm
by Aaron

PostPosted: Mon Dec 13, 2010 11:22 pm
by ChilledOut
One thing I noticed is that when I add the slope, it tends to make the existing features less significant. They are still there but less visible in the design map and manifest themselves less in the heightmap as well. Is this what you'd expect?

PostPosted: Thu Dec 16, 2010 10:13 am
by Aaron
Hi ChilledOut,

The slope overlay doesn't change the amplitude of the other bumps, hills, wiggles & cliffs in the design map, and these should still be the same in the heightmap. It will however affect erosion, as a more steeply sloping map will be eroded more strongly.

To demonstrate what I mean, I present the following images:

In the left half of the first image, I generated a heightfield from a normal random design map. In the right half, I tilted the same design map by 20 degrees and re-generated the heightfield. You'll note that the features are pretty similar:
Image

To highlight the similarities, I then took the right hightmap and tilted it back by 20 degrees (this is after it was generated from the tilted design map):
Image

I think you'll notice that the hills and bumps are more or less the same as in the left half as in the right, but that the erosion channels are more prominent due to the greater slope when the heightfield was generated. So, as far as I can tell, the only affect of sloping the design map (other than the slope itself) is the change in erosion strength.

Are you finding otherwise?

Edit: The cliffs / terraces will also be sloped, so there's another difference. They have the same strength, however.

Best regards,
Aaron.

PS: The above experiment shows that if you want strong river channels running in a particular direction, you can slope the design map by ~20 degrees, generate the heightfield, and then slope the heightfield back by the same angle (or a little less). A new trick!

PostPosted: Thu Dec 16, 2010 9:00 pm
by Telarus
aaron wrote:Hi ChilledOut,
PS: The above experiment shows that if you want strong river channels running in a particular direction, you can slope the design map by ~20 degrees, generate the heightfield, and then slope the heightfield back by the same angle (or a little less). A new trick!


:shock: Niiiiiiiiiiice one.