Search Unity

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

    SeaWardDM

    Joined:
    Mar 12, 2018
    Posts:
    8
    I'm guessing here that the Grass portal is from a Blend off the Textures Output.

    I may be way off base here, but first get rid the "bald" portal, you probably won't need it if this works. Then move the curve, still attached to the Noise to the left side(Input) of the Grass Output Generator. Create another layer in the Grass Output Generator for your new Texture, run the Curve Output to the new Texture. So your Noise will have an output going to "Mask" and another output to the Curve before going into the new Grass Texture.

    Logically the Curve off the Noise should have created the areas you wanted to put the new Texture you're pointing to into that space.....logically.....


    Just my first take on it at a glance.
     
    Last edited: Apr 15, 2018
  2. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Is there a way to sort of "finalize" for 20x20 terrains for example, so if they are pinned they already have their terrain pre-calculated?
    Also is it possible to get the heightmap and splatmap for that area? I need it for a worldmap.
     
  3. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    @Wright - while you're working on the terrain LOD, you might consider a feature to allow terrains to fade-in, instead of popping-in when enabled.

    Also, has the V2 Beta already started and do you have room for more MM customers?
     
    Last edited: Apr 16, 2018
  4. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    What do you mean under "finalize"? Pinned terrains always have their terrain pre-calculated.

    MapMagic uses the standard Unity terrains, so you can read height and splat information from terrain data.

    I'm afraid it's the matter of terrain shaders rather than MapMagic itself.

    I plan to release a public version once I'll deal with major bugs and make it more or less stable. But you can see it in current state at GitLab (email me your order no. to get an access).
     
  5. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Essentially I guess what I'd like is to be able to just have the texture locally rather than having them tied up to the graph, it looks like pinned did what I wanted it just took a long time from the editor had the generation complete checkmark till Unity stopped lagging.

    Also, I tried setting up a tool that exports all of my heightmaps and I then wanted to stitch them together, but I noticed that they don't fit. Is this due to some seam magic being done my map magic?

    upload_2018-4-17_16-42-49.png
     
  6. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
    @Wright there's a private message for you Sir.
     
  7. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @Wright, is map magic V2 going to be compatible with map magic terrains? I.E if I start a map magic terrain now when we move to map magic V2 will it play nice or have to be rebuilt?
     
  8. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    Yes. MapMagic 1 is not very good when generating chunk edge area. Personally I think it's one of the major MM problems, so I've paid extra attention to it when designing MapMagic 2. And, on this occasion, I'd like to show the way MM2 will handle the seams:

    MM2 will load the older graph, but the generate result will vary. It will be like generating with the other seed - you will get the similar terrain, but it will not be exactly the terrain from MM 1.
     
  9. dimych1990

    dimych1990

    Joined:
    Apr 23, 2014
    Posts:
    6
    Is there a way to archive mesh blending with MM? I am using CTS, MM and VS together and mesh blending and terrain holes for caves etc. Is there something planned or you have a idea how to archive this? Thanks in advance, great tool!
     
  10. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    I don't remember exactly if CTS support mesh blending, but if it does do you have any problem using it the way it's commonly used with CTS (without MM)?
     
  11. RobertBojor

    RobertBojor

    Joined:
    Nov 3, 2016
    Posts:
    1
    Is there a way to add and bake a navmesh automatically to the finished terrain? I mean when the new pieces are spawned to add the navmesh and bake it.
     
  12. dimych1990

    dimych1990

    Joined:
    Apr 23, 2014
    Posts:
    6
    Sadly, CTS doesn't have this feature. Maybe I should write in the CTS thread. But thanks for your reply. For me, all the 3 plugins works very good.
     
  13. StephanCoupland

    StephanCoupland

    Joined:
    Nov 5, 2013
    Posts:
    10
    Hi,

    I am considering purchasing MapMagic after reviewing all the videos you have posted. It looks really good and I am keen to see what version 2 looks like. I have used a few other good tools, but most have struggled with very large open worlds with large numbers of tiled terrains.

    Some quick questions:

    1 - If I buy the current version (1.9.1) in the asset store, will I have to buy it again for version 2 when that is released?

    2 - Can I input multiple height maps so I can use the offsets to tile them? (I would like to tile them, rather than stamping like Gaia)

    3 - Can I use my own imported maps to mask biomes, and again have multiple inputs and use offsets to tile them?

    4 - After the terrain has been created, can I manually sculpt the terrain to add custom features, but still use the texture painting and vegetation planting tools.

    Thank you,

    Stephan
     
  14. Nihilus0

    Nihilus0

    Joined:
    Jan 25, 2017
    Posts:
    52
    MM can not use multiple Biomes with CTS.
    Does anyone have a good ideas to solve this?
    Am I missing something?

    When you enter the MM of Biome, you can see that the lines of 'Custome Shader Node' are all released. Only one biome is normally connected.

    Edit :
    I discovered that the CTS_Profile slot follows one Biome. and I also enquire to the CTS forum about this. If this doesn't solved, I think Mapmagic can not use Biome when using CTS.

    ps. I'm a non-English speaking Buyer. used Translator.
    20180420_063203_1.png
    20180420_063203_2.png
     
    Last edited: Apr 19, 2018
  15. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    StephanCoupland likes this.
  16. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455

    I kind of like the suggestion, but I don't know if it might be tedious to have to click it and then move to the edit window.
    How about, when you select a node it folds itself out with all the values (and perhaps softly pushes nodes directly below it slightly lower), then when you unselect (for example by clicking the background) it folds neatly back up and nodes that were displaced return to their positions?
     
  17. Nihilus0

    Nihilus0

    Joined:
    Jan 25, 2017
    Posts:
    52
    @Wright Thank you for your prompt reply before it's too late..
    This issue has made it necessary for me to think of Biome differently when using CTS.
    but, it's ok. I'll follow your advice and try to use the united CSO Node. thx.
     
    Last edited: Apr 20, 2018
  18. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    @Wright
    from your poll.
    I think this feature maybe make me slower with workflow because this add more step before edit node, and can't see overview.
    my suggestion.
    -add hide and show parameter(affect all node) button with "eye" icon.
    -add hide and show parameter to individual node something like "foldout" from unity GUI.
    For the reason is "clean graph" or "reduce use space of node".

    Thanks for reading my request.

    Another question
    -Can I use new LOD system(MM v2) for something like horizontal feature in Voxeland.

    If my generate is 5x5 and. "0" for Normal terrain and "1" for Horizontal(LOD) terrain.
    1 1 1 1 1
    1 0 0 0 1
    1 0 0 0 1
    1 0 0 0 1
    1 1 1 1 1
     
  19. dreyn74

    dreyn74

    Joined:
    Mar 10, 2017
    Posts:
    14
    Map Magic stopped working in a project that I was working on, and, now, when ever I open any scene in that project, I get this error:

    Assets/MapMagic/Main/TerrainsGrid.cs(19,111): error CS1061: Type `MapMagic.Chunk' does not contain a definition for `start' and no extension method `start' of type `MapMagic.Chunk' could be found. Are you missing an assembly reference?

    I can create a new project and add Map Magic, and that works, but I need to save the project that I was already working on. I have too much time in that project. Please Help!

    edit: I was able to copy the scene over to a new project, but my nodes are lost. Please help me save this project.


     
    Last edited: Apr 20, 2018
  20. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    One simple suggestion, rightclick the map magic folder in the project view and select reimport.
    This will solve it if the error comes from something having been imported incorrectly (which it sounds like might be the case)
     
  21. StephanCoupland

    StephanCoupland

    Joined:
    Nov 5, 2013
    Posts:
    10
  22. StephanCoupland

    StephanCoupland

    Joined:
    Nov 5, 2013
    Posts:
    10
    Thank you!
     
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    I'm surprised to see most users like it the way it's done now, so I should not fix the thing that's not broken. However I will leave the poll open for a couple of days just in case.

    I'm not sure that nodes should have "extendeble" properties - it will require additional space for each node in case you would like to see it's properties, and will not make a graph more compact.

    I'm thinking in switching to "simple view" on the furtherest zoom level, so you could zoom out and view your graph conveniently.

    LOD is a wrong and confusing name. I'm using it traditionally since it's called this way in this thread. They are used to generate faster, not to render fast. Guess the "preview" is the right name. The real LOD could be achieved with a pixel error value (in settings, it's a Unity feature) - increasing it will optimize your terrain based on it's complexity and view distance - and will do it the way better than just a low-resolution terrain.

    When does it stop working? What were you doing before that? According to the error it seems that there were changes in MapMagic script files - maybe some of the files were removed or partly updated? Have you made any changes with MM asset or folder?
     
    AthrunVLokiz likes this.
  24. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    Sorry for my call mistake. I meant generate only low resolution when far terrain in play-mode, when they close to camera they will full generate high resolution. Are you mean "low-resolution preview" not work in play-mode?

    Thanks.
     
  25. dreyn74

    dreyn74

    Joined:
    Mar 10, 2017
    Posts:
    14
    I was working on a scene with a biome, but I did not save the biome externally. I saved and closed the scene, and when I returned to open it later in the day, I was getting these errors:

    I tried to reimport the scripts, and I even copied all of the Map Magic scripts from a new project into the old project, but it still does not work. I really need this to be fixed because I put a LOT of work into getting this far, and I would not want to lose this work.
     
    Last edited: Apr 20, 2018
  26. dreyn74

    dreyn74

    Joined:
    Mar 10, 2017
    Posts:
    14
    I copied the scene to a new project with Map Magic, and I only get one error, but if the nodes are lost, then this project is lost. Is there a way to save this? I need these nodes!


    In regards to the discussion about showing the properties of nodes in the graph, why not just show the properties in the properties window AND in the graph. That way either one or the other will suit the appropriate user. It would be nice to have the ability to collapse nodes or turn some into functions though.
     
    Last edited: Apr 21, 2018
  27. Ivy-SM

    Ivy-SM

    Joined:
    Apr 18, 2013
    Posts:
    31
    Hi,
    In the latest Unity beta (2018.2b1) there's an error and the MapMagic editor is empty.
    UnityException: SetKeys is not allowed to be called during serialization, call it from OnEnable instead. Called from ScriptableObject 'GeneratorsAsset'.
    See "Script Serialization" page in the Unity Manual for further details.
    UnityEngine.AnimationCurve.set_keys (UnityEngine.Keyframe[] value) (at C:/buildslave/unity/build/Runtime/Export/AnimationCurve.bindings.cs:176)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1a80661d61443feb3dbdaac88eeb776>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1a80661d61443feb3dbdaac88eeb776>:0)
    System.Reflection.MonoProperty.SetValue (System.Object obj, System.Object value, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) (at <e1a80661d61443feb3dbdaac88eeb776>:0)
    System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value, System.Object[] index) (at <e1a80661d61443feb3dbdaac88eeb776>:0)
    MapMagic.CustomSerialization.ReadClass (System.Int32 slotNum, System.Collections.Generic.List`1[T] classes, System.Collections.Generic.List`1[T] objects, System.Collections.Generic.List`1[T] floats, System.Collections.Generic.List`1[T] references) (at Assets/MapMagic/Main/CustomSerialization.cs:485)
    MapMagic.CustomSerialization.ReadClass (System.Int32 slotNum, System.Collections.Generic.List`1[T] classes, System.Collections.Generic.List`1[T] objects, System.Collections.Generic.List`1[T] floats, System.Collections.Generic.List`1[T] references) (at Assets/MapMagic/Main/CustomSerialization
    .cs:384)​
    Do you have any idea what's wrong?
     
  28. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    Hmm, it worked fine in Beta 1, I will have a look soon.

    What where you doing between closing the scene and opening it again? Why is there "Finished updating scripts / assembles" message? Were you updating updating Unity or opening the project in the other Unity version? Is there any way to reproduce this issue?

    "Preview terrains" will be generating in the playmode too. They were made to display the terrain almost immediate when player moves across the land, while the main land is generating in the background.
     
    Ivy-SM likes this.
  29. dreyn74

    dreyn74

    Joined:
    Mar 10, 2017
    Posts:
    14
    At some point in trying to fix this, I updated to the latest Unity version. That's when it recompiled scripts. Is there no way to save this project? Do I have to start over?

    I removed everything from my original project except for Map Magic, and I'm still getting this error.
     
    Last edited: Apr 21, 2018
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    dreyn74, what is the size of your .asset file in bytes? If it is not zero then it still contains data and could be restored.

    Do you have any compile errors? Could all of these errors be cleared?

    Was there anything special in the update procedure? Could you describe it step-by-step, i.e.:
    - saved the project in 5.6
    - closed Unity editor
    - opened the project in 2017.1
    - clicked "Continue" when saw "Non-matched Editor" window
    - waited for re-import

    Ivy-SM, I admit they have done something with the curve in Beta 2, now there's no access to curve from thread. Don't know if this is an Unity issue and will be fixed or it is the way the new Unity will work.
     
  31. dreyn74

    dreyn74

    Joined:
    Mar 10, 2017
    Posts:
    14
    The file is 12.5mb
    The only errors remaining are the ones in the image that I last posted.
    This error began before I updated. I updated to try to fix the errors.

    edit: Now there are new errors in the project. I did nothing at all since the last time. Maybe I have hard drive corruption.
     
    Last edited: Apr 21, 2018
  32. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    321
  33. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    163
    So I have upgrade to Unity 2017... finally. Good news...Lags are mostly gone and I don´t need to refresh the window anymore. Thanks for that ! Looking forward to 2.0.

    Because of that I made quite a progress in a few days. Thought I share some shots. All MM, single biome.





    Some more: https://imgur.com/a/IMwtFf0

    Cheers.
     
  34. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
  35. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    Could you please describe the steps you took before the error appeared? I really need to know them to help you.
    And could you please paste the first, the top one error (I can see you've got 42 of them)? The first one is usually the cause of all of the errors that follow.

    secondsight_, the screens are amazing! Keep up doing the great job!
     
  36. dreyn74

    dreyn74

    Joined:
    Mar 10, 2017
    Posts:
    14
    I have already said, I did nothing but work on the scene as usual before I saved and closed the scene before going to work. Then, when come home and opened the scene later, these errors were there.
     
  37. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    Have you opened in the same Unity version? If so I really wonder where does "Finished updating scripts / assembles" come from. There might be really something wrong with your project consistency.

    Anyways, I can try looking into the asset file and try to open it, but I really don't know if it could be opened (email it to me if you'd like to).
     
    Last edited: Apr 23, 2018
  38. dreyn74

    dreyn74

    Joined:
    Mar 10, 2017
    Posts:
    14
    I managed to produce this error by adding the Unity Standard First Person Controller asset to the project. That's all it takes to make this happen. Next time the project is opened this will happen.


    The errors from the FPS controller are gone because I deleted the folder from the project, but now the nodes from Map Magic are gone?! I just lost another scene??
     
    Last edited: Apr 23, 2018
  39. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    Is there a way I could set up biome distribution based on temperature and humidity? They're the real important factors for realistic biome distribution and I want realistic biome distribution.
    Also, I intend to have these parameters affected by numbers calculated before the map magic generation gets called so I also want to know if Map magic can even be fed information from scripts.
    Lastly, and not strictly a Map magic question, I know that making map magic terrain look spherical is a shader thing but how do I actually loop the character around the planet to the other side of the map magic terrain? I want the player to have full planet access but I don't want it to be made awkward by them finding the edge of the world. I mean in a fantasy game that would be normal but in a scifi it would be weird.
     
  40. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    Got a crash, the latest version 1.9.1, 100% repro


    MissingReferenceException: The object of type 'Terrain' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    MapMagic.SplatOutput+<Apply>c__Iterator2.MoveNext () (at Assets/MapMagic/Generators/OutputGenerators.cs:552)
    MapMagic.GeneratorsAsset+<Apply>c__Iterator1.MoveNext () (at Assets/MapMagic/Main/GeneratorsAsset.cs:565)
    MapMagic.Chunk+<ApplyRoutine>c__Iterator0.MoveNext () (at Assets/MapMagic/Main/Chunk.cs:239)
    MapMagic.ThreadWorker.CoroutineFn () (at Assets/MapMagic/Main/ThreadWorker.cs:604)
    MapMagic.ThreadWorker.UpdateApply () (at Assets/MapMagic/Main/ThreadWorker.cs:224)
    MapMagic.ThreadWorker.Refresh () (at Assets/MapMagic/Main/ThreadWorker.cs:143)
    MapMagic.MapMagic.Update () (at Assets/MapMagic/Main/MapMagic.cs:272)

    It appears to be caused by loading a scene that is being built by MapMagic, immediately loading another scene, then loading MapMagic again later
     
    Last edited: Apr 24, 2018
  41. RektDad

    RektDad

    Joined:
    Apr 17, 2018
    Posts:
    5
    Pardon my ignorance... Is it possible to just make a "finite" 4x4 map with MM? I didn't want to generate infinite terrain, but thought this tool could do both? (i.e. settings infinite terrain toggle)
     
  42. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Yeah, sure. there's a setting for that

    upload_2018-4-24_20-50-21.png
     
  43. RektDad

    RektDad

    Joined:
    Apr 17, 2018
    Posts:
    5
    I saw the setting for it, but it seemed to generate infinite terrain anyway. I'll try again to see if I can make it stop at 4x4.
     
  44. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I haven't personally played with non-infinite terrains but that setting should really be the one to use.. I think.
     
  45. RektDad

    RektDad

    Joined:
    Apr 17, 2018
    Posts:
    5
    It was all me... I was able to generate a 3x3km map having that option turned off. I must have had it on during my previous test. Thanks.
     
    Mr-Logan likes this.
  46. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    You need to generate temp noise, and a humidity noise, both super low frequency, then look up the biome at each point using a whitaker like diagram. You might need to blend those noise with heightmap according to specific rules before the look up, to get altitude modifier.
     
  47. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    That doesn't sound impossible. Although, I might blend the noise with a regular gradient for temperature to get the icecaps and tropics like on earth. The humidity map could also be just the water map with a large falloff. I feel those would yield more realistic results than just noise. A bit of natural noise would be made in that through the altitude modifier anyway. I don't know why I couldn't think of doing that before asking the question.
    I didn't know about the Whitaker diagram so there's that.
     
  48. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Whittaker diagram allow for the biomes placement to be always meaningful (with smooth noises), you can even modulate biomes and sub biome to get smooth transition according to the value of the noise, due to that smoothness, and even have specific event at the threshold values. The technique of biomes and the diagram was introduced by minecraft anyway, I basically just retold the original implementation.
     
  49. Nihilus0

    Nihilus0

    Joined:
    Jan 25, 2017
    Posts:
    52
    I used to think the same as you. However, MM(MapMagic) keeps creating endless maps by rules. So the finite map's rules we want don't fit into MM. If you want to do this, you need to extend development beyond the MM's limit. After all, it is only coding(extra/modify).

    The proposed method is the generation of temperature and humidity by noise.
    However, if you want to make something more "realistic", you need a way to make a info of the temperature and humidity(T&H).
    1. Earth's revolution and rotation
    2. Wind Map
    3. Position of the Sun
    T&H are calculated under the above three conditions.
    However, MM is the infinite map generator of the plane. You can not apply the above three things to MM. So you have to tap into the noise.

    Nevertheless, if you throw out the noise and want to be realistic, you eventually have to compromise with infinite terrain features. That is my project.

    The following screenshots are finite terrain created using MM. The northern cyan(color) is a snowy terrain caused by T&H. white colors is a mountain's top. I never used noise at map of T&H. just used custome node.
    If you compare the pictures and look closely, you can find that the moisture does not cross the mountain range. Beyond the mountains is a dry terrain. This was determined by my custom node. Of course this still needs more research...
    20180324_120840_2.png 20180324_120840_1.png
    ps. I'm a non-English speaking Buyer. used Translator.
     
    Last edited: Apr 25, 2018
  50. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,274
    Thanks, fixed for the next version.

    Sure, Mr-Logan pointed the right checkbox.

    You can blend your heat noise with the simple form gradient so that southern areas would be hotter than the northern ones (or vice versa). Also it would be useful to blend-in inverted heightmap then to make elevated areas colder.

    And speaking about Whittaker Diagram: I plan to add some functions (aka node presets) in v2, and Whittaker diagram will be among them.

    MapMagic can generate an infinite terrain, but it does not mean that your game world have to be infinite too. You can limit your game world with colliders or scripts, this way MM will still generate the terrain, but it will be unreachable, the background. And the game area could use heat gradients and other non-repetitive stuff.