Sign in to follow this  
Xeon

WGenerator - Arpy's Edit

Recommended Posts

Not to plug myself but my version has a reload water button if that's what you're looking for - though if Eitr has a progress bar I'm jealous, been too busy this week (and now too drunk) to make any progress on my version. I should have some updates this weekend, though I'll look over Eitr if he's got it on GitHub and possibly merge.


Share this post


Link to post
Share on other sites

why is it all these map makers if you want like 100-200+ dirt you get these massive flat ridges around the mountains?


 


I never noticed that in WO maps.


 


The only way to not have this is to have no mountains...?


Edited by Uberknot

Share this post


Link to post
Share on other sites

why is it all these map makers if you want like 100-200+ dirt you get these massive flat ridges around the mountains?

 

I never noticed that in WO maps.

 

The only way to not have this is to have no mountains...?

 

WO maps typically don't have dirt layers that are 100-200+ dirt deep; not sure about recent maps, but JKH had a dirt layer about 60 dirt deep.

 

By flat ridges do you mean the large slopes caused by dirt sliding? If you're using my edit or any map generator that uses my edit you can disable the dirt sliding feature via the "Land Slide" option. Also if you are using my edit you can change the way dirt drops on slopes with the "Cliff Ratio"- you can think of it like setting the surface tension of the dirt; a value higher than 1.0 causes dirt to bead up, while a value lower causes dirt to spread out and "seep" up slopes.

Share this post


Link to post
Share on other sites

Indy has 300 or so in places......one thing I noticed is these map makers have all the exact same dirt depth unlike the games.


 


It would be nice to have dirt smoothing or filling...where the dirt get moved around abit.  I'll have to try out the different options and see what the dirt levels come up as.  The flats always happen where the last level of dirt and mountains meet.  


 


If you want to see what I mean dirt 1 dirt on a map.....then drop 200 and zoom in.


 


The transition from the top of the dirt level and where the mountain meets just always looks unnatural.


 


1 dirt everything looks smooth an flows evenly along the terrains.


 


This is why I was wondering if there is a way to use several dirt drops combined. and stagger the amount of dirt dropped as you lower elevation.  


 


Here are a few ss's.


 


Basically if i could write this i would have a scalable drop of dirt.


 


You would start at 1 and then tell the program to drop dirt every x feet down of elevation at y amount....maybe even have a variable for more or less progression as you dropped dirt in elevation.


 


In other words instead of this strange thing going on at the top of the dirt drop have it scale to dirt less at the top height and more at the bottom....maybe its too much to ask....


 


Lets say I wanted to end up with 150-250 dirt at the bottom of the map and start with 1 at the top height is there anyways to scale the dirt drop like that and end up with a smooth looking map like when I dropped 1 dirt in the SS?  Of course there is it just takes the right formula and programming....I only have ever done basic programming years ago.  Or is this program so limited it cannot do something like I am asking?


 


 


 


 


1 dirt.   8zh74l.png


 


200 dirt...


29b2hlh.png


 


200 no slide


 


qoinar.png


Edited by Uberknot

Share this post


Link to post
Share on other sites

I just found a bug in the dirt drop function, so now it actually caps the dirt at the max height. This leads to flattened tops though:


 


ioG1aeu.png


 


I'll see if I can't tweak it to drop less dirt proportional to how close to max height it is.


Share this post


Link to post
Share on other sites

Bug?

Heres the result with a heightmap painted in Photoshop CC 2015

PNG (16bit grayscale no compression)

Saved with "Save As..." Compression = None , Interlace = None

Same PNG in both

http://i.imgur.com/7aUvVPp.jpg

PNG here if you want https://dl.dropboxusercontent.com/u/22781761/Downloads/heightmap.png

Result with WGenerator Ahiri's Mod http://i.imgur.com/hqQqtIV.jpg

 

i can confirm this is from not flattening the image in PS before saving, even if you have only one layer and its in 16bit greyscale mode, right click n flatten, should see the little lock on it :)

Share this post


Link to post
Share on other sites

Regarding the dynamic dirt I was playing around with Buddha's map gen and after changing it to a single pass dirt drop (instead of 1 dirt per tile per pass), I was able to add something like that:



public void dropDirt(int dirtCount, int maxSlope, int maxDiagSlope, int maxDirtHeight) {
double maxSlopeHeight = maxSlope * singleDirt;
double maxDiagSlopeHeight = maxDiagSlope * singleDirt;
double maxHeight = maxDirtHeight * singleDirt;
double adjMaxSlopeHeight, adjMaxDiagSlopeHeight;
double adjMaxHeight = maxHeight - waterHeight;
double tileHeight;

long startTime = System.currentTimeMillis();
for (int x = 0; x < heightMap.getMapSize(); x++) {
for (int y = 0; y < heightMap.getMapSize(); y++) {
tileHeight = getTileHeight(x,y);

if (tileHeight > maxHeight)
continue;

if (tileHeight < (waterHeight - (2 * dirtCount))) {
Point dropTile = findDropTile(x, y, maxSlopeHeight, maxDiagSlopeHeight);
addDirt((int) dropTile.getX(), (int) dropTile.getY(), dirtCount);
continue;
}

adjMaxSlopeHeight = Math.abs(maxSlopeHeight * (1 - (tileHeight / adjMaxHeight)));
adjMaxDiagSlopeHeight = Math.abs(maxDiagSlopeHeight * (1 - (tileHeight / adjMaxHeight)));
Point dropTile = findDropTile(x, y, adjMaxSlopeHeight, adjMaxDiagSlopeHeight);
addDirt((int) dropTile.getX(), (int) dropTile.getY(), (int) (dirtCount * (1 - (tileHeight / adjMaxHeight))));
}
}
logger.log(Level.INFO, "Dirt Dropping (" + dirtCount + ") completed in " + (System.currentTimeMillis() - startTime) + "ms.");
}

Share this post


Link to post
Share on other sites

I am not able to Drop Dirt on custom height maps. I get the following error (below).

 

java.io.IOException: The system cannot find the path specified
	at java.io.WinNTFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(Unknown Source)
	at com.wurmonline.wurmapi.api.MapData.createMap(MapData.java:74)
	at com.wurmonline.wurmapi.api.MapData.<init>(MapData.java:40)
	at com.wurmonline.wurmapi.api.WurmAPI.<init>(WurmAPI.java:49)
	at com.wurmonline.wurmapi.api.WurmAPI.create(WurmAPI.java:26)
	at net.buddat.wgenerator.MainWindow.getAPI(MainWindow.java:2420)
	at net.buddat.wgenerator.MainWindow.updateAPIMap(MainWindow.java:2463)
	at net.buddat.wgenerator.MainWindow.updateMapView(MainWindow.java:2443)
	at net.buddat.wgenerator.MainWindow.actionDropDirt(MainWindow.java:1765)
	at net.buddat.wgenerator.MainWindow$34$1.run(MainWindow.java:1487)
Exception in thread "Thread-8" java.lang.NullPointerException
	at net.buddat.wgenerator.MainWindow.updateAPIMap(MainWindow.java:2463)
	at net.buddat.wgenerator.MainWindow.updateMapView(MainWindow.java:2443)
	at net.buddat.wgenerator.MainWindow.actionDropDirt(MainWindow.java:1765)
	at net.buddat.wgenerator.MainWindow$34$1.run(MainWindow.java:1487)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this