Search Unity

  1. 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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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:
    1,738
    MM2 Beta 8 is currently available. As usual, you can get it here: MM2 Page. Seems to be the final version before the release.

    Yes. Don't know if Asset Store allows double discount on splines (50% for beta and 50% as MM1 user), and is there a way to make a discount on 3 addons bundle at once. So roughly it would be $67.50 or less.

    Spline generators are the nodes that allow to create splines. They allow creating roads, rivers, and other elongated things. Going to make a video on them soon.

    Functions are "biomes" with inputs, outputs and parameters exposed. Using them will make the graph more readable and allow to re-use the graph parts in other graphs. When generated function will get the main graph maps or other objects through Function Inputs, and output generated result via Function Output. You can expose internal function node values in the main graph function node, so you can setup the without opening function graph. You can treat them as encapsulated black boxes. Changing the function graph is like changing the function code - it will affect the graphs it's used in (unless otherwise is not enabled in settings). So you can tweak all of your scenes by tuning your function graph.

    samshosho, speaking about navmeshes there was a pretty big lag when building a nawmesh in realtime, guess it was Unity 2018. However I have not checked this in later versions, don't know if the lag is still present in 2019
     
    protopop and Lars-Steenhoff like this.
  2. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    83
    Just tried the new beta, seems more stable overall, good job! However, the Forest node still behaves strangely - I had to put in like 50000+ density to get a decently dense forest.
    Also, the exported textures to VS Pro Maps seem to act a bit strangely - if you use the new VSPro density mask (works similar to the texture mask rule, but applies density based on the pixel values) and put the MM-provided texture there, the spots where it should be 100% dense are not - I used a Contrast node with high contrast values to get a "clean" dense noise (so that the noise starts fall off just at the thin edges) but it didn't help. Putting our own texture into VSPro worked fine.
     
  3. Imakhiil

    Imakhiil

    Joined:
    Oct 11, 2013
    Posts:
    52
    This may be a silly question, but how do I delete nodes in MM2? Right clicking them only brings up the node creation context menu.
    I also encountered some bugs with infinite terrain. One of the quartes of the world is completely botched and produces index out of bounds exceptions. I did some quick investigation and it seems to be connected to the forest node.
    Lastly, many "map" nodes dont have inputs or have inputs different than those in MM1. Is this intentional? If it is, how would one reproduce something like, say, the demo scene of MM1 in which noise nodes take other noise nodes as inputs?

    Edit: Another question, is MM2 compatible with Voxeland?
     
    Last edited: Mar 15, 2020
  4. Imakhiil

    Imakhiil

    Joined:
    Oct 11, 2013
    Posts:
    52
    I also noticed that Objects dont seem to spawn outside the initial tile.


    Im wondering if its not me misusing the thing
     
  5. ko0zi

    ko0zi

    Joined:
    Feb 27, 2017
    Posts:
    11
    Last edited: Mar 15, 2020
    Wright and LouskRad like this.
  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    Forest node now uses the same density with the scatter. This value means the number of objects in one square kilometer. For the forest node it is supposed all sq km is filled with forest. It doesn't mean 50000 trees unless some tile isn't absolutely covered with forests. However 50K seems to be really high value, for me the forest is pretty dense on 15-20K. Could you please post a screen of your forest just in case?

    It probably should be a root right-click menu, where you can select Generator - Remove to delete it. Or you can just drag-and-drop the node to the delete circle in upper right corner of the editor window.
    If it's really a creation menu with node types and nothing beside that - could you please report an issue?

    Also could you report an issue for the index out of bounds exception?
    Objects appearing aside form the chunks are already fixed, so there's no need to report this bug.

    Yes, now the results of the initial generators are detached from any other node products. If you'd like to blend them you can use the Blend generator:

    Actually, blending was made internally in MM1: intensity mode blended additive, mask - multiplicative. It all lead to confusing of how it all worked. Now it's a bit more straightforward approach: initial generators generate initial maps, blend node blends them the way you like.

    Unfortunately, no. Voxeland requires an update for that, and I plan to make it after a while, but at the release moment there will be no Voxeland support.
     
  7. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    137
    Just a quick note on MM2. The Unity curve still has no effect. Is this because the intention is to replace it with the other curve (your implementation)? The only thing I would say is that the Curve and the Levels (which is going to be very useful) nodes need the graphic interface to be larger, either separate windows or enlargeable nodes, as at the moment they are very hard to set precisely.

    On the Delete issue, the Drag and Drop icon is still not present on 4k monitors. The interface still has the strange graduated look I mentioned previously.

    Also some documentation or a video on the new Biome and Function system would be useful. At the moment I'm not sure how the Function Input and Output are used. Thanks.
     
    Last edited: Mar 18, 2020
    LouskRad likes this.
  8. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    MM2 will introduce the New Lock algorithms: instead of locking a whole terrain tile, there will be "lock locations", the areas on the terrain (or several terrains) that would be locked. These areas will be blended with the other world seamlessly so can change the graph while having locks.


    Got it. Will thing of an additional curve window.
    Speaking of levels you can roll down their parameters to set the exact values.
    I'm not going to replace unity curves. They are slower, but they give more control, custom tangents and presets.

    It would be great if you could describe the issues, possibly with the steps to reproduce the issues at idea informer. Thanks in advance!

    The next video I plan to make on this weekend is devoted to biomes and functions.
     
  9. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    137
    All the issues I've had with the Beta were added to the GitHub issues list.
     
  10. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    124
    Hi ! I am looking around trying to see whether Map Magic would be suitable for what i want to do.

    I want to use it for creating randomly generated levels with biomes, similar to what a game like Don't Starve does. Likewise, my map will probably be fairly simple as well and mostly very flat and low poly.

    Now, while i can see that Map Magic can create the map, even in a dynamic way, with biomes etc (which is great), I am not entirely sure what level of control i can have on the generated objects. For example, let's say that i want to create a biome that has 20 to 40 different types of trees that grow independently and that the player can interact with, by cutting them down, for example. Or have rocks that the player can pick up.

    Would Map Magic allow me to create prefabs that i can populate the world with and maybe generate a new seed with them on runtime ? Looks like it would, but i wanted to verify :)

    Also, would you say it's suitable for much simpler world maps, again something like Don't starve, but 3D ?

    Based on what I have been seeing, it looks like the tool would accomodate both, but i'd love to get some detailed information on that before purchasing.

    Thanks !
     
  11. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,514
    In MM1, and I assume in MM2, you can change any value of any node at runtime. I have a level editor that allows you to choose the amount of resources placed around.
    Capture.PNG

    You can put MM into Debug Mode to see the ID number of each node so you can access them. Then you have to cast to the correct type of node.

    Code (csharp):
    1. public GeneratorsAsset _graph;
    2.  
    3. _blendMain = _graph.list[BLEND_MAIN] as BlendGenerator2;
    4. _treePropagate = _graph.list[TREES_PROPOGATE] as PropagateGenerator;
    5.  
    6. _blendMain.layers[BLEND_MAIN_LARGEMOUNTAINS].opacity = value / 10;
    7. _treePropagate.growth.y = 40;
     
    Last edited: Mar 21, 2020
    Wright likes this.
  12. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    124
    Looks really nice and very similar to what i am going for, but is it possible to have control over individual trees, for example ? What if a player chops one down for example. Would Map Magic allow me to set my own prefabs so that each tree has specific components etc ?
     
  13. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,514
    It lets you use prefabs, so it's no problem. All my objects are interactive, such as trees and resources. The trees all use LODGroup component, Health component, etc.
     
    Wright likes this.
  14. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    124
    Ahh perfect, looks like it would be just great then, thanks for clarifying !
     
  15. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    237
    @Wright I've been trying to use MM2 with URP but in latest builds the terrain doesn't render in shaded mode. I can submit bugs but first want to make sure that URP is supported. Would also be helpful to have a single place where releases get posted - I see a note here and there (last one was this forum) but not ever sure if I've got the latest.

    For now I will probably go back to MM1 but if you support URP and want testing there (+ microsplat) I'd be happy to do more.
     
  16. Diego_Graphics

    Diego_Graphics

    Joined:
    Nov 3, 2014
    Posts:
    90
    Two things:
    1. i can't pin terrains anymore. if i use the pin function and go over the unity viewport with the mouse nothing happens. if i click on a place where i want a terrain to be generated the map magic terrain object is deselected. the MassPin function is not available in MapMagic2 so i only see one terrain tile in the editor.
    EDIT:
    I could solve the problem by resetting the unity Ui to "default". Strange bug. there was no error message either. now it works.

    2. the Curve node is not good because of its custom UI. the functions you had in MapMagic1 for the Curve node are now missing. you cannot select and scale multiple Curve points or enter the values manually.
     
  17. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    It is supported, and as far as I can say it's working fine. Would be great if you could to report this issue and describe the way to reproduce it.

    Please check if you have a Gizmos toggle enabled in your scene view. MM should not draw frames and locks when gizmos are turned off, so it disables pinning and lock movement to avoid confusing what and where should be pinned or unpinned.

    MM curves were made mainly for quick and not precise adjustments. If you want a deeper interface you can use Unity Curve generator for that.
     
  18. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    237
    I did submit a report on ideainformer (maybe have registered as an "idea" rather than a bug.)

    Repro conditions are:
    - Unity 2019.3.6f1
    - Create a new project with the URP template
    - Import MM2 beta and nothing else
    - Set target to iOS (may not be necessary)
    - Create a default MM2 object
    - Toss in a voronoi or any other starting node + height output to get a basic terrain going
    See:
    - in shaded mode, terrain is not visible
    - in wireframe mode, terrain is visible
     
  19. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    83
    Try creating a custom material based on URP/Terrain/Lit shader and assign that to MM's material template field (I think it's under tile settings). URP works fine for me, even build.
     
    mmaclaurin likes this.
  20. onefoxstudio

    onefoxstudio

    Joined:
    Sep 28, 2016
    Posts:
    16
    Nice but this is for MM2 right ? Where is "MatrixPreview.cs" ? Can't seem to find it in the project
     
  21. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    I've submitted the MM2 core (maps) version yesterday. Made a few screens, but going to add a bit more after a while. Here is the first one:
    Map1.jpg
    Going to submit MM2 Objects today, and Splines and Biomes in next couple of days. Not sure they will be reviewed by Asset Store team till March, 30, but at least I've tried :)

    Thanks, will look into it. Guess the reason is in iOS target, all fine for standalone.

    ko0zi, if so is there any problem with preview in URP?
     
  22. XelasDev

    XelasDev

    Joined:
    Feb 20, 2016
    Posts:
    10
    Hello,

    I've just downloaded the beta and am tinkering around for the first time. Unfortunately the grass is showing up as white squares. I tried all of the available modes and none of them work. The prefab for mesh mode has a MeshRenderer attached and looks fine outside of MM2. Using 2019.3.3f1 with HDRP.

    Solution: Grass is incompatible with HDRP at the moment. I suppose I'll place the prefab as a tree.
     
    Last edited: Mar 28, 2020
  23. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,355
    I might be wrong but I think Unity terrain grass doesn’t work with HDRP
     
    camta005 and XelasDev like this.
  24. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    275
    Haha, yeah I know it's frustrating. At least grass is working in the URP now. Still waiting for proper SpeedTree support too.
     
  25. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    237
    Hello @Wright Testing the last MM2 beta, Microsplat output node still does not appear in a URP build targeting iOS. Will buy and test the release but I'm guessing this bug wasn't addressed so I won't be able to move mainline development over yet.
     
  26. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    Map4.jpg

    Make sure you've got __MICROSPLAT__ keyword enabled in Edit -> Project Settings -> PLayer -> Scripting Define Symbols. And just for test - try switching to standalone, just to see if the problem is in a build target.
     
    protopop, Daniel-Talis and mmaclaurin like this.
  27. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    237
    Thank you @Wright - but still missing. Checked that I have __MICROSPLAT__ in scripting defines, which I did because Microsplat installer put it there. (This project is empty but for current Microsplat, Microsplat URP, and MapMagic 2)

    I also tried switching to build a standalone, and still don't see Microsplat in Map>Output generators.

    I did notice in Microsplat.cs that it is all wrapped in "#if _MAPMAGIC_" which is actually not defined in player settings, although _MAPMAGIC_BETA_ is.
     
    protopop likes this.
  28. bezo0

    bezo0

    Joined:
    Sep 5, 2018
    Posts:
    26
    @Wright will the LOCK be able to be disabled during generation?
    For example: there is a character in the mountains, meets a village abandoned, LOCK will cope with this perfectly, but passing repeated times, there is not that there is no village, but the place is different. That is, as if there was nothing there and the area was simply generated by a configured algorithm.
     
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    Current MM2 state: all modules submitted and pending for Unity review.
    Map3m.jpg

    I like this idea. The thing is that the lock works on pinned tile - this way it does not exist in playmode. All of the terrain data is stored in a pinned tile, i.e. in a scene like if it was created manually. So locks are mainly editor feature. However, you can force pinned tile to re-generate in playmode to remove all of the lock data. This way you can remove the locked village, but you've got to generate this tile each time the game starts to keep the village disappeared.
     
    Daniel-Talis, protopop, Djayp and 2 others like this.
  30. bezo0

    bezo0

    Joined:
    Sep 5, 2018
    Posts:
    26
    Yes, that's understandable. The buildings themselves I do and arrange as necessary, but the passage of the storyline of these buildings may not be, as there should not be a flat land that creates a LOCK (trees grow in place, grass, stones lie, and so on). Is there any way to implement this now? Just if there was some variable that you can pull to influence the generation of terrain.
     
  31. Prod212

    Prod212

    Joined:
    Dec 13, 2017
    Posts:
    17
    Hi, this is mainly voxeland and mapmagic integration issue as we are getting this issue with the mesh terrain where there seems to be visible seams around single chunks as you can see in the image below. I have made sure that the mesh margin is larger or the same as the relax iteration. This issue is caused when im adding different textures with the Voxeland layer node with all the clamp appending etc.Does anyone have an idea on how to fix this?

    upload_2020-4-1_20-21-22.png
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    Objects module screen:
    Objects1.jpg

    Is the seam still visible if you change any adjacent chunk (add or remove block here)?

    Do you mean making terrain flat? In MM2 objects module there is a way to do it by using the Location node (directly input object coordinates) and Flatten the land around it.
     
    mmaclaurin, protopop and Daniel-Talis like this.
  33. bezo0

    bezo0

    Joined:
    Sep 5, 2018
    Posts:
    26
    No. Let's imagine we just generate a terrain, then we use tools to edit (align) the surface for the structure, then add a LOCK. All buildings are moved in the hierarchy to the LOCK.Here's a simple way to switch between two States:
    1. Just a generated terrain with no LOCK or structure. i.e. at the place where it should be building there is the usual forest, rocks, grass, surface, normal, not aligned.
    2. What I wrote in the beginning. Generated terrain, flat areas for buildings, the buildings themselves, and the LOCK (no stones, trees, or grass).
     
  34. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    If you want the generated terrain appear after the lock then there should be no problem with that. Just force the tile to re-generate, and it will clear all of the lock information, replacing it with generated forest instead.
    If you want the lock to appear after the generated terrain then it's a bit more complicated. You'll have to store all of the tile (i.e. lock) terrain data somewhere in a custom script, and force the tile to re-generate to fill it with forest. And on the second visit you've got to load your saved terrain data.
     
  35. Prod212

    Prod212

    Joined:
    Dec 13, 2017
    Posts:
    17
    So everytime i remove blocks around it, the seams appear to move somewhere else and looks like the seams adapt to the changes of the mesh. This is what it looks like:

    Before digging:
    upload_2020-4-2_9-55-0.png

    After digging:
    upload_2020-4-2_10-0-19.png
     
  36. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    166
    What assets/packages did you use for that screenshot? Is it going to be a demo scene for MM2?
     
  37. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    Map5.jpg

    Then it seems to be related with Voxeland only. I had such an issue once, but then noticed that one of the chunks was offset at about 0.01 units. It was moved somehow, I assume I have moved it accidentally when doing level design. Might it be the similar issue.

    Yes, all of these assets will be included with the MM2 Objects module.
     
    Daniel-Talis likes this.
  38. Prod212

    Prod212

    Joined:
    Dec 13, 2017
    Posts:
    17
    There doesnt seem to be any chunks that has an offset.
     
  39. Imakhiil

    Imakhiil

    Joined:
    Oct 11, 2013
    Posts:
    52
    How is the review process going? It's really exciting to see it so close to being out, we've been waiting with out team for two months now! ^ . ^
     
  40. bezo0

    bezo0

    Joined:
    Sep 5, 2018
    Posts:
    26
    So I wrote earlier that it would be great if this is implemented out of the box. We do not take into account the buildings themselves, there is another generator for this. You need to "light hand movement" terrain is generated either by default as a forest, or with a LOCK.
     
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    It seems to be a niche feature, however feel free to vote for this idea.

    I don't know - just got all 4 assets in a pending review list. No feedback yet. It might be that in current situation Unity's review team can't work in full force, that is absolutely excusable.

    Could you please email me the scene, the graph (if it's a separate asset), and some instructions on how to reproduce this issue?
     
    mmaclaurin likes this.
  42. bezo0

    bezo0

    Joined:
    Sep 5, 2018
    Posts:
    26
    I agree, if it requires a lot of money, then it is easier to forget about it (or implement it later), and if the implementation does not require a lot of money, you can implement it earlier =)
     
  43. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    166
    @Wright Does mm2 come with a pdf manual? Because there are still quite a few links on the wiki that are not working, and I couldn't find any docs explaining some of the new terrain settings.

    Also, any idea whether GPU Instancer will need an update to work with MM2?
     
  44. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    Map6.jpg

    Going to update the documentation page this weekend. And sure, there will be PDF included, however it will be the same as the updated web documentation.

    Depends on how deep it was integrated with MM. If it was able to work out of the box then there might be a chance it will be working with MM2 too. If there were special compatibility scripts from GPU Instancer maker I doubt they will work with MM2.
     
  45. ElevenGame

    ElevenGame

    Joined:
    Jun 13, 2016
    Posts:
    30
    @taylank from what i've seen with mm2 beta, the gpui instancer integration scripts need at least a few slight changes to work with mm2. i have informed the developer of GPU Instancer of the soon-to-be existence of Map Magic 2.
     
  46. PyroStudios

    PyroStudios

    Joined:
    Sep 23, 2012
    Posts:
    225
    Hi all,

    I'm trying to figure out how to create my graph so that the base of the entire map is a huge cone. I've attached an example.. Basically i'm using Crest Ocean asset and it requires physical depth testing using the terrain like in the image below.

    Can this be done with map magic? I'd like my entire terrain to sit on top of this cone/mountain looking thing.
    2020-04-06.png
     
  47. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,514
    Yeah it can do that pretty easily. Check out the Simple Form node. Use the cone shape, then another smaller cone shape (more intense to make a circle) as a mask to flatten the top part.

    It won't cut out a circle at the bottom though (your terrain seems like it's not square), unless the new unity terrain cutout feature is working, but I've never used it.
     
    Last edited: Apr 6, 2020
    ElevenGame and PyroStudios like this.
  48. PyroStudios

    PyroStudios

    Joined:
    Sep 23, 2012
    Posts:
    225
    Thanks Stardog!

    I have another question. I'm using the MM2 Beta and I see the Shore generator is gone. Is that by design or am I missing something?
     
  49. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,738
    Pending...
    Biomes1.jpg
    Yes, I'm planning to replace it with a spline node. Instead of a height-based shore I'm going to make a node that will use a shoreline, and will work with a distance to shoreline instead of height - water level delta. Simply put, will work faster, produce better results, and the most important thing will have artifacts.
    BTW you can vote for the older node as well.
     
  50. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    166
    Is there any way to purchase MM2 and modules directly from you?
     
    XelasDev likes this.
unityunity