1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Mod Approved! ME World Machine Map Texture Macro!

Discussion in 'Community Creations' started by Jugbot, Mar 13, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194

    For those of you who might know, it is such a pain to make maps for Medieval Engineers.
    For those of you who are resourceful, know that World Machine is an excellent tool for making semi-realistic height maps to import.
    For those of you who have actually made a good height map, know that it is near impossible to generate tree maps, tree masks, and biome maps to accompany the height map!


    So therefore I made a macro that turns imported heightmaps into the other necessary bitmaps.

    The tool is pretty self explanatory when you get it. This macro includes a heightmap input (obviously), along with inputs that allow you to place trails or trees where you want to.


    DOWNLOAD(adfly): ME Texture.dev

    Some example worlds:
    - Wooded Small Mountains [Custom Terrain]
    - Fantasy Mountain Terrain || World Machine
    - Other Examples...


    Tutorial Video by Moi:


    Example Pic:
    [​IMG]

    Device Properties:
    [​IMG]
    //Note that boulders is not yet implemented.

    For those of you that are confused, I will try to make a tutorial as soon as possible :D
     
    Last edited: Dec 5, 2015
  2. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    This looks quite promising. I know nothing of any of this so will hold off until your tutorial is available (and please include the necessary background info for folks completely new to this whole thing). But anyway, I salute your efforts to make map-making much easier and hope this takes off.
     
  3. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    There are some good tutorials for just general world machine that you might want to look at a little, because there are a lot of things you can do in WM that I probably won't cover.
     
  4. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    Hmm, Norton doesn't like your download.
     
  5. CruentaUltio

    CruentaUltio Apprentice Engineer

    Messages:
    229
    Norton doesn't ever like any download, though. The download is 100% safe.
     
    • Like Like x 1
  6. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    Download at your own risk then, I guess. Nothing I could do.
     
  7. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    Added trees density option whilest fixing the macro not being able to be built.

    Lesson learned: cannot use import image on shared macros.

    Now I'm getting crash from ME from the heightmap I belueve, expect another hotfix soon...
     
  8. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    OK, I've got WM. I can make all sorts of pretty (and ugly) terrains. But ME seems to want DDS files in its maps, which WM seems unable to create. How do you work aournd that?
     
  9. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    To get the dds files you will need to simply convert them. Using the web, I found that the gimp extension is good if you know how to get it ;)

    Hope you don't encounter the bug after that... One of my heightmaps continuously crash ME for some reason.

    Almost done with the tutorial :eek:ops:
     
  10. DeeSnow97

    DeeSnow97 Apprentice Engineer

    Messages:
    107
    The fantasy world is quite awesome, but there is a problem: the grass it makes is tiled and doesn't look natural. Have you got any idea to fix it? Or is it already fixed? Just because I love to paint worlds and create big terrains for different purposes, but this bug ruins it in my opinion...
     
    • Like Like x 1
  11. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    Very good observation... This is a bug with ME/the height map not being detailed enough. Apparently the slope/height effects the "seed" for random tiling and flat surfaces make this pronounced.

    Edit: No current way to fix this besides making the world not flat :p
     
    Last edited by a moderator: Mar 18, 2015
  12. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    New version 1.1 allows for full voxel material control along with more variation for stone and grass (now possible to use the _02 versions)

    [​IMG]

    ----- NOTES -----
    Grass is now called material 1 (a&b)
    Rocks_grass/transition material is now called material 2
    Stone is now called material 3 (a&b)
    Everything else should be self explanatory...

    If you have issues, PLEASE let me know, it's the only way they get fixed ;)
     
    Last edited by a moderator: Mar 22, 2015
  13. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    I'm having great difficulty in downloading the new version. Because it's an .exe file, my anti-virus kills it before I can prevent that. Anyway to make it just a regular zip file?
     
  14. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    You are downloading the wrong thing? My file is not a .exe

    EDIT: Just checked and my file is definitely a .dev Make sure in adfly you wait for 6 seconds and click the button in the upper right.
     
    Last edited by a moderator: Mar 24, 2015
  15. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    Quick Update:
    Now there is a flows option! It uses the erosion input to show sediment deposits!

    Here is a visual example, the flows are the vertical lines that show where water might flow. It's a nice detail, but I made it optional regardless ;)
    [​IMG]



    In unrelated matters...
    For best practice, I recommend using a clamp on your terrain to make sure you get as much detail out as possible:
    [​IMG] Use the settings I have above and it will expand the terrain.
    DO NOTE:
    - Expanding the terrain vertically will also change the terrain slope, but...
    - To counteract this, go to world extents, then general to change the max elevation in WM, so your angle-placement problem will be fixed
     
  16. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    I have official run out of ideas for features, so until more voxels are added, please suggest more features! ^^
     
  17. xzosimusx

    xzosimusx Junior Engineer

    Messages:
    662
    Haven't played around with the flows option yet, so I'm not sure how detailed it is currently, but perhaps this could be expanded to make dry riverbeds in the valleys too?
     
  18. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    Love the flow streaks. Moss and lichen where the drips dribble :)
     
  19. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    That addition is a bit specific. Also that is quite specific to whatever map you are making.

    How about another layout generator input that overrides the grass and has a material option? That way there is more flexible use and more stuff can be made with it :)
     
  20. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    I will once and a while spout my ideas onto this forum because I'm too lazy to keep a text document. Also anyone can comment about them.
    - Preview optional output to view what it might look like in game
    - Custom Material Placement layout generator input if you want to place your own materials in certain places...
    - Boulders/rocks? Right now basic is too limited for me to see detailed objects like that...
     
  21. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    Update 1.3:
    - Adds Preview Mode!
    - You can now control the amount of small plants
    - You can now control the degree trees occur at

    Preview Overlay Output:
    [​IMG]

    If you haven't guessed, light blue-green are shrubs n' stuff, and the green are trees.



    NOW ALWAYS REMEMBER TO POST BUGS AND SUGGESTIONS :)
     
    Last edited by a moderator: Mar 28, 2015
  22. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    Nifty new features, Jugbot! Thanks. Now, please help me with the problems I'm having using this wonderful macro.

    I put the macro in a very simple world. I think I have all the wires connected properly to and from the macro, and all the outputs are named as they should be. Here's the WM set-up:

    [​IMG]

    And the macro seems to be working just fine, and it all makes an interesting little world I call "Spike Valley", which previews (thanks to the new features) very nicely in WM, like this:

    [​IMG]

    So, I run WM and created all the output BMPs using the default ME file names. I convert them to DDS textures using DXTBmp, a little program that has served me well in other uses requiring DDS files. I then put these new DDS files into the MedievalEngineers\Content\Scenarios folder where the original files of these names were, overwriting the original files. I made only one change to Scenarios.sbx, which was to make the "FromMaps" scenario public = true. And when I create a new custom world in ME, the FromMaps option is available at the bottom of the list, so I select it and ME loads up and eventually goes into play mode. So far so good.

    But here's where the problem happens. Instead of being "Spike Valley", the map is a perfectly flat plain of grass. No terrain features, no trees, no nothing. What causes that and how do I fix it? Thanks.
     
  23. Ghostickles

    Ghostickles Senior Engineer

    Messages:
    2,077
    guess: heights should be 16 bit? think I remember that from reading the Devs map tutorial, maybe wrong.
     
  24. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    I dunno, Ghostickles. In the end, I did what Jugbot recommened and used a DDS plugin for GIMP to convert the files and this worked. No other method of converting the output PNG files to DDS worked even though I can't tell the difference in the files by looking at them. Oh well.

    Anyway, as I said, it finally worked! Yay! So here's what it looks like with the default 1km map size:

    [​IMG]
    [​IMG]

    This was OK but I thought the valley floor was a bit steep at the bottom. Besides, overall too small for my tastes. So then I jacked the size up to 4km. I was expecting this to make the ground all course-grained with wide flat areas stepping up and down at long intervals, but it actually made the terrain smoother. The smaller version actually had the step effect going.

    Behold the awesome 4km version :)

    [​IMG]
    [​IMG]

    I rather like this. Not too mountainous, not too overgrown with trees.

    The lighting looks rather off in all versions, however. I fiddled with the sunlight settings in ME but it still never looked quite right. Is this something I need to do in WM before taking it into ME? If so, how?

    Anyway, this is fun. Suggestions welcome.
     
  25. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
  26. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    That's all very nice except I don't have Photoshop. But even if I did, how does having more bits per pixel compensate for the lack of pixels overall in a 512 texture? Each pixel counts as 1 voxel or tree on an ME map, so at any map size greater than 512m, you're spreading the texture's pixels out over a wider area than you created them for. With the height and biome maps, this doesn't seem to cause a problem and in fact leads to better results the more you stretch it. But with trees, where each pixel on the texture = 1 tree on the map, stretching the texture over a larger area results in thinner forests. The only way, or so it seems to me, of increasing (or maintaining the usual) spacing between trees on large (> 1km) maps is to have more pixels in the tree textures, which means you have to exceed the 512 pixel limit of free (Basic) WM.

    Invite sent.
     
  27. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    Actually, 16bit does make the maps look highly detailed, even though there is no more pixels.

    You can get the photoshop free trial as I have ;)
     
  28. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    But is that necessarily a good thing? Terrain complexity is the enemy of the cart, the plow, and the foundations of buildings. I actually prefer to stretch 512 height and biome textures over large map areas because it smooths the ground out.

    The stretching of small height and biome textures also leads to some feedback on your macro. Refer back to my post #24 above. The 1st and the 3rd pictures were taken standing on the same hill looking in the same direction at the same hills in the background. The only difference between them is that in the 1st pic, I left all the map size values at the default (1km wide, 250m height) while in the 3rd pic, I set the map to be 4km wide with 500m height. All the textures are the same in both cases.

    In the 1st pic, observe the patch of grass in the lower right corner. Also in the center background, observe the single tree against the skybox atop the dome-like hill at the left end of main chain of pointy hills. With the map at this 1km size, every hilltop, even the tips of the pointy ones, was crowned by a patch of grass, and many hills had single trees growing on their summits. In the 3rd pic, however, with the textures stretched over the 4km map, these anomalous spots are gone.

    My theory on this is that on the small map, the tips of even the spiky hills had small flat areas on top, just barely big enough to stand on, which the angle values for the biome materials naturally slapped grass and/or trees on. At the larger map scale, however, pulling the sides of the hills further apart, plus increasing their height, interacted with how voxels connect to round off the hilltops, eliminating the flat spots where grass and trees grow.

    It appears, then, that the macro's effects are somewhat dependent on the horizontal and vertical dimenions of the in-game map combined with the ratio of that to the size of the height and biome textures. I don't consider this to be a fault of the macro---it's probably unavoidable. I just mention it FYI and for future referrence by other world-builders. If you have small spots of trees and/or grass on your hilltops, you might be able to get rid of them by tweaking the map size in ME's Scenarios.sbx file instead of wrestling with the macro or other devices in WM.
     
  29. Jugbot

    Jugbot Apprentice Engineer

    Messages:
    194
    Changing the height in turn changes the angle of terrain, making it get painted differently. If you want to get rid of grass on mountains, you can go into my macro and increase the convexity selector a bit.
     
  30. Bullethead

    Bullethead Apprentice Engineer

    Messages:
    245
    Now that I have WM Standard, I was playing around with different texture sizes (which can go up to 8096), and I found something interesting. When you select 2048 texture size, the tree map output file from your macro doesn't work although all the others do. Bigger or smaller texture size and the tree map works fine, it just doesn't like 2048 for some reason.

    I'm not sure this is actually anything to do with the macro. When you click on the Tree Map Bitmap Output device, it shows the tree map thumbnail in the upper left corner of the WM screen just like it's supposed to. However, when the output device writes the file, what you actually get is a blank transparency with no multi-color tree pixels at all, so you end up with zero trees on the map if you try to use that file. But this only happens as 2048 texture size. If you use 512, 1024, or even 4048, everything is cool. Very strange.
     
Thread Status:
This last post in this thread was made more than 31 days old.