Search Unity

MapMagic 2 - infinite procedural land generator

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

  1. kgeorgia512

    kgeorgia512

    Joined:
    Nov 1, 2019
    Posts:
    12
    Does anyone know any tips for optimizing performance of creating thousands of objects using the object nodes? I see some 2-3 sec lag when generating thousands of objects. Of course an easy solution would be to reduce the amount.. but avoiding this, if any one has any tips or knows a they want to share to or some workaround I'd appreciate it!
     
    twobob likes this.
  2. TimDoesDev

    TimDoesDev

    Joined:
    Feb 23, 2018
    Posts:
    35
    I'm looking for a way to limit the infinite terrain. I want to limit it to a 10km map but still want all the benefits of the infinite procedural generation! Similar to valheim. Preferably I would also want to control what is generated at the edge of the map so that I can for example generate large mountains/cliffs or a body of water etc. To my understanding this can't be done in MM2 yet through nodes or similar, I'd really like to request this feature :)
     
  3. montyjack

    montyjack

    Joined:
    Jan 10, 2014
    Posts:
    43
    FYI I did manage to solve this issue - I had to click Reload once I set an asset image - then it stuck. No idea why, but in case someone else has the same problem, thought I'd let you know.
     
  4. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Glad you could sort that out! For me it seems to be saving without reload. Probably it's something related to Unity version. Thanks for the reloading hint, I will keep it in mind in case someone else will run into this issue!

    Do you really need terrain to disappear and let the player see the edge of the world? Wouldn't it better to let still generate terrain on the horizon, but limit player's movement with scripts or at least collision?

    In latest MM version (2.1.7) you can define the number of objects that are applied pr frame (in Objects Output, Properties, Num/Frame). This number defines how many objects are instantiated, and when this number is reach Unity will proceed to the next frame. Reducing this number will make the game more smooth, but it will take more frames (and thus time) to apply the objects.

    However even instantiating 10000 should not take several seconds. Might it be that you are calling something on objects Awake or OnEnable?

    There should not be anything other than Properties menu, but I guess this square might be confusing. I cannot see it in my project, for me it's limited to Properties tab, so could you please report it to ideainformer with mention of your Unity version and platform (win/mac/linux)?

    Note that you are using Unity Beta. Most of the issues reported from these versions are being fixed before official release. To Unity's credit, they try to maintain scripting compatibility with new versions. In this case there is a chance that it won't change to release, but I'd like to know for sure first.

    Are you trying to access it like a static variable, calling "mmObject.graph.defaults" literally? Instead of mmObject class you have to use an actual MapMagicObject component instance from Map Magic object in scene. You've got to assign it in your script, or at least use Find and GetComponent to find it.

    Public variables graph.exposed and graph.defaults are still exist (Graph.cs, 27-28), and I have no plans to remove or change them.

    Nodes have IEnumerable<IInlet<object>> Inlets and IEnumerable<IOutlet<object>> Outlets enumerables. Here you've got to define all the inlets/outlets are used in generator. Seems that you forgot to mention Height in outlets. And I recommend you iterating them in the same order the variables are declared - this will help to prevent tangling in connectors on different views.
     
    barbamix and twobob like this.
  5. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
    for the mapmagic brush are you able to plug in your current map magic graph and have it basically apply all your items in the graph to the brush? so basically you can paint your custom graph onto terrains?
     
  6. TimDoesDev

    TimDoesDev

    Joined:
    Feb 23, 2018
    Posts:
    35
    well we'll probably limit the player movement too but we wanted the option to make something special for the edge of the map similar to Valheim etc. Right now we are just exploring options. We're making a sandbox game but still want the edge to feel fairly natural rather than just block players with invisible walls. Hence spawning cliff walls or other stuff at the edge. Preferably we'd be able to define a special edge of the world biome, that'd be fantastic :)
     
  7. TimDoesDev

    TimDoesDev

    Joined:
    Feb 23, 2018
    Posts:
    35
    Also I ran into an issue with VSP vegetation Masks.

    I get this error whenever I try to use a vegetation mask
    Code (CSharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. AwesomeTechnologies.VegetationStudio.VegetationStudioManager.Instance_RemoveVegetationMask (AwesomeTechnologies.BaseMaskArea maskArea) (at Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/Manager/VegetationStudioManager_VegetationMasks.cs:53)
    4. AwesomeTechnologies.VegetationStudio.VegetationStudioManager.RemoveVegetationMask (AwesomeTechnologies.BaseMaskArea maskArea) (at Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/Manager/VegetationStudioManager_VegetationMasks.cs:20)
    5. AwesomeTechnologies.VegetationMaskArea.UpdateVegetationMask () (at Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/VegetationMasks/VegetationMaskArea.cs:79)
    6. AwesomeTechnologies.VegetationMask.PositionNodes () (at Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/VegetationMasks/VegetationMask.cs:172)
    7. AwesomeTechnologies.VegetationMask.Update () (at Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/VegetationMasks/VegetationMask.cs:113)
    8.  
    The BillboardCellQuadTree is null. The fact that we get an error is because the VSP under the VegetationStudioManager has 0,0,0 bounds which makes it never generate the BillboardCellQuadTree because there is no reason for it.

    I'm not sure how it SHOULD be handled tho in order to fetch the correct instance. Any tips?

    EDIT: I managed to fix the error by disabling the original VSP object. However my mapmagic instanced trees are not hidden when the mask is covering a tree. The only thing that get masked is the runtime spawned grass. How do I fix this?
     
    Last edited: Aug 16, 2021
  8. TreborJones

    TreborJones

    Joined:
    Feb 5, 2015
    Posts:
    18
    Hi there! Just wondering if there's any video or docs explaining how to use the brush to paint with objects? I'm having some difficulty figuring it out but I'm probably missing something obvious! Should I need to create a graph to use as a brush?
     
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    MapMagic Brush gives the ability to define the brush stroke effect with MM nodes. It reads terrain, processes it and applies back. Core MM generates terrain from scratch, without reading. This way Brush is more extended and gives more possibilities at the price of manual editing. You can make the core graph work for the brush by replacing all of it's outputs and kind of paint biomes, but you can do much more with the regular approach.

    I will appreciate if you could report it this issue on ideainformer? I will look into it next time I will be fixing compatibility issues.
    It's a special page to report both ideas and issues. Helps to keep things organized, that result in some pluses:
    - You will be able to track your issue/idea and know when it's fixed;
    - This ticket can also provide a communication channel dedicated to this issue;
    - Other users can also see if the issue/idea was reported, add some comments on it or clarify details.
    - And for me it's way more convenient to track issues in tickets, and discuss them per-ticket rather than use email or forum.

    If you have a graph and a scene with the reproducible issue it would be great if you could link them in issue description. I will need a scene, a graph, sub-graphs if you are using biomes, and their meta-files. There's no need to send models or other assets. I will appreciate if you don't compile the unity package with the dependencies.

    Painting with the objects or trees done exactly the same way it works for height or textures. Yes, you will need a special graph to do that - you can take MapMagic/Brush/Graphs/ForestObjects as an example.

    But that thing that you might be missing - you need an Objects module to operate on objects.
     
  10. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I would like to request a "Un-straighten" or maybe "bendify" for splines.

    A setting of 0 would result in the straight spline it was sent. A setting of 1 would make it "very wiggly" (length allowing)

    upload_2021-8-18_13-11-51.png

    It's pretty much the "straighten" from path-finding but for ordinary splines?

    did have a look what you do in there. an iterative off-stepping creating additional nodes would be fine I think? And Yes I probably will just write one for now but seems like people would want this. if there is some way to achieve this with the extant toolage - I didn't find it yet

    I t would be helpful to make shapes that are "inorganically straight" be more "flowy" upload_2021-8-19_11-39-2.png
     
    Last edited: Aug 19, 2021
    MaximilianPs likes this.
  11. TimDoesDev

    TimDoesDev

    Joined:
    Feb 23, 2018
    Posts:
    35
    I reported the VSP issue. I have another issue tho with VSP and MM2.

    My mapmagic instanced trees are not hidden when using a vegetation mask to hide trees. The only thing that get masked is the runtime spawned grass. How do I fix this?
     
  12. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    This spline bending - what algorithm it will be based on? Will it bend the spline using random/noise patterns?
    Pathfinding actually does the same trying to align spline along the best possible way from start to end.

    MM uses persistent storage to place trees - this is the only way to output exact coordinates, not masks maps. As far as I know VSP does not apply it's own rules to persistent storage - at least I don't know the way to enable that. This limitation comes from VSP design. The only way to bypass it I see is to output trees using maps, the same way it's done with the grass.
     
  13. zero1024

    zero1024

    Joined:
    Oct 10, 2018
    Posts:
    11
    As I clearly explained in my last post, this line of code:
    Code (CSharp):
    1. Debug.Log(mapMagicObject.graph.exposed.entries[0].guiName);
    is actually printing the name of the Exposed Seed value from the Noise node.



    This tells us 2 things:
    1) that yes I'm actually referencing my scene's MapMagicObject to the script
    2) that the value is indeed properly exposed

    The problem, is that since "mapMagicObject.graph.defaults" doesn't exists (only "mapMagicObject.graph.exposed" exists) I can't access, read or write the value via script.

    Here are 2 screenshots of my script, showing the problem:



    Thank you for your help.

    EDIT: After updating MapMagic and all 4 Modules to the latest available version (v2.1.7) released in Aug 10, 2021 the problem has been fixed and "default" now exists within "mapMagicObject.graph". Thank you for your time. (It does throw an error with "exposed.entries" now however, but it not a problem obviously)
     
    Last edited: Aug 21, 2021
    twobob likes this.
  14. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    What about some sort of cost-based "distance from ideal" and an exploratory vector cast that pays this price (or some percentage of it) on the next step as an inverse of any vector away from mean. That feels like it would give an /n/ step from mean based on basic coin-flipping (some value most likely greater than 0-10 and below 350-350 as the vector angle, some distance) and a weighted cost. (Any angle causing non-forward movement should be penalised further - most likely - if we wish to one day actually reach the end)

    Sound about right? I have no idea if that has a name. The: "Go There and be wiggly like in my brain" algo. Little known.

    noise with some weighting to always tends back to 0.5 serves an identical purpose, albeit with most likely alternate wiggliness so... noise also fine.

    I guess https://graphics.pixar.com/library/WigglySplinesA/paper.pdf constrained to 2d would be fun ;)
     
    Last edited: Aug 22, 2021
  15. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
    do you know why i might be getting this error when i push refresh on my map magic graph? if i keep pushing refresh eventually my graph makes the map, but this error stops creation of the map momentarily

    upload_2021-8-22_11-32-24.png
     
  16. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Just wanted to ask what version are you using - but glad you could find it out yourself.

    Thanks for the link! Couldn't get the idea from description, but I will look into Wiggly Splines to find out if it could be used!

    Could you please report the steps to reproduce to ideainformer? Under refresh - do you mean re-generate button? What is the time delta of clicking it?
     
  17. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
     
  18. cowj

    cowj

    Joined:
    Mar 10, 2019
    Posts:
    17
    The directTextureOutputNode doesn't aligin with terrain if margin setting big, the terrain is in the middle of tiled,but the tex is offset
    upload_2021-8-23_10-5-59.png
     
    twobob likes this.
  19. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    No worries, that is a complex spring solution with dashes of DSP logic. I would be happy with just a randomised path like you have in Pathfinding and just insert it's own nodes rather than having to have some to operate over. BUT if you are gonna add something as awesome as the /actual/ Wiggly spline but in terrain space then I salute you sir
     
  20. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    upload_2021-8-23_17-7-10.png
    Line 686 if you need to fudge it for now. (since any update will over-write this change with a fix anyway... meh. it's what I do) - Obviously it is not best practice to adjust upstream files (there I said it)
     
  21. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    I will see what I can do. Want to make something awesome myself, but it's splines, so can't promise make it fast.

    I guess I know what it might be related with, if I'm right will fix it for the next version. Thanks for reporting!
     
  22. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    Any Idea why Blending now works on this weird way? o_O
    Multiply works even worst, remove the roads and paint just the texture under the town.
    upload_2021-8-25_11-44-10.png
    upload_2021-8-25_11-41-23.png
     
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    As far as I can see you need to add bright values from one mask to another - so Add is the right blending for this.

    Multiply is usually used when you want to combine dark places from both maps - when you have two white maps with some dark areas masked, and want to have a map with both of areas as an output.

    However it seems to be subtracting values - this might happen if one of the maps contains negative values. I've looked into the spline node - it clamps values withing 0-1 range. But objects node doesn't, here in a file attached I made it to saturate values before output - it's worth trying if it will fix the issue.
     

    Attached Files:

    twobob and MaximilianPs like this.
  24. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    The topmost (or indeed any) layer of a Biome stack does not seem to respect "flatten" in a way people might expect.

    It makes "flattening" either impossible or impractical depending on your workflow for adding "top layer" points of interest

    Perhaps I am not setting up my workflow right.
    Anyone solved this?
     
  25. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    I've updated ObjectModifier but I guess we still have some issue here...



    Just to be clear, I've merged all non-grass texture to mask it, 'cause it was spawning grass unexpectedly, so after the blend, I've used it as Mask, but looks like that the blend still making strange things with alpha or texture channels, anyway you can see the result.

    upload_2021-8-28_17-41-42.png
     
    Last edited: Aug 28, 2021
  26. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    @Wright also, I absolutely need to track all points that compose the spline, 'cause i need to drive my NPCs on the road.

    I guess that everyone that have purchased spline still on the same situation.
    ... I can wait, but I didn't have all the time of the world, not to make pressure... but you know.. ;)
     
  27. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Using selector causes "waffle pattern" in the resulting output

    upload_2021-8-31_9-44-43.png

    upload_2021-8-31_10-29-36.png
     
    Last edited: Aug 31, 2021
    MaximilianPs likes this.
  28. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Could you please clarify what issue have you run into? Is it related with Flatten node (why the only node then, biomes are blended together being completely generated)?

    It's hard to say what went wrong without seeing a graph. Could you please report it on ideainformer and attach/link a screenshot of the graph here, the graph asset itself, or both (preferable)?

    Are you talking about the node that places objects along the spline?

    Are you sure it's not caused by a map provided to Selector itself? Selector just does basic per-pixel operations, and does it the same way to all the pixels in a map, it does not work with some complex sampling like the Blur node or Cavity.
     
  29. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    If you try to use flatten in a biome it does not flatten the underlying layers data. So not very "Flatteny" and certainly doesn't work how anyone might expect.


    The other thing is just noise into a selector. Just that. Noise -> Selector. There are 400 other nodes. But that node is the VERY FIRST node. ¯\_(ツ)_/¯

    I'll eventually make some simple repro cases then. I have worked around the first issue. The second I can't find a fix
     
  30. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
  31. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    yes (I guess)...or maybe you could make a "Generator" that allows us to set a GameObeject along the entire length of the Spline, and with a parameter to set the distance between each object (Off-Set)
    Don't tell me to post it as suggestion in the ideaformer 'cause it should be present by default with spline :rolleyes:
     
  32. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058

    Attached Files:

    MaximilianPs and Wright like this.
  33. gozdagb

    gozdagb

    Joined:
    Feb 23, 2014
    Posts:
    71
    Where i can find the splatmap of a specific chunk? I want to make footsteps, but theres no layers on terrain component. I am using MicroSplat
     
  34. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    You mean the Flatten node from one of biomes does not flatten land in the other biomes? It is intentionally, since no node should affect other biomes. Using Function instead of biomes can give you more control, you can adjust the heightmap separately - but the graph could be quite complicated if you switch it all to Functions.

    Oookay, Noise -> Selector. What node is the first, what do you mean by first, and why is it so bad?

    If you mean just spawning objects along the spline it's better to convert spline positions to objects and output them the way you want using objects output - a solution that is already available for this purpose.

    But if it's bending along the spline - it's way more complicated thing, probably it should go with other assets like twobob suggested.

    Splines are mainly a trial balloon, I don't know what should be the default unless I see how most of users use them. Ideainformer is very convenient platform for me to get feedback - it is way more organized than forums, emails or chats. But it's okay, np, forums will go as well.

    MicroSplat can work without terrain layers by using it's material control textures. So splatmaps are not applied by default by MicroSplat output - it saves apply performance and memory. But you can force MM to create layers along with MS control textures by switching MS Output Apply Type to Both (in Advanced tab).
     
  35. gozdagb

    gozdagb

    Joined:
    Feb 23, 2014
    Posts:
    71
    @Wright
    thanks,
    just selecting on both, doesn't work, throws "Thread failed: System.IndexOutOfRangeException: Index was outside the bounds of the array."
    But I was able to throw layers onto the terrain component anyway, just adding a "textures" node and pinning outputs from microsplat. It is probably not best performance, but it works.
    If selecting both is better and I just do something wrong and someone tells me what, it will change to both

    Thanks
     
  36. TreborJones

    TreborJones

    Joined:
    Feb 5, 2015
    Posts:
    18
    Hi, sorry, bit of a basic question but I've not found the information anywhere.

    At the moment I can paint on top of a terrain generated with a graph, but as soon as I adjust anything on the original graph the painted changes are overwritten. How do I combine the painted changes and original graph?
     
  37. Deleted User

    Deleted User

    Guest

    Hi, any idea when there will be support for Apple Sillicon ?

    Code (CSharp):
    1. Thread failed: System.DllNotFoundException: NativePlugins assembly:<unknown assembly> type:<unknown type> member:(null)
    2.   at (wrapper managed-to-native) MapMagic.Nodes.MatrixGenerators.Noise200.GeneratorNoise200(Den.Tools.Matrices.Matrix,Den.Tools.Noise,MapMagic.Products.StopToken,int,single,single,single,single,single,single,single,single,single,single)
    3.   at MapMagic.Nodes.MatrixGenerators.Noise200.Generate (MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x0005c] in /Users/xxx/Unity/Crest/Assets/MapMagic/Generators/Matrix/Runtime/MatrixInitial.cs:54
    4.   at MapMagic.Nodes.Graph.GenerateRecursive (MapMagic.Nodes.Generator gen, MapMagic.Products.TileData data, MapMagic.Expose.Override ovd, MapMagic.Products.StopToken stop) [0x001ed] in /Users/xxx/Unity/Crest/Assets/MapMagic/Nodes/Graph.cs:917
    5.   at MapMagic.Nodes.Graph.GenerateRecursive (MapMagic.Nodes.Generator gen, MapMagic.Products.TileData data, MapMagic.Expose.Override ovd, MapMagic.Products.StopToken stop) [0x0007b] in /Users/xxx/Unity/Crest/Assets/MapMagic/Nodes/Graph.cs:877
    6.   at MapMagic.Nodes.Graph.GenerateRecursive (MapMagic.Nodes.Generator gen, MapMagic.Products.TileData data, MapMagic.Expose.Override ovd, MapMagic.Products.StopToken stop) [0x00037] in /Users/xxx/Unity/Crest/Assets/MapMagic/Nodes/Graph.cs:870
    7.   at MapMagic.Nodes.Graph.Generate (MapMagic.Products.TileData data, MapMagic.Products.StopToken stop, MapMagic.Expose.Override ovd) [0x00039] in /Users/xxx/Unity/Crest/Assets/MapMagic/Nodes/Graph.cs:856
    8.   at MapMagic.Terrains.TerrainTile.Generate (MapMagic.Nodes.Graph graph, MapMagic.Terrains.TerrainTile tile, MapMagic.Terrains.TerrainTile+DetailLevel det, MapMagic.Products.StopToken stop) [0x0004b] in /Users/xxx/Unity/Crest/Assets/MapMagic/Terrains/TerrainTile.cs:716
    9.   at MapMagic.Terrains.TerrainTile+<>c__DisplayClass48_0.<EnqueueTask>b__0 () [0x00000] in /Users/xxx/Unity/Crest/Assets/MapMagic/Terrains/TerrainTile.cs:624
    10.   at Den.Tools.Tasks.ThreadManager.TaskThreadAction (Den.Tools.Tasks.ThreadManager+Task task) [0x00000] in /Users/xxx/Unity/Crest/Assets/MapMagic/Tools/ThreadManager/ThreadManager.cs:138
    11. UnityEngine.Debug:LogError (object)
    12. Den.Tools.Tasks.ThreadManager:TaskThreadAction (Den.Tools.Tasks.ThreadManager/Task) (at Assets/MapMagic/Tools/ThreadManager/ThreadManager.cs:141)
    13. System.Threading.ThreadHelper:ThreadStart ()
    14.  
     
    Last edited by a moderator: Sep 4, 2021
    lorddesu likes this.
  38. Susihiisi

    Susihiisi

    Joined:
    Jan 11, 2018
    Posts:
    32
    Hi. I have problems with MapMagic Brush. Unity version is 2020.3.15f2 and I'm using HDRP. I did install Map Magic 2 first and then Brush afterwards. No other extensions for MM2. When I add MapMagic Brush to terrain and press draw, it works if I haven't selected any preset. After selecting preset and trying to draw it gives error:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. MapMagic.Nodes.Graph+<GeneratorsOfType>d__48`1[T].MoveNext () (at Assets/MapMagic/Nodes/Graph.cs:525)
    3. MapMagic.Brush.MapMagicBrush+<BrushReadsOrdered>d__39.MoveNext () (at Assets/MapMagic/Brush/Core/MapMagicBrush.cs:220)
    4. MapMagic.Brush.MapMagicBrush.Apply (UnityEngine.Vector3 pos, System.Boolean isFirst) (at Assets/MapMagic/Brush/Core/MapMagicBrush.cs:190)
    5. MapMagic.Brush.Trace.Start (UnityEngine.Vector3 pos, System.Action`2[T1,T2] stampFn, MapMagic.Brush.MapMagicBrush brush) (at Assets/MapMagic/Brush/Core/Trace.cs:57)
    6. MapMagic.Brush.BrushInspector.DrawBrush (MapMagic.Brush.MapMagicBrush brush) (at Assets/MapMagic/Brush/Editor/BrushDraw.cs:101)
    7. MapMagic.Brush.BrushInspector.OnSceneGUI () (at Assets/MapMagic/Brush/Editor/BrushDraw.cs:42)
    8. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    9. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    10. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    11. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    12. UnityEditor.SceneView.CallOnSceneGUI () (at <44c3723143904fb88deebc993c7bb491>:0)
    13. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <44c3723143904fb88deebc993c7bb491>:0)
    14. UnityEditor.SceneView.OnGUI () (at <44c3723143904fb88deebc993c7bb491>:0)
    15. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <44c3723143904fb88deebc993c7bb491>:0)
    16. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <44c3723143904fb88deebc993c7bb491>:0)
    17. UnityEditor.DockArea.OldOnGUI () (at <44c3723143904fb88deebc993c7bb491>:0)
    18. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    19. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    20. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    21. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    22. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    23. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    24. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    25. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    26. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    27. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    28. UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    29. UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    30. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    31. UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    32. UnityEngine.UIElements.EventDispatcher.OpenGate () (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    33. UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    34. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    35. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    36. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    37. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    38. UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    39. UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    40. UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <270875aa25744a3b8d4f4ee5dc922b56>:0)
    41. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <6ddf8eac3856492ab1b8cf42618915cc>:0)
    42.  
    Selecting a graph in folder gives the following error:
    Code (CSharp):
    1. Exception: Could not load graph data:
    2. System.FormatException: Input string was not in a correct format.
    3.   at System.Number.ParseSingle (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00083] in <695d1cc93cca45069c528c15c9fdd749>:0
    4.   at System.Single.Parse (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
    5.   at System.Single.Parse (System.String s) [0x0000b] in <695d1cc93cca45069c528c15c9fdd749>:0
    6.   at Den.Tools.Serialization.Serializer.DeserializeRecursive (System.Object[] splitString, System.Collections.Generic.Dictionary`2[TKey,TValue] deserializedIdsObjs, System.Collections.Generic.IList`1[T] unityObjs) [0x000b7] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer\Deserialize.cs:55
    7.   at Den.Tools.Serialization.Serializer.DeserializeRecursive (System.Object[] splitString, System.Collections.Generic.Dictionary`2[TKey,TValue] deserializedIdsObjs, System.Collections.Generic.IList`1[T] unityObjs) [0x003c5] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer\Deserialize.cs:183
    8.   at Den.Tools.Serialization.Serializer.DeserializeRecursive (System.Object[] splitString, System.Collections.Generic.Dictionary`2[TKey,TValue] deserializedIdsObjs, System.Collections.Generic.IList`1[T] unityObjs) [0x003c5] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer\Deserialize.cs:183
    9.   at Den.Tools.Serialization.Serializer.DeserializeRecursive (System.Object[] splitString, System.Collections.Generic.Dictionary`2[TKey,TValue] deserializedIdsObjs, System.Collections.Generic.IList`1[T] unityObjs) [0x00369] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer\Deserialize.cs:157
    10.   at Den.Tools.Serialization.Serializer.DeserializeRecursive (System.Object[] splitString, System.Collections.Generic.Dictionary`2[TKey,TValue] deserializedIdsObjs, System.Collections.Generic.IList`1[T] unityObjs) [0x003c5] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer\Deserialize.cs:183
    11.   at Den.Tools.Serialization.Serializer.DeserializeRecursive (System.Object[] splitString, System.Collections.Generic.Dictionary`2[TKey,TValue] deserializedIdsObjs, System.Collections.Generic.IList`1[T] unityObjs) [0x003c5] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer\Deserialize.cs:183
    12.   at Den.Tools.Serialization.Serializer.Deserialize (System.String str, System.Collections.Generic.IList`1[T] unityObjs) [0x00029] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer\Deserialize.cs:19
    13.   at MapMagic.Expose.Override.OnAfterDeserialize () [0x00010] in E:\U\CattoCat\Assets\MapMagic\Expose\Override.cs:250
    14.   at Den.Tools.Serializer.DeserializeObject (System.Int32 refId, Den.Tools.Serializer+Object[] serialized, System.Object[] deserialized, System.Object[] reuse, System.Action`1[T] onBeforeDeserialize) [0x004f4] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer.cs:641
    15.   at Den.Tools.Serializer.DeserializeObject (System.Int32 refId, Den.Tools.Serializer+Object[] serialized, System.Object[] deserialized, System.Object[] reuse, System.Action`1[T] onBeforeDeserialize) [0x0046b] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer.cs:633
    16.   at Den.Tools.Serializer.Deserialize (Den.Tools.Serializer+Object[] serialized, System.Action`1[T] onBeforeDeserialize) [0x0000f] in E:\U\CattoCat\Assets\MapMagic\Tools\Serializer.cs:191
    17.   at MapMagic.Nodes.GraphSerializer200Beta.Deserialize (MapMagic.Nodes.Graph graph) [0x0000b] in E:\U\CattoCat\Assets\MapMagic\Nodes\GraphSerializer.cs:60
    18.   at MapMagic.Nodes.Graph.OnAfterDeserialize () [0x00008] in E:\U\CattoCat\Assets\MapMagic\Nodes\Graph.cs:1156
    19. MapMagic.Nodes.Graph.OnAfterDeserialize () (at Assets/MapMagic/Nodes/Graph.cs:1165)
    20. MapMagic.Nodes.Graph.OnBeforeSerialize () (at Assets/MapMagic/Nodes/Graph.cs:1142)
    21. UnityEditor.HostView:OnInspectorUpdate()
    22.  
     
    twobob likes this.
  39. tomobiki

    tomobiki

    Joined:
    Sep 27, 2020
    Posts:
    65
    I've a question about the Voronoi generators. I saw a tutorial of yours about the previous version of Map Magic where three different Voronoi generators were applied in cascade to an imported height map, and the result was astounding. But I've seen that in Map Magic 2 the Voronoi generators haven't the input connector anymore. I tried to simulate it with a blend modifier, but of course the result is very poor (of course) compared to the one in your video. Is there a way to create a series of Voronoi generators with the new Map Magic 2? Thanks!
     
    twobob likes this.
  40. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Well, actually MM1 used additive (for Input) and multiplicative (for mask) blending, the same as the blend node does. It was the main reason it brought in a separate node - to avoid duplicating functionality. There should be no difference between connecting several Voronoi generators one after another or using Blend node, but may I ask why you consider the result as poor? Maybe you could make a screenshot with some description of what is not as expected?

    On some platforms native code is not supported - try disabling it in MM by turning off C++ Native Code in Window - MapMagic - Settings.

    MM does not perform terrain readings - it just generates terrain based on the graph, not already existing terrains. This way it cannot determine changes and distinguish them from previously generated terrain.

    Glad you could solve the problem with the Textures output, but I will appreciate if you could report this issue on ideainformer just to keep track of it.
     
  41. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    So like. can we have one where that is NOT intentional. Right?
    A top layer that simply affects all the bottom ones. you could call it "BIOME WITH USEFUL TOP LAYER" or something.
    Because using the current one for a real game is super difficult in a generated workflow, sure it's fine for people who want fixed worlds. But not ideal for the other. Can confirm that many people were surprised it didn't work that way. I was among them.

    Oookay, Noise -> Selector. What node is the first, what do you mean by first, and why is it so bad?

    It's a noise first. Then a selector - then all the other things. The weird "grid" ends up making it to the heightmap. I currently blur to hide it.

     
  42. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    @Wright "what do you mean by first"

    upload_2021-9-5_23-11-2.png
    the graph travels Left to Right. the noise is LITERALLY the first node. and the selectors are the second.

    I say this so it is VERY obvious that it is not caused by anything "before" the noise. There is nothing.

    FWIW. A "biome mixer WITH flatten for 4 biomes" is what that graph is. Would DEARLY LOVE a scripted replacement and I know a lot of others would.
     
  43. tomobiki

    tomobiki

    Joined:
    Sep 27, 2020
    Posts:
    65
    Thanks, ok so the right way is to use the Blend modifier: it seems to me that I have to use always the Add methond when blending (if I understood correctly your answer). So probably it's just me that have to understand better how the Voronoi generators work; probably this is the cause of the poor output I got. I'll make more tirres and I'll post the results.
    Thanks!
     
  44. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058

    Hi. Might I ask you post your Globalization (like are you in Japan?). Perhaps There is some issue if the language has a , where a . was expected. It's best that @Wright know
     
  45. Susihiisi

    Susihiisi

    Joined:
    Jan 11, 2018
    Posts:
    32
    I'm in Finland. We do use , instead of . with decimals. Windows is in Finnish, but Unity and Visual Studio is in English. Haven't caused problems with anything before so I don't quite think that would be it.

    Edit:1 I bought Splines and Objects and those works fine. The Brush is still not working.

    Edit2: Also, is there easy way to convert trees that comes with Objects to HDRP. The automated thing doesn't seem to do that. I can of course change them for something else so not a big thing.
     
    Last edited: Sep 6, 2021
  46. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
    still constantly having these errors upload_2021-9-6_19-16-5.png
     
  47. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
    i had posted this before but no response
     
    twobob likes this.
  48. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
    now im getting these anomalies when im trying to blend the biome graphs (I have made sure that the contrast is not too high); most of the map works fine, but there are some areas on the map that no matter what the mapmagic graph seed it seems to make these giant walls in the same spot
    upload_2021-9-6_19-20-8.png
     
    Last edited: Sep 7, 2021
    twobob likes this.
  49. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Try looking into functions workflow. It has way more possibilities than the usual biomes, so if you want something advanced - functions is the way to go. They work like a biome, but they have inputs and outputs as well - think of like of a portal that can go inside a sub-graph. This way you can output the height generated by each of the biomes, and blend it any way you like with the Blend and Normalize nodes. Here you define the rules biomes are applied, and you can apply some biome as a postprocessing-flatten one.

    Sure, I will keep that idea in mind! But I really recommend mention this on ideainformer. That is what it for. When I plan my work I'm trying to take tickets based on their popularity (if it's possible - I remember about RAM:)). It is the way for me literally to see these lots of others.

    Yes, actually that is what Voronoi node did in MM1. The analogue of Input connection is Blend in add mode, and the analogue of Mask connection is Blend in multiply mode.

    By chance me too now :)

    I've never encountered this issue, seems to be something wrong with the graph rather with locale. What graph are you trying to load? Are there any issues with the tutorial graphs from Objects or Splines?

    Demo trees are using shader that was written specially for them. Unity just don't know analogues. If you apply the standard material with alpha test and try to convert them then it should work.

    According to an error something went wrong with portals. I will need a graph to look into it. I'll appreciate if you could report it on ideainformer and link the graph here.

    I guess I will need a graph for the second issue as well, and it would be great if you could report it too.
    It's a special page to report both ideas and issues. Helps to keep things organized, that result in some pluses:
    - You will be able to track your issue/idea and know when it's fixed;
    - This ticket can also provide a communication channel dedicated to this issue;
    - Other users can also see if the issue/idea was reported, add some comments on it or clarify details.
    - And for me it's way more convenient to track issues in tickets, and discuss them per-ticket rather than use email or forum
    If you have a graph and a scene with the reproducible issue it would be great if you could link them in issue description. I will need a scene, a graph, sub-graphs if you are using biomes, and their meta-files. There's no need to send models or other assets. I will appreciate if you don't compile the unity package with the dependencies.
     
  50. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058

    There are lots of functions in the screenshots I have shown. It takes a large amount as far as I can see to properly do what you suggest and also mix the textures (which seems to not work properly on the MicroSplat workflow)

    If you know of some "very simple 5 minutes to make example" that can do the same job please include it in the demos.

    It is something that many people have indicated on Discord that they would desire. And indeed. Who wouldn't want that? It's the most obvious workflow when you use the tool for an actual game, not just making landscapes.

    In terms of "doing things that people really want"
    Support multiple VSPro biomes/vegetation packages
    is another very obvious choice, This seem like complete no-brainer if there is supposedly "VsPro" support. we hacked in some - probably intrinsically incorrect - workaround to get some basic Biome support:


    upload_2021-9-8_3-26-33.png
    (Multiple biomes in mapmagic) shown 'working' here

    I have zero idea of the implications (and this would not support the mask rules) but FWIW I did it like this, honestly assuming this "works as expected" this meets our needs, however mask rule support would be a nice to have
    upload_2021-9-8_4-10-30.png
     
    Last edited: Sep 8, 2021