L3DT users' community
Large 3D terrain generator

Attribute Map - detecting depressions and basins

Any and all chit-chat regarding L3DT.

Attribute Map - detecting depressions and basins

Postby Jakerod » Fri Jun 24, 2016 3:32 am

First off I just want to say thank you for this amazing tool. I've been using it for several years to make maps for ArmA. I feel like almost every terrain maker in the ArmA community uses L3DT so I'm sure all the terrain makers and the people who use the terrain maker's work really appreciate it as well. Keep up the good work!

Now for my problem. I'm working on making a mask for a terrain with mountains. I have the heightmap all set up and I copied the default temperate climate for now and I am adjusting it for my needs. This is what it currently looks like:

https://www.dropbox.com/s/gawx075k9bv5342/l3dt_valley_01.jpg?dl=0

The problem that I am running into is that I can't seem to find a way to get L3DT to recognize peaks from valleys. I'm trying to get a material (Red) to only be present in that valley in the background and for the most part I got it. The problem is that it is also appearing on the tops of ridges (foreground). In a similar manner, I am trying to get a material (not pictured) to only be present in depressions to use as a vegetation mask of sorts but it has the same problem of going in both depressions and peaks. I've tried using a mixture of curvature and water but it doesn't seem to work... at least not all the time. I've also tried messing with the water-table modeling parameters in hopes I could somehow get stronger water up in these higher elevations but haven't had luck with that and they aren't documented any place I have found.

I've found that I commonly run into this peak vs valley problem when trying to make attribute maps and thought I would finally ask if you have any recommendations for getting the results I want.

Thanks again,
Jake
Jakerod
New member
 
Posts: 7
Joined: Fri Jun 24, 2016 2:58 am

Re: Attribute Map - detecting depressions and basins

Postby Aaron » Tue Jun 28, 2016 3:12 pm

Hi Jakerod,

Thanks for your question, and sorry for my slow reply. I think you're right; there's no particularly robust way to detect ridges and valleys in L3DT, and there really ought be. The water table modelling does this sort of, but it's far from ideal. I've started on a new plugin to test a few suitable algorithms (a wider curvature calculation, and also watershed analysis), and if I can get one or more behaving nicely, I'll bash it/them into the attributes map calculation and update climates / land types / dialog boxes accordingly. I'll post back here when I have some results to show and/or updates to test.

Thanks again for the suggestion, and sorry for not having a quick solution to the problem.

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

Re: Attribute Map - detecting depressions and basins

Postby Jakerod » Fri Jul 01, 2016 12:21 pm

Hello Aaron,

No worries about the reply. It wasn't slow at all. Looking forward to the updates.

Thank you,
Jake
Jakerod
New member
 
Posts: 7
Joined: Fri Jun 24, 2016 2:58 am

Re: Attribute Map - detecting depressions and basins

Postby Aaron » Tue Jul 05, 2016 3:09 pm

Hi Jakerod,

Just a quick progress update:

I tried to find ridges and valleys using watershed analysis. The results were interesting, but not actually useful for this problem. I may use that algorithm for something else later.

I then turned to calculating the Gaussian curvature of the heightfield. Using some horrible kludges (including a terrifying 28-stage filter graph), I managed to get some rough but possibly promising results:

Image

Here blue = concave / valleys.

Compared to your image, I guess I need to more aggressively filter out the steep concave gullies running down the mountainsides, leaving just the flatter basins. I may also need to down-sample the heightfield to filter out the small ridges within the depressions. I'll keep at it, and post back here if I can come up with something usable.

Best regards,
Aaron.

Update: slight improvement, but still unwieldy. Combining the curvature and gradient data to identify valleys requires a bit more thought.

Image
User avatar
Aaron
Site Admin
 
Posts: 3655
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Attribute Map - detecting depressions and basins

Postby Jakerod » Wed Jul 06, 2016 12:26 am

Hello Aaron,

That's looking great so far!

I mentioned that I wanted to do two things which are as follows:
1.) Figure out were larger valleys were so I could create grassy valleys up in the mountains without them going up on mountain tops
2.) Figure out where vegetation would most likely grow

I feel like both of those pictures are huge steps in the right direction. The top one seems like it would be quite useful for the vegetation mask and the bottom one for the valleys.

Thanks a lot for this and I look forward to seeing the final results.

Jake
Jakerod
New member
 
Posts: 7
Joined: Fri Jun 24, 2016 2:58 am

Re: Attribute Map - detecting depressions and basins

Postby Aaron » Sat Jul 09, 2016 8:53 am

Hi Jake,

Okay, I think I've worked out how to integrate this with the existing climate system without breaking too many other things. It's likely to take a couple of weeks to make and test all the changes, but I'll post back here the moment I've got something ready for you to try out.

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

Re: Attribute Map - detecting depressions and basins

Postby Telarus » Wed Jul 27, 2016 8:48 pm

Neat! Really looking forward to this function.
Telarus
Doyen
 
Posts: 111
Joined: Mon Jun 01, 2009 12:34 am

Re: Attribute Map - detecting depressions and basins

Postby Aaron » Mon Aug 08, 2016 12:09 pm

Hi Guys,

I'm terribly sorry for the delay. This is turning out a little more hairy than I expected (much work on ZeoGraph, mostly new filters and UI improvements to save my sanity when developing the processing graph). The good news is I think I've finally found an appropriately stable and sensible algorithm for generating a valley mask that can be used to modify the attributes map, and I think it even as enough inputs and parameters to allow users to meaningfully fine-tune the output.

However, there is still a bit more work to do before it's actually usable:
  • My heightfield curvature calculation gets a little funky at the map edges, and needs some fiddly weighting tweaks for edge cases.
  • I really need to include a user interface for the calculation parameters that's a little more refined than just editing pin values in ZeoGraph.
  • The calculation that applies the valley land type to the attributes map should take into account the fit scores of other land types, instead of just baking over the top of all land types within the mask areas.
I'd certainly like to have the first and probably the second item resolved before I release any update for testing. The third item is more complex; there are a couple of ways to tackle this, and I need to work out which is best and/or easiest. Experiments will follow.

Anyway, I apologise again for the delay, and thank you for for your patience. I'll try to get something rough and ready for testing ASAP.

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

Re: Attribute Map - detecting depressions and basins

Postby Jakerod » Thu Oct 13, 2016 12:40 am

Hello Aaron,

No worry about the delay (says the guy who responds 2 months later). How have things been going with it?
Jakerod
New member
 
Posts: 7
Joined: Fri Jun 24, 2016 2:58 am

Re: Attribute Map - detecting depressions and basins

Postby Aaron » Mon Oct 17, 2016 1:18 pm

Hi Jakerod,

I'm really sorry for my slow progress here. I've been flat out with work since the start of September, and have not been able to give this task the time it required. Fortunately, the two projects I was working on have both been delivered this last week, and I've pretty much caught up on lost sleep, so I should be able to resume work on L3DT shortly.

With regards to this specific feature request, I believe I got this very near to the point of public testing; I just needed to do a little tweaking of the default parameters, then bundle up the new filters and plugins in a new installer. This should not take me more than a week to complete.

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

Re: Attribute Map - detecting depressions and basins

Postby Jakerod » Mon Oct 24, 2016 2:46 am

It's no problem. I haven't been working on much terrain stuff lately anyway. That sounds like a rough month and a half but I am glad to hear that you have both got caught up on your sleep and that the feature is getting closer!

Thanks,
Jake
Jakerod
New member
 
Posts: 7
Joined: Fri Jun 24, 2016 2:58 am

Re: Attribute Map - detecting depressions and basins

Postby Jakerod » Sun Feb 05, 2017 8:56 pm

Hi Aaron,

I was just wondering if there has been any more progress on this.

Thanks,
Jake
Jakerod
New member
 
Posts: 7
Joined: Fri Jun 24, 2016 2:58 am

Re: Attribute Map - detecting depressions and basins

Postby Aaron » Mon Feb 06, 2017 1:07 pm

Hi Jake,

I'm terribly sorry for the delay here. I've got a rough demo version working in the most recent build, but unfortunately I've not yet had time to write the guide for how to use it yet. I can give you the brief rundown here:

1) Select 'Graphs->More graphs' in the L3DT menu, then select 'ValleyMaskGen'.
2) Edit the mask generation settings, if desired (sorry, no description yet; will follow when time permits.)
3) Select 'Operations->Attributes mask->Mask overlay' in menu.
4) Check 'Use project mask', and select 'ValleyMask' layer.
5) Set threshold as appropriate (low value->more mask coverage, high value->low mask coverage)
6) Choose the desired climate & land type for thee mask overlay.
7) Press OK, and wait for calculation.
8) If you don't like the result, use 'Undo' to restore the attributes map.

I should be able to find some time to put the tutorial together either on the weekend or sometime next week.

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

Re: Attribute Map - detecting depressions and basins

Postby Jakerod » Thu Feb 09, 2017 1:15 am

Hello,

Good to hear that it's working! And no problem about the delay.

Unless I'm missing something I think that I have to wait a few days to get it. I think I need to re-purchase a license; it seems like my pro-dev account expired a while back. So unless I'm mistaken I will wait until the 12th or 13th and get back to you to get the updated version.

Thanks again for adding this!

Jake
Jakerod
New member
 
Posts: 7
Joined: Fri Jun 24, 2016 2:58 am


Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron