Search Unity

  1. New Unity Live Help updates. Check them out here!

    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. tanoshimi

    tanoshimi

    Joined:
    May 21, 2013
    Posts:
    292
    I do have a dynamic skybox, using a physically-based atmospheric model (although heavily customised, since it allows for more than one sun). I then use exactly the same atmospheric model for both my sky shader and my fog shader, with the resulting blend looking like this:
     
  2. wiseman_2

    wiseman_2

    Joined:
    Dec 11, 2013
    Posts:
    66
    I've been looking around, and searching th forums, but is there a way to shut off tree colliders in mm?
    I'm using tree management system ( soon to be unature) with mm and all is well, but since tms moves colliders around, need to be able to shut off the ones in mm.
    otherwise, been playing with this for a week and loveit...brilliant work.
     
  3. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    77
    Nice work on the colouring...

    Is it possible to take a shot from a much higher altitude, looking forwards and down on the terrain, so that the end of the terrain mesh can be seen together with how it blends into the skybox ?
     
  4. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,675
    Could you please make a screenshot of your graph and the result you get?

    Yep, now placing objects on the terrain is simplified, it can be done with just enabling a "Relative Height" in an Object Output (or Tree Output) layer.
    At least it should place objects on terrain unless kilik128 has found a case where it does not work :)

    Such a great responsibility - Gaia and Terrain Composer 2 are really great assets. I'm a bit worrying about MMWG being reviewed by such a discerning critic :)

    Bengals007, do you need to change the terrains in game? Dig or modify objects placed on them? Or, more specifically, do you need to keep those changes forever?
    In case you don't - you don't even need a WorldStreamer, MMWG will generate the world as the player travels on it, and every time player passes some chunk it will be generated exactly the same.
    If you do need to serialize all the changes then it will require some scripting to make your own serialization system. Saving all of the terrain data, all of the objects and trees in a huge world will make each of your game saves really giant. However I'm not very familiar with WorldStreamer, maybe it has a feature to create a patch saves.

    BTW you don't need MMWG to stream the pinned terrains with the WorldStreamer. You can generate the terrains and disable or entirely remove the MMWG component, the terrains will persist and could be used by any plugin.

    FrozenEmpire, is it an island tutorial video? In the last few versions the terrains are enabling in a form of a square, so two generated terrains could not be divided with the un-generated one.

    Just disable the Capsule Collider component in a tree prefab if I got the question right.


    Here is a short video of a feature I'm currently working on: RTP support for MMWG:
    It will use a special RTP Output Generator, and a ReliefTerrain component added to the MMWG object. All the RTP setttings are done via that component (except maybe assiging layers albedo textures).
    NB the terrains do not have any ReliefTerrain copies, this component is the only one for all the terrains.
    To apply the RTP settings to all the terrains a special Instant Updater script is used.
    ReliefTerrain, MeshRenderer and InstantUpdater could be created in a one click at RTP Output button.

    Still I've got things to do like support for more than 4 channels and welding seams between terrains (you can see them at the end of the video).

    2All: roads and rivers are in my epics plan, but still I have not started them yet, so I cannot say ETA for this feature.
     
    Chris_Payne_QS and docsavage like this.
  5. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,121
    1. yes!
    2. yes!
    3. Not sure
    Greetings from Japan =D
     
  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,675
    Oops, missed one post :) Thanks malkere for pointing that out!

    That is possible with the biomes feature.

    This can be done with the terrains pin and lock feature.

    And as I mentioned earlier, rivers are planned, but still I don't know when I will even start them.
     
    malkere likes this.
  7. wiseman_2

    wiseman_2

    Joined:
    Dec 11, 2013
    Posts:
    66
    actually that's not going to work... I need the capsule collider, I just don't want map magic to enable the tree colliders in the terrain settings for each terrain it generates
    when i check a pinned terrain , under terrain collider the setting for enable tree colliders is auto checked
     
  8. ErickXavier

    ErickXavier

    Joined:
    May 21, 2015
    Posts:
    4
    Hi @Wright ,

    is there a problem with the "preview" functionality? I was never able to use it. It's always "disabled" and only with the option "Clear" enabled. Even clicking there, doesn't enable the other options... Am I doing anything wrong?

    So you can understand, I just created a new project, imported MapMagic, created the object and then tried to preview the default noise object that comes with it, nothing. Again, only the "Clear" option is enabled.
     
  9. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    204
    One method I was messing with was just creating one massive, low detail, distant terrain mesh that was mostly flat close to the camera/player, where MM would build its terrain. I'd make this a child of the camera so you can never reach it. It's far enough away you don't really notice, and it will blend nicely with distance fog/skybox.
     
  10. reocwolf

    reocwolf

    Joined:
    Aug 1, 2013
    Posts:
    182

    Yeah the first time I used it I thought the same. You have to click the node's output blue thingy and preview from there. If you click anywhere else on the node it does nothing.
     
    malkere likes this.
  11. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    85
    Hi @Wright,

    I think there is a bug with pinned terrain generation when using none infinite terrain generation. I've set up an empty project using MM 1.4 and latest free Unity version. For my RTS game I want to generate 10x10 tiles in maximum with a 512 resolution and a 1000 terrain size and 300 terrain height.

    In general settings I've disabled the infinite terrain generation and instant generation flags. The base tile is generated fast. If I try to add an additional tile the generation starts immediately but doesn't return (actually is still 25min running).

    I tried this several times, on two different computers, using same versions. Each additional tile generation end's in a deadlock. Sometimes the first additional tile could be generated, but then the 2nd or 3rd tile generation hangs up.
    Could you confirm this?
     
  12. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    131
    Hello Wright

    I have found another bug.

    First there something broke and all grass has mipmap1 only (not 0) so I had to create new map magic and it works there... but I used export all in node editor and import into that new MM clearing all nodes before. It did not copy all texture references. Like ground textures are blank and grass details all missing its texture. Other references seems to copy good

    Well Other problem is Thread errors which usually throws after 2nd time MM is generating in one unity session. Then terrain disappear. I found If I restart unity and regenrate it it works for 1st time.



    And textures has this but still in terrain there is just 1 texture


    Also As you have Export Selected/ Export All... Could you please create also Remove All? to simply import all nodes without deleting one by one all existing. Thanks ;)


    Also found (strange it did not appeared sooner) that you should not call this function GetCamPoses at MM line 248, when you have any connection to camera as checked as false. After scene load It has no main camera for that one frame, when this function is called throwing error. I removed that error log and it is OK for my case :)

    also some lock for nodes not to move. It is lagging for me and time by time some nodes teleport to new location, when I am trying to modify some their parameters.
     
    Last edited: Sep 19, 2016
  13. Sluta

    Sluta

    Joined:
    Aug 15, 2016
    Posts:
    42
    I installed the demo version 1.4 to check and learn how to use MapMagic (before buying).

    The first issue is the crash of Unity when I change the resolution:
    (Not always but often)

    And the question beginner:
    When I change the resolution causes a change in the position of the terrain. Why? I thought that the resolution only changes the detail area and not location.
     

    Attached Files:

  14. BigYetti

    BigYetti

    Joined:
    Apr 11, 2015
    Posts:
    26
    Been playing with Map Magic for a few hours now. Went through the hour and a half video and learned a lot. I like the workflow. How to do some (commonly desirable) things is still escaping me. Like:

    - How to deliberately make a flat area (or sort of flat) in a specific location on a pinned terrain. For like a town or POI. I don't think I want to make a generator rule for it because I don't want to procedurally generate it all over the place. Or am I thinking wrongly about it? Maybe its a job for another tool? Anyone?

    - How to limit where some of the procedurally generated things get done at. Like with Terraces. I only want some random terraces, only about 2 or 3 high, and only within a certain height range, and randomly placed. Trying to get that working is making me nuts. Anyone have a snippet for something like that? (maybe we need to start a library of snippets to share?).

    Thanks in advance for any help.
     
  15. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    77
    I think it was, yes... so if I understand right then you are saying that the design in that tutorial did not really consider the need to achieve a good blend with the skybox ?
     
  16. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    77
    Interesting idea, do you have any screenshots ?
     
  17. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    204
    I've since switched back to not using it, as I'm playing around with 2k sized MM terrains, which mostly hides any pop in when combined with enough fog. I do think it worked quite well though, and I think it's pretty perfect if you don't ever get too high up to see the terrain popping in on top of it. You can try for yourself very easily - make a Unity terrain, scale it up, flatten it where MM is generating and set it as a child to your camera (zero the y axis).
     
  18. tanoshimi

    tanoshimi

    Joined:
    May 21, 2013
    Posts:
    292
    Like this?
    terrace.jpg
     
  19. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,675
    wiseman_2, I can make an additional settings tab, where you can assign a collider material and turn tree colliders on/off the way it is done with all other settings. I just don't understand your use case: what is the reason to keep tree colliders if you are not going to use them anyways?

    That's right. Some of the generators have multiple outputs. If preview called by clicking generator it would be unclear which output should be used.

    Hellhound_01, I've found out that pinned terrains that are out of the generate range will not be generated in editor, but this happens in 1.5 as far as I know. I've already fixed it for the next version. Although you have 1.4 as you say, try moving closer to the terrains or increase generate range.

    What mipmaps are you talking about?

    Could you please share your scene?

    This is the one I cannot reproduce either. Are you sure that terrain has only one texture, maybe gray textures with transparent alpha are just not displayed. Try clicking where their icons should be.

    There's a guard clause two lines above that checks if the camera is null.

    I've added two features in my list: "Remove all" and "Lock generator position". Cannot promise them in next version, though.

    Sluta, thanks, resolution bug was fixed and the other one I cannot reproduce in 1.5 - but since that algorithm was changed greatly I guess it's gone.
    I will submit 1.5 demo version soon.

    I just mean a floating terrain you've highlighted :)
     
  20. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    303
    I can't wait to demo version 1.5 :)
    Biomes seem to me to be a great powerful tool and I would like to check it out before buy.
     
  21. BigYetti

    BigYetti

    Joined:
    Apr 11, 2015
    Posts:
    26
    Thanks Tanoshimi, I'll experiment with the 'curve into a mask' idea.
     
  22. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    204
    Here's a kinda sand dune-y biome I've been working on, uses simple form gradient lines, curves, @Hellhound_01 's fractal noise, and @cowtrix 's warp generator. Would be great if both were included and supported in MM as I'm using them all the time and I can't bug anyone for support like I can with @Wright ;) Also features RTP snow.
    upload_2016-9-21_11-39-41.png
     
  23. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    85
    @Wright Thanks for the hint with the generation range. This solves the deadlock issue.
     
  24. Sluta

    Sluta

    Joined:
    Aug 15, 2016
    Posts:
    42
    All night I learned how to use MapMagic (v 1.4 demo) and I am very pleased with the potential that presents this TOOL. At the moment I have one important question for me:
    For example, If I have something like this: (made from a RAW file)

    then if in the future I want to continue to add new area to match the existing one, what is the best way to do this? Will the new RAW file contains the continuation of the land, I must very closely matched? Is there an easier way?

    I will be grateful for help, thanks.
     

    Attached Files:

  25. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,121
    Maybe open the RAW in photoshop, triple the size so you have a blank square on top/bottom/left/etc, then select the new area so you don't edit the old area, and work to make it match up.
     
  26. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    204
    I would make it so that river/lake is self contained within the RAW file, and not going off a map edge (very hard to blend). You'd use that RAW as a non-tiling heightfield, and you can use a mask to blend between it and whatever other terrain you create with MM.
     
  27. Sluta

    Sluta

    Joined:
    Aug 15, 2016
    Posts:
    42
    For several days testing MapMagic and I am impressed. However, I miss just a tool that would combine more or less matched RAW files into one large area (old + new) with the smallest changes in the old area.

    In TC2, I can patch the area - this is not a perfect solution, but it has its advantages.

    If MapMagic allow patching of two partially matched Raw files - would be ideal :)
    I know that maybe I demand too much, but it is a problem when I have finished a nice area, and sometime later I want to add continued without undue interference in the existing one.
     
  28. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,162
    Hi,
    I bought this "magic" tool.
    Nice ...
    Just two questions ...
    1) How can I use AQUA and DISTINGO with real time creation ?
    2) How can I create villages ?
     
  29. rohan871

    rohan871

    Joined:
    Sep 22, 2016
    Posts:
    2
    Hello,
    How can I import my own custom assest like buildings , lampposts in Map Magic? I want a procedurally generated infinite terrain.
    Thanks...
     
    Last edited: Sep 22, 2016
  30. Hakazaba

    Hakazaba

    Joined:
    Jul 1, 2015
    Posts:
    109
    Thank you very much.
     
  31. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    303
    Biomes ----- what are their capabilities and limitations?
    Can I use on one map eg 6 different biomes, with other texturami, grass and objects? But are there any limitations?
    How efficiency and optimization in MapMagic?
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,675
    Whow, that looks really cool!

    You can place Aquas water planes as an object prefab for the lakes. Or you can use a big plane to create a sea as I used it in the island tutorial. Concerning Distingo I could not make it work just out of the box. There were posts in this thread from people trying to make it work; I don't know if they achieved it, though. I have a plans for implementing Distingo, but I decided to make RTP support first - as far as I know it's a more common terrain custom shader.

    Sure. You can use any prefab you like, including a building and a lamp post with a light source.

    I can see no problem in using 6 biomes in one scene - except one: you have to avoid using all of them on all (or most) of the terrains. If the biome is not used on some chunk then it is not calculated. Mixing all of the 6 biomes on one terrain make it generate 6 times longer, so I'd recommend to sort biomes by latitude (desert - jungle - forests - plains - snow) or in any other way prevent using more than 2-3 biomes on one terrain. Maybe a custom textures or raws (biomes masks) can help in this case.

    BTW I've got a fairly frequent question - what is best the way to implement latitude biome mix (desert - forest - snow). I've made a special generator that could be a great help in that - Normalize Generator. It can make a biome blending without multiple invert - blend (subtract) generators. Here is the example:
    By default Normalize Generartor divides each layer by the sum of the layer values, making the layers total be equal to 1. But switching Mode to Layers will blend layers the way similar to the Textures Output or Photoshop (Gimp, any other editor) layers.
     
  33. TidyDev

    TidyDev

    Joined:
    Dec 16, 2012
    Posts:
    45
    Thats perfect and exactly what my email was aiming for, could you share the Normalize Generator please? Cheers mate.
     
  34. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    303
    ONE TERRAIN...?
    You mean the one tile (1kmx1km) or the whole game area, for example: 100 tiles (1kmx1km)?
     
  35. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,675
    I plan to release a beta version soon, it will include the normalize generator and RTP support.

    A single Unity terrain, a single chunk (default size 1000*1000), not the whole landscape :)
     
  36. wiseman_2

    wiseman_2

    Joined:
    Dec 11, 2013
    Posts:
    66
    I still need the colliders on the tree prefabs, because they get pooled and moved around , so there are only a few in existence at a time rather than thousands

    another quick question though...

    is there a way to use an object portal input as a mask for a ground texture..

    I want to change the textures under trees...

    I also was wondering how I would turn off grass under rocks, or other objects...
    thanks...
     
  37. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    131
    Well probably my project has planty problems as it is upgraded many times and is quite huge. About Mipmaps I was talking about is there https://fogbugz.unity3d.com/default.asp?830160_l29nil9smkivdvtl. I found it is not related to your asset, but unity... What is quite dissapointing. If you have total texture size of all used grasses bigger than 2k... mipmaps stop working. And reducing quality of viewed grass. About other issues. I will do more research on clean scene to tell you more specific problems. And let you know.
     
  38. Sluta

    Sluta

    Joined:
    Aug 15, 2016
    Posts:
    42
    I have another newbie question:

    How to make the grass grow only above the water? There is a possibility?

    edit:
    I was able to find a solution:
     

    Attached Files:

    Last edited: Sep 24, 2016
    malkere likes this.
  39. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    303
    More and more I like MapMagic ... but I still have questions, eg:

    I have a site where I want to use the biome mountain (with forests and valleys), but at some particular place he wants to have a flat valley and meadow ...
    or...
    I BIOM wasteland (with dead trees), but again I want to in a particular place was dead dense forest ... more than normal
    e.t.c...
    How do these things get? create new separate biomes? or use masks with RAW files

    Therefore, I have not yet purchased a package, I can't test the biomes, and I do not know if such a thing can be done with a biomes.
    Thank you for a possible help.
     
  40. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,121
    There are lots of ways to achieve all kinds of things if you're just trying to create a static environment. Masks to separate areas where only certain trees grow, or only certain noise is applied works just fine. If you want everything to be procedural it gets more complicated. Are you asking how to do this stuff with seed based procedural maps? If so I would suggest biomes separated by noise masks. You can also forgo biomes and just use masks in one big node map to switch between noises and trees and things, but it gets pretty tedious to try and connect the same "biome" noise map across all of the various outputs.
     
  41. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    303
    It is easy to make a nice-looking decorative areas.

    The problem arises when you want to have a useful, varied area, and in specific places special locations like the valley, lake, dense forest, swamp etc.

    I know it is difficult, regardless of whether I use GAIA, TerrainComposer2, WorldCreator or MapMagic.
    Somehow MapMagic I like the most, but I do not know that it will be best for my needs.

    Anyway, thanks
     
    Last edited: Sep 25, 2016
  42. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,675
    As far as I know using thousands of the colliders do not significantly affect the performance - most of them are just culled by AABB on some early stage and do not take part in the collision calculations.
    The other interesting thing I found out is that you cannot turn off the terrain tree collision via script. Maybe Unity just forgot to expose this in settings or something :) That's really awkward, if someone know a workaround - please let me know.

    You can use a blob generator to paint areas under the objects.

    If you can express your scene vision in a level map then you can make a series of maps (masks) for the different biomes. There you can mark your specific places and define where the swamp/valley/forest/etc. should be.
     
  43. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,121
    The only approach I've found is to actually remove ALL tree colliders from the terrain. The TerrainData stores the tree locations, so I use a manager to look at that data and spawn a collider/script only gameobject wherever there is a tree. Then when you chop it down, or need to alter it you can go back into the TerrainData and remove the tree, or change it or whatever. Otherwise collision detection just recognizes you've hit the Terrain and you need to make all sorts of checks to tell whether it's a tree or not and call some floating script elsewhere to do anything anyways =o
     
  44. HsinChien

    HsinChien

    Joined:
    Nov 19, 2012
    Posts:
    22
    I checked the relative height, but my rocks float in the sky...
    upload_2016-9-25_21-59-12.png

    upload_2016-9-25_21-59-20.png
     
  45. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    204
    This might be a bug in the current version, think I've also encountered it. Where your objects float is probably where your height 'caps' (reaches the max height). If you reduce your height map strength you should find this fixes itself.
     
  46. asilvas

    asilvas

    Joined:
    Aug 10, 2016
    Posts:
    9
    I'm new to MM, old time developer, but also new to game development. I've been incredibly impressed with what MM can do, with limited time and experience.

    I am having one (main) issue that I hope this community can help with -- I've scoured this thread for an answer, and haven't quite gotten what I'm looking for.

    Basically my world has static "fight platforms", roughly 5 to 10 meters by 5 to 10 meters in size. I'm using this tool to auto-add these platforms, by leveraging Height map combined with slope detection, to identify the best "flat" regions. I'm using scatter as well to spread out these platforms.

    The two issues I'm running into:
    1) With much tuning (5 meters, 0 min, 3 max), I get decent results, picking mostly flat-ish locations. But it's hugely inconsistent, and not reliable enough. I still get platforms sometimes on the edge of cliffs, for instance. I'm sure it is something I'm not understanding and doing wrong.
    2) I want to keep these platforms away from the outer edges of the land mass. Basically an inversion of the shore map. All I really want to do is say do not drop platform within X meters of edge.


    Cannot stress enough how incredible this asset is. Please keep up the amazing work!! I also own one of your popular competitor assets (that starts with a "G"), and while also amazing, I believe MM has a level of brilliance that far exceeds what "G" can do.
     
    Last edited: Sep 26, 2016
  47. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,121
    what are you using to look for locations? When you find a propable location trying raycasting around it to make sure there are no variations greater than 1m or 2m height from the point you're checking? and 2, don't let the seeker script check areas near the edges ie: run a loop through 900x900 if your landscape is 1000x1000 or whatever the max size of a platform is.
     
  48. tanoshimi

    tanoshimi

    Joined:
    May 21, 2013
    Posts:
    292
    That's what the subtract generator is for. I strongly recommend watching the whole of the tutorial video, but the bit in question starts at about 01:10:
     
    malkere likes this.
  49. HsinChien

    HsinChien

    Joined:
    Nov 19, 2012
    Posts:
    22
    When will it be fixed? Thanks!
     
  50. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,675
    Well, I will clamp the objects height in the next version to prevent such a confuse, but note that the problem is mostly in your graph rather than in MM code. Your terrain has reached the maximum level, but you've got some mountains that raise above it. So the terrain in the non-expected way - instead of mountain peaks you see plateaus. Unity cannot raise the terrain above the maximum level. It's better to avoid such cases by increasing terrain height in General Settings (and btw lowering all of the generators intensity values).

    You can remove other objects with the Subtract Generator, but to to paint something on the terrain maps (or to erase using Blend with subtract mode) you'll need to use the Blob Generator.

    Do you use Flatten Generator for this?
     
unityunity