Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    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. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    454

    Is it possible that you're making a circular logic error?
    MM doesn't warn about it, but it doesn't allow you to connect nodes either if they do cause circular logic.

    For example. I'm guessing that the grass portal is the output from the texture output node for grass, and you then want to set the grass bald to affect the texture output node for, that makes grass dependent on grass bald which is dependent on grass which is dependent on grass bald etc.
    It's sort of a chicken and the egg problem :)
     
  2. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    148
    Yes indeed, I've already realized that I've that kind of issue. but actually I can't find a solution. How do I tell to MM to mix the grass texture, for example with a noise that use two different kind of grass?
     
  3. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    Is there any way to determine if a coordinate is placed internally or outside of the mountains? I know it's obvious visually, but you will need a node logic that masks shore for all external areas. If you could describe yourself the way you distinguish internal areas from external you will have a clear vision of what your graph should be.

    As Mr Logan said you are trying to create closed node circle. Did I get it right that you are going to paint with specific texture in areas where some sort of grass grows? If so then I guess it would be easier to paint with this texture first and then use it's texture output as a mask for that type of grass.
     
  4. Dodforer

    Dodforer

    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
  5. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    454
    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.
     
  6. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    92
    @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
  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    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).
     
  8. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    454
    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
     
  9. MaximilianPs

    MaximilianPs

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

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    713
    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?
     
  11. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    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.
     
  12. 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!
     
  13. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    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)?
     
  14. 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.
     
  15. 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.
     
  16. dxb2010

    dxb2010

    Joined:
    Nov 5, 2013
    Posts:
    6
    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
     
  17. Cosmoraph

    Cosmoraph

    Joined:
    Jan 25, 2017
    Posts:
    28
    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
  18. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    454
    dxb2010 likes this.
  19. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    2All MM users:
    Don't you think that the graph is over-complicated with all these node values displayed? How do you like the idea of displaying values for the selected node only?
    I'd love to hear your feedback through this poll: MapMagic 2 Values Display Poll.
    1. InGraph.png In graph, the way it's done now.
    2. Panel.png In a panel within MM window.
    3. Inspector.png In inspector, the way it's done for other game objects.

    You can use the OnApplyCompleted event to add any terrain postprocessing when is terrain is finished and applied.

    Yes. All current and future MapMagic owners will get MapMagic 2 with no extra charge.

    You can use several input nodes (texture or .raw), and each of them can have it's own offset. Each of them could be tiled too, if that is what you mean.

    Yes, if you store your maps in unity texture format - or if using 16 bit RAW file.

    Only since v2.

    You can use CSO node with biomes, but each input should be used in only one biome. In most cases - when blending temperate grass and desert sand - it's not a problem. If you are going to use universal textures for all biomes consider storing CSO node in a root level. You can use root-level CSO additionally to the CSO nodes in biomes too.
     
    matteumayo and dxb2010 like this.
  20. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    454

    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?
     
  21. Cosmoraph

    Cosmoraph

    Joined:
    Jan 25, 2017
    Posts:
    28
    @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
  22. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    16
    @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
     
  23. 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
  24. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    454
    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)
     
  25. dxb2010

    dxb2010

    Joined:
    Nov 5, 2013
    Posts:
    6
  26. dxb2010

    dxb2010

    Joined:
    Nov 5, 2013
    Posts:
    6
    Thank you!
     
  27. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    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.
  28. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    16
    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.
     
  29. 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
  30. 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
  31. Ivy-SM

    Ivy-SM

    Joined:
    Apr 18, 2013
    Posts:
    22
    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?
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    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.
  33. 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
  34. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    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.
     
  35. 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
  36. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    148
  37. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    107
    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.
     
  38. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    454
  39. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    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!
     
  40. 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.
     
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,366
    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
  42. 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
  43. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    45
    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.
     
  44. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    84
    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
  45. 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)
     
  46. Mr-Logan

    Mr-Logan

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

    upload_2018-4-24_20-50-21.png
     
  47. 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.
     
  48. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    454
    I haven't personally played with non-infinite terrains but that setting should really be the one to use.. I think.
     
  49. 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.
  50. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    3,364
    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.