Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. jimmygladfelter

    jimmygladfelter

    Joined:
    May 3, 2020
    Posts:
    58
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,857
    Unfortunately no, I'm not a big expert in UE, and got to learn a lot before implementing something as big as MM here.

    Yep :)
     
  3. nnurgle

    nnurgle

    Joined:
    Nov 22, 2014
    Posts:
    12
    Heads up the link to forum in the map magic menu inside of the unity application brings everyone to the now locked work in progress forum.
     
  4. nnurgle

    nnurgle

    Joined:
    Nov 22, 2014
    Posts:
    12
    Using Unity 2020.1.0b16.4139. Everything works well except one all important feature. All the popup windows disappear before I can actually activate them. This means I cannot create any nodes.

    Here is what I am seeing:
    Right Click in graph window, I get the popup window with Create, Generator, Group, Value, Graph. This popup window stays there until I hover my mouse or click on any option, then it disappears with no other result. If I trace my mouse over the menu very fast, the menu stays there. It seems like the submenu popup event is causing the popup to close. The same exact behavior occurs using the +Add area when I right click it or drag it to a destination. (drawing shows the other menu but has the same behavior)

    Only other clue I see is that when any of these popups show, the map-magic window looses focus. (The blue line goes away) When the popup goes away, the window regains focus. I only mention this because right clicking in other windows to access other popup menus does not cause the focus change.
     
  5. janvetulani3r

    janvetulani3r

    Joined:
    Feb 8, 2017
    Posts:
    12
    Hi!

    As far as I know you're still not generating anything for water in Map Magic 2
    There's a cool video that shows how the water layer is generated in Breath of the Wild wit a terrain layer that's being raised up from far below the terrain to make rivers and lakes and the sea, and I was wondering if MM2 could generate a similar water layer based on a secondary terrain under the map that is being raised into generated river beds and lakes and the sea etc.

    Here's the video in question:
     
    illinar likes this.
  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,857
    Hi folks, just an announcement that I have to take about a week (maybe a bit more) off - I've got to hospital on Friday. I'm getting well, but still have to pass some time on a thick leave here. Sorry for that!
     
  7. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    Take good care of yourself! Hope you feel better soon.
     
    protopop and illinar like this.
  8. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    803
    Get well!

    I like the idea of using a second terrain mesh for water layer (rivers and lakes). The splat textures could be used to give shaders info about the river flow. For example RG - direction B - foam or intensity of the current.
     
    janvetulani3r likes this.
  9. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,407
    you've created an amazing product that so many people love. Now take care of yourself and don't worry at all. Everything will be here when you get better and your health is what is most important so take the time you need to take care of yourself.
     
  10. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,857
    Unity 2020 has been released. I have not been tested right-click menu with the release version yet, but if it has any problem - try enabling the experimental menu by turning on experimental features in windows - MapMagic - settings.
     
    LIFOname likes this.
  11. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    146
    Already posted on discort, but I´ll try also here:

    I made the mistake and have my MM1 MapMagic object as an offset (not even sure when or why I did that) and now the generation somehow messed up. I have a combination of locked tiles and generated.

    Anyways, I remember reading about it here somehwere in the forum not to use an offeset, but I want to know if there was a fix / workaround for this ? I have already tested without the offset and all works fine, exept I would loose my hand sculpted terrain content. So before I proceed to redo it, I though better ask ^^.
     
  12. jasonsurratt

    jasonsurratt

    Joined:
    Oct 12, 2016
    Posts:
    2
    Hello!

    Firstly, I want to say MapMagic 2 has been a joy to work with and makes me think about procedural terrain in a whole new way.

    As I've been plugging away I've created a number of additional functions to augment MapMagic. Most of them wouldn't be of much use to anyone else but others may be helpful. For example, I just created an Aspect function that returns the downhill direction of the input map. I use this to make objects point downhill or in combination with blur, make buildings point towards the roads.

    I've got another function that generates consistent intersections on tile edges that can be used to connect procedural roads across multiple tiles.

    So on to my question, is there a place where I can push little user-contributed functions? A git repo, etc.? I'm happy to release my code in the public domain or whatever license is appropriate.

    Thanks!
     
  13. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,857
    I'm missing what the offset is? Is it the MM object position? It should work fine in this case.

    Thanks!

    I'm really glad to hear you could append it with useful nodes! Feel free to publish them on MM2 thread, or I can make a special page for it on MM2 wiki. As long as they do not contain the part of MM code and are not for sale you can feel free to publish their code.
     
  14. Zoryth

    Zoryth

    Joined:
    Dec 5, 2016
    Posts:
    62
    where can I find good generators graphs? I want a map with lots of plain flat areas and some montains etc :p I remember there used to be some available for download.
     
  15. thatnzguy

    thatnzguy

    Joined:
    Jun 8, 2015
    Posts:
    9
    I'm doing some tests to see if I can use MM2 in realtime for terrain painting. There is a hitch when I press Generate or Generate Changed during play. I was wonder if there is a way to mitigate this hitch. Any ideas?
     
    Last edited: Aug 8, 2020
  16. LIFOname

    LIFOname

    Joined:
    Aug 8, 2020
    Posts:
    1
    I was having this issue as well, it effectively put my map making on hold. Experimental features fixed it as you suggested. Thanks so much.
     
  17. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    146
    I'm working on a scene management system. When a MM2 scene is loaded I get frequently get an error. This doesn't happen all of the time but when it does the terrain tiles have gaps in them. Also, this doesn't happen when I start the scene by itself and not using my scene management system.

    ArgumentException: Trying to access out-of-bounds terrain height information.
    UnityEngine.TerrainData.GetHeights (System.Int32 xBase, System.Int32 yBase, System.Int32 width, System.Int32 height) (at <4f343b737148487b851c6cc7ce0be7d5>:0)
    MapMagic.Locks.HeightData.Read (UnityEngine.Terrain terrain, MapMagic.Locks.Lock lk) (at Assets/MapMagic/Locks/LockDatas/HeightData.cs:29)
    MapMagic.Locks.LockDataSet.Read (UnityEngine.Terrain terrain, MapMagic.Locks.Lock lk) (at Assets/MapMagic/Locks/LockData.cs:61)
    MapMagic.Locks.Lock.OnTilePrepare_ReadLocks (MapMagic.Terrains.TerrainTile tile, MapMagic.Products.TileData tileData) (at Assets/MapMagic/Locks/Lock.cs:92)
    MapMagic.Terrains.TerrainTile.Prepare (MapMagic.Nodes.Graph graph, MapMagic.Terrains.TerrainTile tile, MapMagic.Terrains.TerrainTile+DetailLevel det) (at Assets/MapMagic/Terrains/TerrainTile.cs:674)
    MapMagic.Terrains.TerrainTile.StopEnqueueTask (MapMagic.Terrains.TerrainTile+DetailLevel det, MapMagic.Nodes.Graph graph, System.Int32 priority, System.String name) (at Assets/MapMagic/Terrains/TerrainTile.cs:636)
    MapMagic.Terrains.TerrainTile.StartGenerate (MapMagic.Nodes.Graph graph, System.Boolean generateMain, System.Boolean generateLod) (at Assets/MapMagic/Terrains/TerrainTile.cs:584)
    MapMagic.Core.MapMagicObject.StartGenerate (MapMagic.Terrains.TerrainTile tile, System.Boolean generateMain, System.Boolean generateLod) (at Assets/MapMagic/Core/MapMagicObject.cs:302)
    MapMagic.Terrains.TerrainTile.Dist (System.Single newRemoteness) (at Assets/MapMagic/Terrains/TerrainTile.cs:351)
    Den.Tools.TileManager`1[T].Deploy (Den.Tools.Coord[] camCoords, System.Collections.Generic.Dictionary`2[TKey,TValue] pinned, UnityEngine.MonoBehaviour holder) (at Assets/MapMagic/Tools/TileManager.cs:253)
    Den.Tools.TileManager`1[T].Update (UnityEngine.Vector3 tileSize, UnityEngine.MonoBehaviour holder, System.Boolean distsOnly) (at Assets/MapMagic/Tools/TileManager.cs:104)
    MapMagic.Core.MapMagicObject.Update () (at Assets/MapMagic/Core/MapMagicObject.cs:142)
     
  18. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    364
    Hello,

    I have been looking for an example on how to use the forest object generator (in MM1). In particular, I'd like to know how to use the inputs. It would seem with a little instruction this might make a few things a lot easier, or less complicated than it would be otherwise. Does anyone know of a video or graph showing examples of it's use?
    I already read the document page on it, but it does not give examples of what to use for the inputs. For example, I've tried a few object generators for the seedlings with bad results so far.

    Thank you,
    Boysenberry
     
  19. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,407
    I changed the material in the terrain settings to a tri planar material.

    Screen Shot 2020-08-24 at 3.33.06 PM.png

    Now I want to change it back to the default Nature/Terrain/Standard.

    The problem is i can't see that material because its hidden, so I can't select it.

    How can I apply the Nature/Terrain/Standard material back to my MapMagic object?

    Screen Shot 2020-08-24 at 3.32.51 PM.png
     
  20. nnurgle

    nnurgle

    Joined:
    Nov 22, 2014
    Posts:
    12
    I updated to the latest version and tried the experimental features. These fixed it for me as well.

    Has anyone else had trouble pinning terrains? I click pin terrain and when I click next to the existing tile, nothing happens. The map magic node is deselected. I expected to see rectangles outlining the grid of terrains as my mouse hovered over the scene view.
     
    Last edited: Aug 28, 2020
  21. Unkelben

    Unkelben

    Joined:
    Mar 6, 2014
    Posts:
    6
    Hi all,

    Sorry if this question was asked before but I couldn't find it here or in the documentation.

    Can one access data from the graph nodes from within the script? For example, if I wanted to get a specific texture or height map at a certain stage of the graph for gameplay reasons?

    Thanks.
     
  22. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    150
    I like MM alot but it has a few serious problems:

    1) Re-generation is dead sometimes
    2) Tree distance property is also dead
    3) When infinite terrain is on, the new terrains are sometimes not correctly connected to the first one and they miss trees, details and objects

    https://imgur.com/a/Dg8AzSf

    @Wright
     
    Last edited: Sep 6, 2020
  23. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,249
    Can the terrain be converted as a stand-alone terrain with no MapMagic editor dependencies?
    I'm interested in buying this but I want to be bale to make terrains that stand on their own.
     
    Last edited: Sep 15, 2020
  24. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    Yes MapMagic creates normal unity terrains in the editor and/or at runtime. In the editor you can pin a terrain and it will generate a normal unity terrain which you can see in the hierarchy.

    Also MapMagic 2 is out now and has several modules, the core module is free so you can have a play around.
    https://assetstore.unity.com/packages/tools/terrain/mapmagic-2-165180

    The forum thread for MapMagic 2 is here:
    https://forum.unity.com/threads/released-mapmagic-2-infinite-procedural-land-generator.875470/
     
    florianalexandru05 likes this.
  25. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,249
    I tried the free one map magic 2, so you mean it should generate a terrain right? But the only problem is the terrain is missing the terrain data? Or does map magic 2 not allow you to have a stand alone terrain?
     
  26. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    MM2 allows stand alone terrains, after you pin a terrain in the hierarchy drag 'Main Terrain' out of the MapMagic object then delete the MapMagic object. The terrain data is there but it's only in the hierarchy. In MM1 you could save the terrain data as an asset but I'm not seeing that option in MM2. I need to know this too, so I'll ask Denise in the MM2 thread.
     
    florianalexandru05 likes this.
  27. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,249
    Yah that's exactly my problem two. Tbh I think a better way is to export the heightmap and splat maps and import into a new terrain this is what I'm trying out now.
     
  28. huseyindurak

    huseyindurak

    Joined:
    Mar 17, 2019
    Posts:
    5
  29. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,249
    Ok it's pretty cool, I just made a test, you can export the heightmap and import it in a new terrain. The problem is the splat map, I used Free Micro Splat to export it then used a 5$ splat map replacement script from the store and it works. MapMagic Terrain_01.jpg
     
    camta005 likes this.
  30. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    146
  31. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,407
    I love it:) how can we play it?

    I'm on mapmagic 1 still too but planning to upgrade soon

    199EF52D-6FEE-4B9E-9391-21B100775E51.jpeg 5F886453-0D9E-48BA-A3DB-97F4F8F499E8.jpeg 19343671-7E5B-4AEB-B977-ED30418A0621.jpeg
     
  32. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    146
    Really like what you did to the colors and style since I last seen your project :) !

    I´ll create a demo hubworld that leads to generated areas next month. Will upload it also here just for strolling around.
     
    camta005 likes this.
  33. Goffa

    Goffa

    Joined:
    Dec 2, 2013
    Posts:
    7
    Hi, Is/will there be something like custom nodes in MM2?
     
  34. LuciaSystem

    LuciaSystem

    Joined:
    May 21, 2017
    Posts:
    4
    I need help to edit with Mapmagic however, I can't , in My Unity3D ver 2020.1.7.
     

    Attached Files:

  35. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    185
  36. bholland

    bholland

    Joined:
    Mar 24, 2017
    Posts:
    22
    Hey everyone. I'm using MM1 and I'm trying to use stamps or heightmaps using the raw input node. I've looked around and I see how some people use GIMP to build outputs. But nothing that I've tried works. I'm using 2019.4. Does anyone have a process to get heightmaps or something similar into mapmagic that works?
     
  37. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,857
    No, I do not plan any new big features for MM1.

    Thanks for reporting this issue, I'm working on fixing it.

    As far as I know GIMP doesn't allow saving proper RAW format. I've tried Krita and RAW exported from here works well.
     
  38. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    320
    What would be a good approach to avoid players going bettwen 4 tiles? If the map lead them to a corner of a tile that is connected with other 3 tiles, all 4 are enabling which causes lag spikes.
     
  39. bholland

    bholland

    Joined:
    Mar 24, 2017
    Posts:
    22
    That did it. Thanks!
     
  40. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    What size are your terrain resolution and size in the MapMagic settings? I find a resolution of 512 and size of 1000 works well when multiple terrains are visable.
     
  41. franck_Extriple

    franck_Extriple

    Joined:
    Oct 27, 2017
    Posts:
    16
    Hi Denis.
    Wright

    I’ve been wondering if i could use multiple raw files as height on different tiles of the terrain.

    Can’t found the way directly, so i decided to create 2 mapmagic item and assign 2 different graphs.. Unfortunately they are still always generating the same terrain. Even if they use different Graph and imported Maps raw.

    This is probably a bug

    Here is the video of the issue:

    Mapmagic 2 issue - Multiple Tiles https://youtu.be/ETJVRfLl3kQ

    By the way, good job with this new release.
     
  42. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    146
    I did a setup for mutiple terrains a while ago for MM1. Use the offset to set the position of the raw files to another tile.


    Quite small, but you get the point ? Hope that helps.
     
    camta005 likes this.
  43. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    I look away for a year or so and all I see that's new is... more bugs...
     
  44. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    320
    @Wright I'm trying to have multiple different textures (using CTS 2019) and with simpleform/curve (like a pseudo biomes inside the same graph), so it works with splines tools asset, but sometimes I get this error :

    NullReferenceException: Object reference not set to an instance of an object MapMagic.WeldTerrains.WeldTextureToNextX (UnityEngine.Texture2D texture, UnityEngine.Texture2D neig) (at Assets/MapMagic/Main/WeldTerrains.cs:294) MapMagic.CustomShaderOutput+<Apply>d__31.MoveNext () (at Assets/MapMagic/Generators/CustomShaderOutput.cs:586) MapMagic.GeneratorsAsset+<Apply>d__13.MoveNext () (at Assets/MapMagic/Main/GeneratorsAsset.cs:571) MapMagic.Chunk+<ApplyRoutine>d__40.MoveNext () (at Assets/MapMagic/Main/Chunk.cs:250) MapMagic.ThreadWorker.CoroutineFn () (at Assets/MapMagic/Main/ThreadWorker.cs:604) MapMagic.ThreadWorker.UpdateApply () (at Assets/MapMagic/Main/ThreadWorker.cs:176) MapMagic.ThreadWorker.Refresh () (at Assets/MapMagic/Main/ThreadWorker.cs:143) MapMagic.MapMagic.Update () (at Assets/MapMagic/Main/MapMagic.cs:302)

    is there a maximum amount of textures I can use or something? here are some screenshots of the graph:

    https://ibb.co/WG2bK9z

    https://ibb.co/N2Sh6D0

    https://ibb.co/DzfJ9Hc (Lower Right for example)

    https://ibb.co/6X2wndG (the black terrains are the ones tha throw the error, if I disable the terrain next to them they work fine)



    I understand that is not the way to do biomes but is the only way to have spline tools along with MM and some changed textures. Is there a reason my graph wont work?

    edit: after countless tests, it seems it's related to the CTS profile, if I try to use advanced with more than 8 textures, I get these errors. Any idea what might be the issue?

    edit2: yeap I verified it, when having more than 8 textures I get this error (basic and advanced CTS profile)
     
    Last edited: Oct 22, 2020
  45. Goffa

    Goffa

    Joined:
    Dec 2, 2013
    Posts:
    7
    Hi, no, I ment MM2:
    I don’t find any way of customising MM anymore, specifically I would like to take input genreated at playtime and rerun genereation, with the new spline functionality for roads it would be amazing to let players ”found villages” or similar at different positions, and then rerun the generation with these positions as input.
    In map magic 1 I could create Custom nodes with C# so I belive it was possible to e.g. read a file with positions, but with map magic 2 I find no way to do this, will there be a feature for MM2 to make custom nodes or somehow take input after compile-time?
     
    Lars-Steenhoff likes this.
  46. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    803
    After an update today there are seams, no matter how big generation margins are. upload_2020-11-15_11-5-0.png

    I have also unpinned and pinned back everything just in case.

    Okay, it seems like the interpolation is to blame here, I hope you can fix it. I would like to use some interpolation.
     
  47. Innom

    Innom

    Joined:
    Dec 6, 2014
    Posts:
    6
    I was wondering if there are any tricks to apply filters to directional slopes? I'm looking to make a convincing desert dunes environment, and one of the key things to make that happen is to have ripples on one side of the dune, while the other side is perfectly smooth. See this reference for an example:
     
  48. cacotigon

    cacotigon

    Joined:
    Jun 12, 2015
    Posts:
    9
    I would really like to purchase mapmagic 2 bundle but I'm seeing a lot of bug reports which is making me a bit nervous. @Wright Are you still supporting MM2?

    For people who buy the bundle, is there a Discord or a better place for the community than a thread which is nearly 100 pages long?
     
  49. Gabriel_SG

    Gabriel_SG

    Joined:
    Apr 7, 2017
    Posts:
    202
    This is the thread for mapmagic ONE, which is currently on LTS mode so only bugfixes and no new features. The MM2 thread is here and is definitely being supported. https://forum.unity.com/threads/released-mapmagic-2-infinite-procedural-land-generator.875470/
     
    illinar and cacotigon like this.
  50. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    387
    Is there a way to limit the number of nodes that are auto generated?
     
unityunity