Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] MapMagic 2 - infinite procedural land generator

Discussion in 'Assets and Asset Store' started by Wright, Apr 24, 2020.

  1. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    Further evolution of the node based procedural and infinite game map generator. Inspired by MapMagic World Generator, it's an absolutely new asset made from scratch with familiar MMWG workflow.

    CoreCover3.jpg

    Each node on a graph represents a terrain or object generator: noise, voronoi, blend, curve, erosion, etc. Once the nodes are connected the magic happens: the tool will create the endless land for you. No need for painstaking work sculpting and drawing vast terrains, placing thousands of objects, painting fields of grass: just give your orders to the plugin in the form of a node graph and it will create a map automagically.

    Pricing
    MapMagic 2 core asset is absolutely free, so any Unity user could create spectacular terrain with it. The core version will include all of the map generators and could be used with no limitations.

    In addition to the free version, MapMagic 2 has three additional modules:
    • Object generators
    • Spline generators
    • Biomes and functions
    Each of the modules costs $45.

    All MM1 users can get these modules for the half price.

    Spline module is currently in early access, and you can get it with 50% discount if you buy it now.

    Asset Store
    - MapMagic 2
    - MapMagic 2 Objects
    - MapMagic 2 Splines beta
    - MapMagic 2 Biomes and Functions

    New features
    Although MapMagic 2 is a new asset with new core, generators and GUI code, it follows the work pipeline that was introduced in MapMagic. MMWG users might find useful these new features:
    • Native code: for most of the core generators the code has been re-written in C++. This results in significant generate speed improvement - up to 5 times for some nodes like Erosion. All C++ code included. Feature works for Mac and Win editors, Mac an Win standalone and iOS builds.
    • New graphical user interface: major performance improvements and new experience: in-graph preview, new ways to create, remove, re-link nodes.
    • All nodes are resolution-independent: you can switch the resolution and get the same result, but more (or less) detailed. resolution-independent, The generated result is always the same in world units no matter of chunk size or resolution. If you have a mountain at some position it will always be here no matter what size/resolution values you set.
    • Drafts: low-resolution terrain tiles that will be generated way faster to be displayed at far distance and for editor preview;
    • Margins: the way to create borderless terrains with no visible seam without using "Safe Borders";
    • 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.
    Compatibility
    MapMagic 2 has out of the box compatibility with:
    • CTS
    • MegaSplat
    • MicroSplat
    • RTP
    • Vegetation Studio Pro
    And in pinned (non-dynamic) mode: with all of the assets using standard Unity terrains.

    What's included

    All of the assets shown at the Asset Store screenshots are included either with the asset itself, or with one of the modules.

    All of the assets shown at the module screens are included with this module.

    The asset comes with the full source code.

    Issues/Ideas reporting

    For all of the asset questions and issues you can contact me (publisher) via email.

    To help maintaining all of the issues and ideas organized, I'd like to kindly ask you to use the Idea Informer as an alternative to emails. To report here:
    • Define the short bug description, and type it in "I would like to..." field. You will see the drop down list of the similar issues/ideas reported. Please look through it to find if your issue is already reported. Try to leave a specifying note instead of reporting a new issue.
    • Switch "Suggest an Idea" to "Report a Problem" in "I would like to..." field if you are reporting an issue.
    • In a problem specification field (or later comments to an issue) define the detailed issue description.
    Whether you are using email or Idea Informer, you can help to reproduce the issue and speed up it's fixing if you provide the detailed issue description, which includes:
    • Your MapMagic version (could be found in Window - MapMagic - About)
    • Steps to reproduce the issue. For example:
      • Start the new scene
      • Drag the attached graph to the scene to create MM object
      • Try linking the Scatter node output with the Curve node input
      • See the error in the console, and no link appear
    • If your graph or scene is needed to reproduce the issue - add a link to dropbox/onedrive or other file share (or via email).
    • If there are errors in the console - copy the first one (the top one)
    There are no special requirements for reporting ideas, so feel free to express them in a free form.
     
    Last edited: Apr 30, 2020
    Mauri, flow-, ko0zi and 9 others like this.
  2. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,379
    This is so exciting. Congratulations!
     
    Wright likes this.
  3. sanuvin

    sanuvin

    Joined:
    Feb 11, 2014
    Posts:
    61
    Biomes and functions link not working for me

    Had to remove some characters %20https from the address to get it to work.

    Thanks
     
    Wright likes this.
  4. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    Fixed! Thanks!
     
    protopop likes this.
  5. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    286
    A big congratulations and thanks for all the hard work making this happen :)
     
    Wright likes this.
  6. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,645
    Is GPU instancer already compatible? or does it need to be updated for mm2?
     
  7. PyroStudios

    PyroStudios

    Joined:
    Sep 23, 2012
    Posts:
    225
    Congratulations on the release! And of course I am buying all the modules right now!
     
    Wright likes this.
  8. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,379
    I just bought everything:) MapMagic 1 is such a wonderful product. MapMagic 2 is one of those insta-buy assets. I hope you make. a lot of sales and wish you success.
     
    goonya, hopeful, Daniel-Talis and 2 others like this.
  9. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,645
    I'm on OSX Catalina unity 2019.3.2f1 and when importing the mm2 free asset I get one error:

    Assets/MapMagic/Tools/GUI/Editor/Draw.cs(2682,6): error CS0103: The name 'swapTimes' does not exist in the current context

    Any Idea how I can fix this?
     
    protopop likes this.
  10. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    Congrats Denis!
     
    Wright likes this.
  11. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    I have not made GPU Instancer compatible with MM2. If it had a specially made compatibility with MM1 then I doubt it will work with MM2. If it could work with MM1 out of the box - then most probably it will work with MM2.

    This quick fix should fix the issue. Oddly enough, I checked it on mac os before submitting. Sorry for that.
     
    Lars-Steenhoff likes this.
  12. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    286
    A quick note, MM2 had a few errors when I first installed it and I just had to make sure both Scripting Runtime Version and API Compatibility Level were set to .NET 4.x in Project Settings - Player.
     
    protopop and Lars-Steenhoff like this.
  13. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    213
    An unexpected and wondeful surprise. Thanks for your hard work.
     
    Lars-Steenhoff likes this.
  14. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,379
    Thank you:) This and also the Draw.cs quick fix above fixed my errors. A small note, if you switch platforms make sure you switch to .NET 4.x again - my switch to IOS reset it to .NET 2

    Im just playing around on MacOS. I'm on an older 2013 MacbookPro and the responsiveness is really fast. When I adjust a curve it does this cool lower res thing and it just responds instantly. I really like the look of the new graph too - everything is easier to see.

    The interactive previews below each node are very helpful and also instantly responsive.

    When I switch scenes and select the MapMagic object, the editor graph stays the same. I have to explicitly open the new graph - maybe that's intentional but my instinct wants the editor to show the graphs for my selected MM2 object.

    Id love a scene where you can walk around from the get go like in Map Magic 1, just so we could admire everything.

    It would be nice to be able to install MM1 and MM2 side by side, just because in my use case I plan to try and replace MM1 in my game with a MM2 terrain, but its not a deal breaker. Ill probably open two projects and manually replicate my scenes (I know they'll be very different looking and that's ok)

    Splines look amazing how they cross tiles. Im looking very forward to a tutorial on these - its probably the biggest reason I'm excited about MM2. Having roads in a virtual world makes a huge impact when exploring, and I think the splines could probably be used for rivers too. BTW the included brown dirt texture looks great on roads - you get all these nice rock textures every few meters.

    Biomes look great too.

    Really great work here, and I can only imagine how much hard work you put into this. Thanks so much. And thanks for the tutorials - it will be great to follow along with them.
     
    goonya, Lars-Steenhoff and camta005 like this.
  15. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    86
    Congratulations Denis! MM2 is so exiting. Top noch work, keep going on!
     
    Wright likes this.
  16. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    394
    Downloaded the free core and it's working great. Purchased the three modules so I'm good to go. :)
     
    Wright likes this.
  17. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    I'm getting this a lot when I refresh the graph (using MicroSplat)

    Code (CSharp):
    1. Thread failed: System.IndexOutOfRangeException: Index was outside the bounds of the array.
    2.   at MapMagic.Nodes.MatrixGenerators.CustomShaderOutput200.BlendMatrices (Den.Tools.CoordRect colorsRect, Den.Tools.Matrices.Matrix[] matrices, Den.Tools.Matrices.Matrix[] biomeMasks, System.Single[] opacities, System.Int32[] channelNums) [0x001e9] in D:\Projects\MM2Test\MM2Test\Assets\MapMagic\Generators\Matrix\Runtime\TexturesOut.cs:337
    3.   at MapMagic.Nodes.MatrixGenerators.MicroSplatOutput200.Finalize (MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x00084] in D:\Projects\MM2Test\MM2Test\Assets\MapMagic\Compatibility\Runtime\MicroSplatOutput.cs:44
    4.   at MapMagic.Nodes.Graph.Finalize (MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x00088] in D:\Projects\MM2Test\MM2Test\Assets\MapMagic\Nodes\Graph.cs:756
    5.   at MapMagic.Terrains.TerrainTile.Generate (MapMagic.Nodes.Graph graph, MapMagic.Terrains.TerrainTile tile, MapMagic.Terrains.TerrainTile+DetailLevel det, MapMagic.Products.StopToken stop) [0x0007c] in D:\Projects\MM2Test\MM2Test\Assets\MapMagic\Terrains\TerrainTile.cs:661
    6.   at MapMagic.Terrains.TerrainTile+<>c__DisplayClass37_0.<EnqueueTask>b__0 () [0x00000] in D:\Projects\MM2Test\MM2Test\Assets\MapMagic\Terrains\TerrainTile.cs:570
    7.   at Den.Tools.Tasks.ThreadManager.TaskThreadAction (Den.Tools.Tasks.ThreadManager+Task task) [0x00002] in D:\Projects\MM2Test\MM2Test\Assets\MapMagic\Tools\ThreadManager\ThreadManager.cs:125
    8. UnityEngine.Debug:LogError(Object)
    9. Den.Tools.Tasks.ThreadManager:TaskThreadAction(Task) (at Assets/MapMagic/Tools/ThreadManager/ThreadManager.cs:128)
    10. System.Threading.ThreadHelper:ThreadStart()
    11.  
    EDIT: It appears to be happening when I have a MicroSplat node that does not have a layer for every texture defined in the MS material.
     
    Last edited: Apr 25, 2020
  18. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    465
    nice job Dennis. I really like the Lock tool for MM2. this is something that stopped me from using MM1, in our game that and I was not fond of the biomes in MM1. . the lock tool looks very nice for users who like using manually detail work, or using tools like GENA, and world building so we won't have to redo work if we make changes...So glad you added this..... very nice... Now, my question is, for your spline tool, I know its early and just released, but is this a basic spline, can you add slopes. IE, Easy Roads.... or Carve into the terrain. ? Just curious what it can do, beyond what I see in the pics..right now they seem very basic.. base on the photos. So, just wondering, if it can do more and what is the plans for it.
     
  19. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    Thanks so much! Hope you enjoy MM2!

    Thanks for reporting this! Will check if there's any issue with an unlinked MS output layer inlet.

    First of all I plan to add a spline output that will export the spline to mesh, so you could make a road with a custom offset shader and proper textures with no additional asset involved. However, I'm always up for an integration. Feel free to add integration idea and to vote for the asset you want to integrate at the idea informer.
     
    Lars-Steenhoff likes this.
  20. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    56
    I installed Map Magic 2 to try it out and I'm getting the following error opening the tutorial scene:

    Code (CSharp):
    1. Assets/Plugins/MapMagic/Compatibility/VegetationStudio/VSProObjectsOut.cs(12,22): error CS0234: The type or namespace name 'ObjectsGenerators' does not exist in the namespace 'MapMagic.Nodes' (are you missing an assembly reference?)
    Is this because I have VSPro installed and not the objects module?

    Also, as a separate question that isn't clear from the description, is this purely a runtime tool that generates the terrain at runtime, or can it be used to create and export a regular Unity terrain?
     
    Last edited: Apr 26, 2020
  21. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    394
    I found it best to start with a new MM2 project and then add assets to check for compatibility.
     
  22. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    107
    Hey @Wright, congrats on the release, great job!
    However, I have some questions/problems.

    1. How do I set MapMagic seed via script? WIth MM1 I just did
    MapMagic.instance.seed = something;

    2. I am trying to generate terrain via script at runtime, so I tried the StartGenerate method of the MM object, however I'm getting the following exception:
    Code (CSharp):
    1. Exception: TileManager: No Camera in scene to generate tiles.
    2. Den.Tools.TileManager`1[T].RefreshCamCoords (System.Single tileSize) (at Assets/3rdParty/MapMagic/Tools/TileManager.cs:152)
    3. Den.Tools.TileManager`1[T].Update (UnityEngine.Vector3 tileSize, System.Object holder, System.Boolean distsOnly) (at Assets/3rdParty/MapMagic/Tools/TileManager.cs:99)
    4. MapMagic.Core.MapMagicObject.Update () (at Assets/3rdParty/MapMagic/Core/MapMagicObject.cs:152)
    5. MapMagic.Core.MapMagicObject.EditorUpdate () (at Assets/3rdParty/MapMagic/Core/MapMagicObject.cs:145)
    6. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    7. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    8. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    9. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
    10. System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    11. System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    12. System.Delegate.DynamicInvoke (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    13. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <90d4bcb003fb405fb09241aed2f178aa>:0)
    14.  
    I disabled the Infinite Terrains and also the Generate around main camera as I do not want to use these features and want to control the generation myself.
    When I enable the "around main camera" option and still have the Infinite terrains disabled, MapMagic spawns a lot of unwanted tiles.
     
    Nunez-Torrijos and goonya like this.
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    New version 2.0.1 in available at the asset store. It contains the Mac OS fix and some small changes.

    I will check VS Pro compatibility with no objects module. For now you can just remove VSProObjectsOut.cs - at least it should not be in a core version. Probably it's editor script should be removed too.

    Now it's a bit more complex. The seed value is not kept anywhere, but used to initialize the noise that is the part of the graph:
    Code (CSharp):
    1. mapMagicObject.graph.random = new Noise(mySeed, 32768);
    Where 32768 is a permutation count (i.e. "diversity" of the noise) = 2^15, no need to change it :)

    I think I'll add some interface functions to mapMagicObject - like this one to set seed. Feel free to write your ideas of what else should be exposed this way.

    Speaking of re-generating it's already here:
    Code (CSharp):
    1. mapMagicObject.Refresh();
    MapMagic should not generate anything when all "Around" checkboxes are disabled. Seems to be a bug, will look into it.
     
  24. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    107
    Thanks for the reply, will try the seed snippet. :)
    Regarding the other problem, I'm not sure we understand each other.
    When all "Around..." checkboxes are disabled and Infinite generation is also disabled, MapMagic doesn't generate around anything, but it throws the exception I posted, preventing me from just generating terrains at runtime via script. When I leave "Infinite" disabled but enable "Around camera", it sitll generates new tiles.
    I just want to generate (force generate, if you will) when the game starts, with random seed. I did that in MM1 with ease, I just used Generate with force set to true. So all in all, should I use Refresh() instead of StartGenerate()?
     
  25. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    465

    ya just curious how involved your spline tool plans to be, Easy roads, shoulders, is nice. So I was just curious . Thanks for the info.
     
  26. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    @Wright Any plans for procedural lake placement? Like spline generation around isoheights?
     
  27. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    286
    How do we create custom generators for MM2? @Wright is it possible to have an equivalent of SampleGenerator.cs from MM1 and some instructions on the wiki?
     
  28. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    41
    I would like to validate, do we need the Object module to work with both Vegetation Studio Pro and Map Magic 2? I am getting those errors.

    upload_2020-4-28_16-45-44.png
     
  29. ko0zi

    ko0zi

    Joined:
    Feb 27, 2017
    Posts:
    13
    Congrats on the release, really excited about this one! So far, everything has been flawless, good job!
     
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    If you want to generate (or re-generate) the pinned tiles you've got to use Refresh(). To pin the tile you can use
    Code (CSharp):
    1. mapMagicObject.tiles.Pin(new Coord(int myTileX, int myTileZ), bool pinAsDraft, MapMagicObject mapMagicObject);
    Just wondering if the method like PinAndGenerate (int tileX, int tileZ) be better for that?

    I've reproduced and fixed the error you mentioned - the fix will be available in next release. I think I get it what you want to do, and you doing it right, however this error doesn't let you to move further.

    You could place the lake planes in MM1. If you mean more complicated approach - feel free to share your idea.

    Yes, isoline node - the one that will create a spline "slice" of the terrain at the given height - is planned.

    Yep, will create one along with the documentation.

    No. You've got to remove VSProObjectsOut.cs and VSProObjectsEditor.cs scripts. They were included in build by a mistake, and won't be here in the next version. Obviously, you can use only the VSPro maps with the core package, not persistent storage objects.

    Thanks!
     
    Refeas and camta005 like this.
  31. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    I must have missed that approach for MM1. I'll give it a try.

    As for ideas, I was thinking (naively) with isolines, say you sample it at height H and get some closed splines, and do a second sample at (H - dy) and get a second set of splines. Wherever a bounding box of a spline from the first sample contains the entire bounding box of a spline from the second set, then it'd mean we have a depression in the topology that could accumulate water. Then one could generate a mesh from the containing spline and assign some water material to it or extrude it for a volume or something. I might be missing something with the logic of this of course, so excuse me if it's a stupid idea.
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    New video - a biomes module tutorial. Showing the way to mix several graphs in one scene:


    Sounds to be an over-complicated to create lakes. In most cases the square plane is enough.
     
    Lars-Steenhoff and Daniel-Talis like this.
  33. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    37
    @Wright is there one for splines coming soon? Also I just picked up Polaris v2. It would be great to integrate a low poly generator like that as an output node for MM2 at some point.
     
  34. flow-

    flow-

    Joined:
    Apr 19, 2015
    Posts:
    164
    Hey, just bought Map Magic 2, I just would like to know as we talked earlier in the Voxeland Thread about the compatibility from MM2 with Voxeland, is there an expectation when we could possibly use it together with voxeland?
     
  35. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    An announcement to all Vegetation Studio Pro and MapMagic 2 core (with no Objects module) users:

    To make the compatibility work in a version 2.0.1 you've got to manually remove VSProObjectsOut.cs and VSProObjectsEditor.cs scripts. Their presence in the MM2 core module is a bug. They are part of the Objects module. On removing them you will not loose VS Pro compatibility, and still will be able to create maps for VS Pro (but obviously, not objects). The fixed version is currently pending Asset Store review.

    Objects module users don't have to remove anything, these files are required for VS Pro objects output.

    The next one planned is devoted to functions, but the next one, after a while - yep, it will be the roads tutorial.

    Tam, the author of Polaris V2 contacted me and showed interest in integrating assets. I will provide him the documentation on creating outputs when it's ready, and will try to assist him in creating a Polaris output.

    I plan to make a big update for Voxeland when I'll finish the Splines module, and this update will bring in MM2 compatibility. But still it's just a plan, no ETA or even promise that it ever will be done.
     
  36. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    I tried Scatter -> Forest -> Stroke -> Texture, but i can't connect the Texture node, the connection line is red. Though Scatter -> Stroke -> Texture works. What is going on with the Forest node and how can i paint textures for the forest node objects?
     
  37. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    Lol you asked for a more complicated idea, you got one.
     
    goonya likes this.
  38. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    @Wright Can you please fill the microsplat docs page? I can't get the integration to work :-(
     
  39. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,264
    The shore node seems to be missing in MapMagic 2. That was really helpful for islands. How would we duplicate that functionality in MM2?
     
    dickeyms, goonya and Lars-Steenhoff like this.
  40. EnriquePage91

    EnriquePage91

    Joined:
    Jul 2, 2015
    Posts:
    67
    Hi Dennis!

    I've modified the EditorWindow script's lines 289-291 (well, not really, just added two extra lines after):

    Code (CSharp):
    1.     //right click menu (should have access to cellObjs)
    2.                 if (!UI.current.layout  &&  Event.current.type == EventType.MouseDown  && Event.current.button == 1 )
    3.                     RightClick.DrawRightClickItems(graphUI, graphUI.mousePos, graph);
    4.                 else if(!UI.current.layout  &&  Event.current.type == EventType.KeyDown  &&  Event.current.keyCode == KeyCode.Space )
    5.                     RightClick.DrawRightClickItems(graphUI, graphUI.mousePos, graph);
    many editors use the space key to display the add menu (I know for sure substance designer does, and I believe amplify does too). I'm so used to this that I've added the behaviour.

    Do you think you could sometime include the option of selecting a key to trigger this behaviour in the settings window? Not to replace the right key necessarily, but to be an additional way of calling it.

    It would be great if we didn't have to stick to simply using the right mouse, I know it's a dumb request but if you don't mind I'm sure many users that are already familiar to those softwares would appreciate it.

    It would also be nice if we could delete by right clicking the node or by pressing the delete key to delete the "active" node! but I know I'm just being picky. In all honest thanks a lot for the amazing work, I'm loving MM2 so far! Although I just started, gotta be honest... hehe.
     
    Last edited: May 1, 2020
    taylank likes this.
  41. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    Amen to that. MM2 is in dire need of some keyboard shortcuts.
     
  42. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    Here's a weird one:
    Code (CSharp):
    1. Exception: Routine error: UnityEngine.MissingReferenceException: The object of type 'ObjectsPool' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3.   at (wrapper managed-to-native) UnityEngine.Behaviour.get_isActiveAndEnabled(UnityEngine.Behaviour)
    4.   at MapMagic.Terrains.TerrainTile.SwitchLod () [0x0029c] in D:\Projects\MM2Test\MM2Test\Assets\MapMagic\Terrains\TerrainTile.cs:195
    5.   at Den.Tools.Tasks.CoroutineManager.Update () [0x000f0] in D:\Projects\MM2Test\MM2Test\Assets\MapMagic\Tools\ThreadManager\CoroutineManager.cs:136
    6. Den.Tools.Tasks.CoroutineManager.Update () (at Assets/MapMagic/Tools/ThreadManager/CoroutineManager.cs:137)
    7. MapMagic.Core.MapMagicObject.Update () (at Assets/MapMagic/Core/MapMagicObject.cs:156)
    8.  
    This happens when I just fly around the map (at high speed). Maybe MM is having difficulty catching up/cleaning up in time?

    It also looks like sometimes when a new tile is generated, it at first still has the old heights assigned to it (because of pooling?), so it produces an undesirable effect of terrain features popping in and out.
     
  43. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    Another one: I'm trying to get my own floating origin system going, so I put MM2 instance under a transform that I'm snapping around as needed as the character starts getting too far away from the origin. Looks like doing this causes MM to stop generating terrain altogether. Is the new MM2 instance not meant to be moved around at all?

    EDIT: After digging around a bit, yeah, TileManager does not take into account MapMagicObject's world position when calculating camera coords.
    Doing this fixed it for me.
    Code (CSharp):
    1. Vector3 camPos = mainCam.transform.position - WorldPos; // I update WorldPos with MapMagicObject's world position, as needed
     
    Last edited: May 1, 2020
    goonya likes this.
  44. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,777
    The connection is red when you are trying to create a dependency loop. Looks like your Forest generator depends on a Texture node - possibly via other nodes or portal so it's not obvious. If connected, it will generate infinitely, so MapMagic prevents doing this.

    Will do. What's with the microsplat demo scene (in Demo/Compatibility) - is it working?

    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.

    I've got your idea - it won't be the same implementation, but opening create menu on pressing space will be available in the next version.

    As well as the removing selected nodes on Delete.

    NP, feel free to suggest your shortcuts ideas.

    Reproduced, taking camera position in MapMagic's coordsys for the next version.

    Got it, will try to fix for the next version or version after

    This is the one I can't reproduce. From the error code I can see that you are using objects, but seems to be something else. Could you please email the graph or post it screen here. Information about the flight speed and direction might be handy too.
     
  45. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    Yep, demo scene is working. There is "Material Property Serializer" on the terrain in the demo scene which is missing from my terrain. Maybe this is my issue, how is it attached? My terrain is invisible right now, like there are no textures assigned. In my graph i replaced all texture outputs with microsplat outputs, on the terrain i set the microsplat material.
     
    Last edited: May 1, 2020
  46. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    Following up my custom node issue from MM1 thread:

    A custom node can easily be integrated with a assemly definition reference. I have this working.

    But i need to reference other packages as well, e.g. entities, mathematics, etc. Only one file of assembly def or assembly def ref is allowed in a folder. Any idea how i can achieve this without touching MM2 package?
     
  47. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    I'd suggest shift+delete for deleting a node (so you don't accidentally end up deleting a node when trying to delete characters from an input field on it).

    Ctrl+D for node duplication would be great and would be consistent with Unity's duplication shortcut. Btw, the Duplicate option on the generator menu does not work for me for some reason.

    Keyboard navigation of the menu could also be useful. Example: Space to open the menu, press 1 to enter the first submenu listed, press 2 to choose the second option and so on.

    upload_2020-5-1_9-48-48.png

    So you could go space + 1113 for noise. Or one could use letters (asdf vs 1234) instead of numbers.

    Alternatively, it'd be awesome if we could specify our own shortcuts for nodes we most frequently use.

    Below is my graph. I have the objects module installed but I don't actually have any nodes related to objects.

    upload_2020-5-1_9-41-40.png
     
    Lars-Steenhoff likes this.
  48. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    You should be setting the material on the microsplat node only. I'm also playing around with MM + MS combo, and I didn't have to go around manually assigning Material Property Serializer to the terrain objects. On your MicroSplat material, do you have the "Use Custom Splatmaps" option checked?
     
  49. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    Yep, Custom Splats are enabled in Microsplat.

    Tried this with a new and simple graph:

    upload_2020-5-1_20-59-26.png

    Result:

    Code (CSharp):
    1. Thread failed: System.IndexOutOfRangeException: Index was outside the bounds of the array.
    2.   at MapMagic.Nodes.MatrixGenerators.CustomShaderOutput200.BlendMatrices (Den.Tools.CoordRect colorsRect, Den.Tools.Matrices.Matrix[] matrices, Den.Tools.Matrices.Matrix[] biomeMasks, System.Single[] opacities, System.Int32[] channelNums) [0x001e9] in E:\MyProject\Assets\MapMagic\Generators\Matrix\Runtime\TexturesOut.cs:337
    Any idea?

    Update: I get this error if the microsplat node doesn't contain all available layers defined in microsplat. If all are defined it seems to work. Need to test with biomes though.
     
    Last edited: May 1, 2020
    EnriquePage91 and taylank like this.
  50. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    170
    Yeah I was having that too. I think Denis is aware of it.
     
unityunity