Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Map Magic World Generator - a node based procedural and infinite game map tool

Discussion in 'Assets and Asset Store' started by Wright, Mar 10, 2016.

  1. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    MapMagic World Generator is a node-based open scene editor, designed to create procedural and infinite land.

    It uses node a interface to determine a creation logic: each generator (like noise, voronoi, blend, curve, erosion, scatter, forest, etc) is represented by the node on the graph. Once nodes’ inputs and outputs are connected the magic happens: a game map will be created without any human involvement. No need in a painstaking work for sculpting and drawing the vast terrains, placing a thousands of objects, painting a fields of grass: just give your orders to the plugin if form of the node graph and it will do a map automagically!

    It's not just a pure terrain editor: about the half of all the nodes devoted to object placement and adjustment.



    MapMagic_1.jpg MapMagic_2.jpg MapMagic_3.jpg MapMagic_5.jpg

    What it might be used for:
    • Creating of extensive open world territories. Let MapMagic do the main job, and then just detail the key places;
    • Creating horizon terrains, where player cannot walk but must see;
    • And since MapMagic can create new terrains when player walks through the land and weld them to the existing ones, it can create literally infinite worlds.
    • Terrain prototyping, as all the terrains created with the plugin could be modified manually the way Unity standard terrains could;
    Some other useful info:
    • It works with standard Unity terrains, uses standard splatmaps (alphamaps), and standard trees and grass/details feature. So if you are wondering if some shader or asset will be compatible with MapMagic then the answer is “yes” if it works with default Unity terrain.
    • Except the infinite terrain feature, terrains created with MapMagic do not require the plugin anymore. You can easily remove the plugin (to reduce the build size, compile time of for any other reason) and have your terrains unchanged.
    • It is seed-based. It gives the ability to create random unexplored worlds each time the player starts the game, and all of these world will be built using the same node-driven algorithm.
    • Map Magic comes with all the assets seen in demo. They could be used for level prototyping as well as to be included in your final game build.
    Since v1.5 it supports multiple biomes - different graphs could be mixed together in one scene (video).

    Get Map Magic at the Asset Store
    Download Free Evaluation Version

    Documentation
    Issues/Ideas
    Web site
    Facebook page
    Video Tutorials
    Community graphs


    I'd like to announce the beginning of the public MapMagic 2 Public Beta test. It is the analogue of MM1 evaluation version, so anyone (including the ones who have not got MM1) can download it and fiddle with it

    Check this instructions page for Beta download link and more details. Please pay attention to the bug reporting description - at least it's the purpose of the beta test.

    All who bought MM1 starting on December 1 or later will get a free upgrade to MM2. All who bought it before (regardless of time) will get a 50% discount on MM2.

    The price of MM2 could be slightly higher than MM1. However the final MM2 release date still depends on the amount of bugs found and their severity, so I'd like to recommend you buying MM2 on release rather then buying MM1 now and keeping it on the shelve.
     
    Last edited: Dec 29, 2019
    goonya, XelasDev, ajoge and 10 others like this.
  2. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Cool! Can you tell us more about the erosion? Is it channel based, thermal, etc. or just simple erosion like the erosion brush.

    Looks very nice!
     
    Quatum1000 and Wright like this.
  3. NightAvail

    NightAvail

    Joined:
    Feb 23, 2015
    Posts:
    13
    Congrats on the release! I enjoyed the beta testing so I picked up my copy. :)
     
  4. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    Teila, thanks! Erosion algorithm uses both hydraulic and thermal actions: internally it creates a map of torrents - water flow directions - using heightmap slope orientations and elevation changes. Torrents perform a hydraulic action on the surface (depending on the richness and speed of the torrent), washing away the ground. The amount of washed away ground forms a sediment map, used to transport ground according to torrent directions. Thermal action is applied afterwards by passing some amount of ground downhill, the randomness of this amount could be controlled by ruffle parameter. It is all repeated the desired number of iterations. I will not judge whether it is simple or not :)

    Edit: I've just remembered that you've already got Erosion Brush. Yes, it is the same algorithm, a bit enhanced, but there's no reason to expect a revelation when switching from EB to MM. Erosion should be calculated in a few seconds to work with dynamic terrains, while WM has some time for it. I'm thinking about wind erosion to create dunes and mesas, and maybe hydraulic erosion will be upgraded by the way. If you have any ideas on how to improve EB erosion I will gladly hear them and maybe try to implement.

    NightAvail, thanks, glad you've enjoyed the beta!
     
    Last edited: Mar 11, 2016
    DesertRaven likes this.
  5. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,246
    That looks nice, a bit like Filter Forge. But could you use just for texture and heightmap generation too and in code for procedural stuff or is it only for terrains?
     
  6. witchscroll

    witchscroll

    Joined:
    Jan 17, 2015
    Posts:
    131
    just saw the tutorial video on youtube. nice asset.

    1
    can it modify exist standard terrain? forexample, add noise.... replace a tree....
    2
    can user change where they want to higher/lower ?
    3
    love the trees and grass, good to hear they are included in this plugin.
     
  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    andyz, It depends on the procedural stuff :) There is a callback on applying heightmap, splatmap, objects, etc. so you can intercept any data before apply and process it with your scripts. For example, if you are using a mesh instead of standard terrain, you can apply height information in a form of float[,] to your mesh with a custom function, that will be called before setting terrain heights. You can even convert it to texture to use it on some object (but in this case there could be a more straightforward solution).

    witchscroll, MM does not work with already made terrains (however, I've got a "MapMagic as an editor tool" in my roadmap). But you can use Raw Input as a base heightmap for your land. This heightmap could modified, detailed and changed in any way you want. It does not have to be detailed - you can mark high and low areas, and then add details with Map Magic algorithms.
    Btw there is no exact binding "one raw - one terrain". You can use raw map for several terrains, and each will load it's own part from the map. You can even use one map to give an initial form to the whole dynamic continent.
     
    Last edited: Mar 11, 2016
  8. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Well done.
    This is a very impressive looking package.

    Not a requested feature, just curious - Are any of the parameters you explained in response to Teila's post - animatable? Example showing some erosion occurring during real-time game-play triggered by an event happening in game.
     
  9. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    251
    yes, looks amazingly great, :)
    I have a question cause i want to try landscapes with VR when i have my Vive.
    As far as i know, the terrain shaders are very performance intense,
    so i have in mind to use lowperformance and maybe VR optimized shaders on terrainforms.

    So my question is, is it possible to export the finished terrain as a mesh?
     
    Wright likes this.
  10. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    hello,

    is possible de make a world like Florida and how to place villages/cities or other statics things in the world ?



    +++
     
  11. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    theANMATOR2b, thanks, it's nice to hear that. I've never thought about changing any of the generator's parameters in a playmode. But I like the idea and think that it could be useful. There is no such a feature in this version, and I cannot promise that it will be implemented, but I will think about at leisure.

    Hormic, thanks! MM generates a standard Unity terrain (or several terrains). And since it is a standard terrain it could be exported to mesh with the scripts like this one.

    tequyla, there are two types of terrains: "pinned" terrains are generated and displayed in editor. Once terrains were generated, you can modify them the way you want - add villages, cities, things. The second type are dynamic terrains - they are not editable and generated in a playmode. So you can create some pinned terrains for villages - they could even be not connected together - and let MM fill the spaces between them automatically in playmode.
    MM works with no problems on a distances about 400 km from the origin. It could be compared with the Florida size. However on such a great distances you can encounter some graphical engine artifacts with shadows, z-fighting and maybe something more critical.
     
    Last edited: Mar 11, 2016
    kjkrum and Hormic like this.
  12. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    hello Denis,

    Thanks.

    In the pocket !!!

    +++
     
  13. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hey Denis, amazing plugin!

    If i want a non-infinite terrain that is not squared (let's say 5000 x 10000), what would be the best way to achieve that?

    Many thanks
     
  14. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    tequyla, enjoy )

    iddqd, thanks! If you want a non-square terrain you can just pin terrains in any shape you like:
    PinTerrains.gif

    But using a terrain grid of 5*10 terrains (if a terrain size is 1 km) can have a tremendous impact on game size and performance. I'd like to recommend using the approach described above: some of your key points are made with a pinned terrains, while the the rest is generated in realtime.
     
  15. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Perfect! Just what i was looking for.
     
  16. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    is possible to create area delimited by spinned tile ?

    for example: i have a map with desert and forest. areas and in between forest zone (mountain zone) and desert zone (flat terrain) there is river.

    is possible to close world with border like sand aera like an island ?

    +++
     
  17. witchscroll

    witchscroll

    Joined:
    Jan 17, 2015
    Posts:
    131
    just buy it.

    1
    after import the package. 2 red errors show,
    one is 'asset/mapmagic/demo/scripts/guistarter.cs' , the other is 'guicontroller.cs'
    after delete these 2 scripts, the plugin work. but the gui demo scene brokend.
    they need to be fixed. hope the fixed version coming soon.
    2
    can not get preview to work. all 3 options allways grey.
    3
    when i place tree in terrain, it looks like trees didnot stand on terrain, but stand on a same level below terrain.
    allready have a look at your tutorial videos, need more, such as something about tree, grass...
    4
    all trees in demo floder have unique shader named natrure/mapmagictrees , may i change it to unity's default shader?
    and what's the "wind" in shader work for?
     
  18. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    witchscroll, thanks for your report! However, I need to clarify some details to make a fix:

    1. What were these errors about? At least what lines of the code they highlight? When did they occur - right after package importing, or when opening demo scene?
    Was it something about "the GUI scene could not be loaded because it was not added to the build settings"? And if it does, have you tried adding it?

    2. Were you clicking on an empty field or on the generator itself? Or was it a click on a blue output icon?
    Preview2.gif

    3. Were you using your custom tree or it was demo scene tree? Were you using Floor Generator? I know some things are not obvious in Map Magic for a beginner, so the tutorials is what I'm working on now. I plan to go on making a series of the tutorial videos like those devoted to heightmap and textures so that all of the generator types will be mentioned in at least one of the videos.
    Floor.jpg Floor.gif

    4. You can change any of the tree parameters, including materials, textures, shaders - it will not break Map Magic. Personally I don't like the default Unity tree shader "Nature/Soft Occlusion" because it does not receive shadows, and the standard shader has no vertex animation (btw this is what wind parameter for).

    tequyla, you can use Raw Input not only as a heightmap, but as a texture that defines your zones. For example low (black) values will be the sand, and high (white) will be the forest. To make an island or an oasis you've got to use raw file which has a white circle on a black background. All of your terrain will become endless desert (because black values are default in Raw Input) except an area of the forest.
     
    Last edited: Mar 12, 2016
  19. witchscroll

    witchscroll

    Joined:
    Jan 17, 2015
    Posts:
    131
    1
    right after package importing.
    no.
    2
    yeah, i found it. thanks.
    3
    see what i have done.
    temp1.JPG
    i added the floor but the tree still ....
    4
    thanks.
    5 [new question]
    if i use 'input raw', after brose and chose my own raw file[export by unity from an existing standard terrian] and link to your panel, unity became unresponsive. i have to end it by windows task manager.
     
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    And - what were these errors? Could you please take a console screenshot?

    You have to connect Curve output to the Floor's Substrate input - like in an image I've send above.

    What is the resolution of your raw file? If it is not classified, could you please send it to mail@denispahunov.ru? Thanks!
     
  21. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Just to say, I hugely enjoyed the beta for this, it's very natural and smart and gets great results quickly, additionally can work very well alongside other terrain assets rather than replacing them, the erosion and pinned terrain ideas are unreal. Highly recommended
     
  22. witchscroll

    witchscroll

    Joined:
    Jan 17, 2015
    Posts:
    131
    ok

    1
    about the 2 red errors
    I allready deleted the 2 scripts i said above, then clear the console , so they gone.
    but in order to show you the issue, i delete whole mapmagic floder, then reimport the package.
    the 2 red errors show.
    temp2.JPG
    see, they can not be clear by the clear button on console. the only solution is delete the 2 scripts.
    2
    about the trees, thanks.
    3
    about the raw file, i have no idea.
    4
    is there a way to adjust the distance of 2 objects [such as 2 trees]?
     
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    witchscroll, wierd. I could not reproduce this error by re-importing package I've sent to Unity. I don't believe it was changed somehow during the review, but I think I need issue a voucher to myself to be sure :)
    I assume you are using Unity 5.3.1 or later, right?
    Anyways, here is a scene merged with GUI. And a GuiController.cs just in case. Thanks for pointing out this problem.

    lazygunn, thanks a lot! Really glad to see such a warm feedback!
     
  24. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I would love to learn more about this. So...the dynamic terrains are not editable, but can you place wandering mobs on them? Or are they just empty terrains to make the world seem larger. I am guessing the player can still move through the dynamic terrains. Do they generate in run-time and stream as the player moves across the terrain?

    Trying to wrap my head around this asset. lol
     
    theANMATOR2b likes this.
  25. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    102
    First of all, this is awesome, I've to bow before your fantastic work! Several weeks ago I started to implement my own procedural terrain generator similar to your concept. Now I could rodding anything, set up on your impressing work and boost up my development. This plug-in is just what i was looking for.

    BTW: I could not found the SampleGenerator.cs file you are talking about in your manual.
     
  26. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    BTW, the manual seems to be not available on the website. Anyway you can let us see that? I think, but am not sure, that I can use this.... lol
     
  27. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    Teila, :D Ok, I've got it: I should build some sort of a demo version (with a limited functionality or something). It's better to see and feel it once than try to comprehend it just reading the forums.

    Exactly. Actually, there is no "dynamic terrains" in editor: here you
    - pin some of the terrains,
    - customize the graph,
    - adjust terrains manually if you wish to (all the further graph modifications will reset your manual edit),
    - and then turn on playmode: all of the "missing cells" in editor will be filled with dynamic terrains as camera comes close to them. These terrains do not differ from the pinned terrains - except that they do not have custom modifications.They have full detail, player can walk there and fight mob (yep, monsters could be placed by MM just like any other prefab).
    Pinned.gif
    Wow - thanks a lot for such a great feedback - I really appreciate it!

    Manual: fixed (here)
    SampleGenerator: here
     
    Teila likes this.
  28. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I bought it! Added it to my other pile of terrain tools. :) I am reading through the manual and very impressed. I plan to use one my height maps and see what happens. I use WM so the nodes are similar in some ways.

    Thanks! Your diagram above helped a lot.
     
  29. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Oops, forgot to ask..will the procedural generation work with multiplayer?

    If two players run the same direction, will they see the same terrain? Can the auto generation be set to a seed and that seed used every time?
     
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    Glad to help!

    The only things that can make a terrain different for the same area are:
    - obviously graph structure and generator parameters
    - Global Seed value (next to the Generate button in graph editor)
    On any computer, any time the land will be the same until these parameters match.
     
    Teila likes this.
  31. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    102
    My pleasure, good work must be honored ;) And thank's for your fast support.

    Meanwhile I started to implement my first custom generator based on your manual. Without starting nagging, you should extend your manual with some implementation details, how we should use your SDK and GUI elements. I fiddled some time in your asset source code to figure out how I could get the global seed value and how your GUI elements work.

    I know it's hard work, and that what each programmer dislike (me too), but I think it could boost your Plug-In too. I could hug you for the possibility of node extensions :)

    BTW: I think there is a bug with the SmartField implementation. The min value setting is ignored.
    Code (CSharp):
    1.  layout.SmartField(ref this.seed, "Seed", min: 0, max: 10);
    In my custom generator the lower bound is ignored, I could decremtent the value in the field by mouse dragging less than zero. The upper bound is handled correctly, the value limit is 10.

    Edit: I figured out that the problem refers to the zero value at the lower bound. On a 2nd Smart field I've defined:
    Code (CSharp):
    1.  layout.SmartField(ref this.octaves, "Octaves", min: 1, max: 10);
    In this case the lower and upper bound works as expected.

    Have you think about a ticket system? Where we could report our bugs and maybe future requests?

    Additional Question: How I could set a toggle button (checkbox)? I checked your Layout implementation, and only find a CheckButton (does not work, failure report will follow). If I use the Unity EditorGUILayout, nothing is rendered ...
     
    Last edited: Mar 12, 2016
  32. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I am having a problem.

    I use World Machine to create height maps. I tried to use your input for the raw height map and every time it freezes. WM exports as .r16. I attempted to import that file and it froze. I think changed the extension to raw and it froze. Unity allows you to import .r16's so tried that first.

    Not sure what to do to import height maps, which is what I need to do.
     
  33. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    Hellhound_01, yeah, I know I've got to make an API description. And I certainly will when things will calm down a bit: for example there will be no "SmartField" in the next version - all of the smart fields, standard fields and sliders are grouped together in "Field" function. It will be the universal wrapper to EditorGUI functions to make them scroll and zoom (compared to several similar wrappers now). Toggle is already here too - you've got to call layout.Field(ref myBool) to display it. New "field" has a bug with zero min and max fixed.

    Teila, I've re-checked it and still could load 2048*2048 heightmap from WM 2.3.7, I've tried with a files named both .r16 and .raw. So it seems that the problem is with a file itself. What is your raw resolution? Could you please send it to mail@denispahunov.ru to let me try to reproduce the freeze.
     
  34. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I did get it to work, just very buggy. The file imported just fine but it took a long time to load. The file is fine since I have used it in Unity before.

    I am having other buggy issues. Sometimes the terrain just disappears, no longer in the scene. I can click around sometimes and get it back but other times it actually disappears from the scene.

    Also, you say you can edit any pinned maps, but I can't find a way to do that. I can only have one terrain per scene, which makes sense, and only one output. So how do I edit the other pinned terrains? I am new to 5.3 since we have not upgraded our project yet, so maybe there is something I am missing.

    Edit: I put the height map as an input into the noise and it is frozen again. I am getting an error that I am trying to access a terrain that was destroyed and yet the terrain is there.
     
  35. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    BTW, this is was what I am wanting to do, but....it really doesn't work. Putting the raw map works fine but you will need to have something to generate. Terrains around the "raw" terrain have no input so they just generate flat.

    Marking heights might help, but since there is nothing in the manual about how to do this or in the tutorials, I am not sure where to start. :)
     
  36. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    Here is the other gif-tutorial, it shows how to pin new terrains, then scale raw input to fill all of the pinned terrains area, and then edit each of the pinned maps.
    RawInputMultiterrain.gif

    BTW take a look at this Video Tutorials section if you have not done it yet. There are only three tutorials yet, but they can give a general idea about how the plugin works. I feel a bit awkward about the accent, but that's the way it is :)

    Is marking heights an output preview?
    I wish I could do something with those freezes, but I don't even know your raw map resolution or a graph structure. I will test raw input in detail (because someone already mentioned this bug, so it is not unique), but any information would facilitate this task a lot.
     
    Last edited: Mar 12, 2016
  37. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks. Don't worry about the accent, I watched all the videos and they were great. :) I understood everything you said. I am sure I can't even speak your language at all....so I am impressed.

    My raw file is one I have been using in Unity for a while so it is a rather high resolution...2048 (2049 actually since that is what WM outputs). I thought about cutting it into tiles but do not know how to edit more than one pinned terrain in the scene. It confuses me that you show the gap between the pinned terrains, and yet I can't seem to put more than one output in the scene. So how do I edit those terrains?

    The above picture helps me with the tiles...I will make them smaller.

    However, the other issue...my guess is you can use raw files for heightmaps, but you cannot autogenerate around a raw input because the algorithms are not there for the terrain, just the raw file. I am going to test it using the raw file as a blend but I wonder if the autogenerated terrains will only see the noise blend.

    So far, my experiments have only autogenerated flat terrains when my player runs across the raw terrain.
     
  38. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Screen Shot 03-12-16 at 06.59 PM.PNG OKay, did get the autogenerate to make terrains, as as suspected, it is only using the noise. This would be fine except my terrain has a river, and Map Magic sets the lowest point at the bottom of the river. So the autogenerated terrain is below the pinned raw terrain. Is there anyway to change the lowest point? That would help. I tried adjusting the Y but that just adjusted everything. :)

    Oh, and my graph structure...at the moment, I have a blend between the raw heightmap and noise all put to an output. That is all. :) So very simple.
     
    Last edited: Mar 13, 2016
  39. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    I bought it!
    But~~I'm looking forward to seeing those features " image input to Blend" " terrain input to Blend".
    ".
     
  40. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    102
    Thanks for the hint with the templated field. Do you plan to replace the SmartField by the ComplexSlider or would be there a new templated SmartField? I like your idea with a single field slider combination instead of separation of both UI elements like in the ComplexSlider.
     
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    Teila, use Raw Input's scale parameter to spread your custom heightmap on several terrains. For instance, scale of 2 will stretch raw to fill 2*2 terrain square.

    I think I gonna devote the next tutorial to the multiple terrains and Raw Input: for example, how to create a big island or a continent using a .raw billet, how to pin terrains to create villages, etc.

    zmaxz, I don't quite understand what these features are. Could you please say a couple of words about what should they do? Maybe they already implemented or there is the other way to achieve similar results.

    Hellhound_01, I'm replacing Field, Smart Field, Slider, and Complex Slider with one function called "Field". Calling it with isSlider:true parameter will enable a slider, and dragChange:true (or something in this kind) will add a draggable icon like in Smart Field. So you can make a simple field, a slider, a smart field, or a slider with smart field - anything.
     
  42. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Sounds great! I will do that.

    However, I am still puzzled how the infinite terrain will be autogenerated from a raw file. Is there something else I have to do?

    Looking forward to the tutorial but will also show how it works with autogeneration rather than just an island?

    Thanks. :)
     
  43. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    1. Png Bmp or Tga input, now only Raw input!?

    2.This image is other asset ,this is handy feature ,it don`t need Raw just draw in other terrain and can be blend.
    OtherAsset.jpg
     
  44. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I also one other problem that might have a very easy solution. Because I have a river on my height map, the lowest point on the map is the river. However, the autogenerated maps (which at the moment are just flat planes) are sitting lower than the height map. So...is there a way to adjust, maybe an offset or something?
     
  45. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    102
    Thanks for your hints to the UI elements. I will change my UI elements soon.
     
  46. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    Teila, could you make a screenshot of what you've made - and a... uh, a drawing, or a plan - just in a couple of strokes - what you are trying to achieve. And I will try to describe how it could be made.

    zmaxz, importing 8-bit (per channel) maps has one drawback - they do not produce smooth gradients, making steps instead. This is unsuitable for heightmaps, but, well, it could be used for texturing and other maps. I'll think what I can do to implement this feature in next version.

    speaking about adjusting already existing terrain - I have a feature in my roadmap "MM as an editor tool". It should do just the thing you've described: add noise or erosion to terrain, scatter objects, paint splatmaps according to terrain incline or cavity, plant terrains with grass, etc. It will not be implemented in the next version, but I plan to make it in a month or two.
     
    Teila likes this.
  47. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Sure can! Screenshot is of the terrain height map raw file spread out on 4 pinned tiles as you suggested. BTW, I had to offset it by a lot to get it to work. You made it look so easy in your gif. Maybe mine is a different size? BTW, the noise is not being used. I just forgot to remove it.

    Below that is a simple diagram. The green would be pinned terrains, edited by me or using raw height map inputs. The gold would be the auto generated terrains between the pinned terrains.

    My head is telling me that you cannot do this with raw height terrains unless you have something in the asset that will read the heights off the height maps on the pinned terrains and use that to generate the auto terrains. But so far, any auto terrains I generate end up perfectly flat.

    The other thing that puzzles me is that the asset is supposed to be able to allow you to have more than one pinned terrain, with distance between them. But I cannot edit more than one terrain in the Editor. Only one output is allowed.

    So how do you have more than one pinned terrain in your pictures and then generate between them? Does that only work if the terrain landscaping is done through your nodes?

    Screen Shot 03-13-16 at 01.08 PM.PNG Grid_Terrains.jpg
     
  48. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    The thing is that you need to use one .raw file for all the terrain:

    First of all you've got to pin the terrains where the the villages will be - according to your plan:
    Pin.jpg
    As you can see these terrains are inscribed in a a grid of 5*5. So the next step would be adding a Raw Input, loading raw and setting the scale value to 5.
    Raw.jpg
    You can see that each of the terrains is using it's own part from the raw image, determined by it's position:
    RawResult.jpg
    All the dynamic terrains will use their part of the raw - here is how it will look like if all the terrains are pinned:
    RawFull.jpg
    You can see that a square of 5*5 uses the full raw file. (Note: you do not need to pin all the terrains, it's just an example).

    You raw file does not need do be 5K resolution. The thing is that this raw file is just a canvas that will be filled with details by Map Magic. You do not need to control every pixel of your final heightmap. And now I will explain why:

    If you will take a closer look at the terrain you will see that it lacks resolution and detail:
    LowDetail.jpg
    I've cheated a bit and added blur generator just because my .raw image has a resolution of 8K - I'm fighting a hires-raw bug now. You may notice upscale artifacts if the the raw input scale value is high, so I'd recommend you adding blur generator with one iteration too (new v will get rid of these artifacts).
     
  49. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Hmm, OKay, that isn't exactly what I was hoping it would do. LOL

    The terrain is a river valley, and when split apart, the valley is gone.

    So that won't work. :) Although I see now how this is intended to work.

    Now...on to the next question....I want a river valley on a pinned terrain. The only way I know how to make it look nice is to do it in WM and export as a height map. Creating a river in Unity by hand using the very poorly made brushes never looks right to me. So how can I make a river valley, maybe in that center terrain that retains look of a river valley, rather than split up my height map into bits and pieces. I am happy to do it without the raw map but is using Unity sculpting brushes the only way to do it?

    Still wondering about the pinned pieces and how do I then edit/sculpt the rest of them? If I didn't use a height map, how do I edit more than one of those pinned terrains?

    I made that red because that question has never been answered and it is very important. You say we can edit pinned terrains, but how to switch between them to edit them?
     
  50. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,266
    Then I've ran out of file upload limit. The next thing will be adding some procedural detail on the smooth surface. I will start with a noise:
    AddDetail.jpg

    Then some erosion:
    Erosion.jpg

    And the I'll add villages. I will not bother drawing them, just flatter a land in an ugly way :) To do so I select a proper terrain - it is in the Map Magic object's child list - and flatten land here.
    Edit.jpg
    Map Magic has only one height output, but we've got several pinned terrains. If we want to add villages manually on the terrain we do not need to touch the output, we have to deal with terrains.

    And then we can start the game. Map Magic will generate dynamic terrains between villages the same way it did for the pinned terrains:
    Result.jpg

    Edit: The point is in making the map of the whole world in WM - not the local map - then you've got to select a place which has a river valley and pin a terrain here.
     
    Last edited: Mar 13, 2016