Search Unity

MapMagic 2 - infinite procedural land generator

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

  1. jimmygladfelter

    jimmygladfelter

    Joined:
    May 3, 2020
    Posts:
    83
    Also in 2.0.7, it seems I cannot delete any blend layers anymore by dragging up:
    upload_2020-9-13_21-42-26.png

    Thats probably a bad example above as it has just one layer but it doesn't work with multiple layers either :)
     
    Last edited: Sep 14, 2020
    Nunez-Torrijos and RagingJacob like this.
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Here's what I've found reading Jason's code near the error line:
    Code (CSharp):
    1.       // Until such time that unity fixes this.. Don't hold your breath..
    2.  
    3.       if (terrain.drawInstanced == true && keywordSO.IsKeywordEnabled("_TESSDISTANCE") && keywordSO.IsKeywordEnabled("_MSRENDERLOOP_SURFACESHADER"))
    4.       {
    5.          Debug.LogWarning("Disabling terrain instancing when tessellation is enabled, as Unity has not made surface shader tessellation compatible with terrain instancing");
    6.          terrain.drawInstanced = false;
    7.       }
    Unity has an issue related with terrain instancing. So I guess it might be worth trying to disable it in MM object's Terrain Properties.

    Something odd is happening with MM on Linux. All of these issues I'm not aware of, and wonder why nobody reported them in a half of a year. I can't test Linux version now, but if you could reproduce any of them on Windows or Mac - please report to idea.informer.

    The strangest thing is that the MM code doesn't differ on Linux version - and Windows one seems to be working okay (unless I've missed all of these bugs). So I will really appreciate if you could report them on Windows version.

    Could you please email me the graph with the functions (and their meta files), and the scene where they are used? Just tried reproducing without functions - everything seems to be properly welded.

    Thanks for reporting this! I've already fixed it - and the fixed version is currently at the Asset Store. Yep, it was updated an hour ago :)
     
  3. jvetulani

    jvetulani

    Joined:
    Dec 20, 2016
    Posts:
    55
    I'll try and turn that off, thanks.

    I ran Unity in Windows in VMware on the same machine and MM works as advertised, can't reproduce the same problems I'm getting on Linux. I can install Ubuntu in a VM and see if I can reproduce the same issues.

    All the steps to reproduce (I tried with empty projects on a couple versions of Unity including 2020) it needs is to start a new project - either using legacy or URP, import MM2, and try it.

    EDIT:
    Well this is unexpected... Running Map Magic 2 in the latest Unity LTS, on Ubuntu 18.04 in a VM, and it works just fine... Pinning works, everything seems to be in order. Only thing that doesn't work at first glance is inputting values into nodes, can only drag them around - like in the other version not in a VM.

    The VM uses OpenGL 3.3, maybe that's the issue? Kinda baffled by this actually...

    EDIT2:
    Removed everything pertaining to unity in /home/user/.config also in home/.local/share
    Removed the UntiyHub.appimage and downloaded a newer one and it worked till I opened an old project....

    aaaaaand I'm an Idiot... it's the GIZMOS button, in the editor view... When it's off the MapMagic editor doesn't come up - and yeah, having Native Code throws out a bunch of errors and doesn't allow the terrains to generate.

    What are the downsides to Native Code being off? Or Instancing?

    EDIT3:
    Infinite terrain without mnicrosplat works fine, with microsplat not so much, disabling Instancing does nothing in the build throws the same errors as before.

    Not using Infinite Terrain and just pinning more terrains works fine with Instancing Enabled.
     
    Last edited: Sep 15, 2020
  4. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
    Hello Denis,

    I'm trying to place locks again on pinned terrain (non-draft) and unfortunately it is still not working.


    upload_2020-9-14_18-37-17.png

    I'm using 4 graph to do this, is it possible that this is the cause of the problem?
    I use one graph to create the landscape of the terrain, and then the 2 biomes refer to that first graph and create an offset of it. I can send you the graph if you want



    Second problem that I have is that it seems that I can't paint any texture manually using Microsplat, do you have any solution I could use?
    Thank you again!
     
    RagingJacob likes this.
  5. Bingobuzzard

    Bingobuzzard

    Joined:
    Feb 5, 2017
    Posts:
    9
    Hi,
    So far I love Map Magic 2, but, I just can get these seams under control: MM_Seams_Margins.jpg

    I've tried different margin settings ranging from 2 all the way to 512, and, while different numbers have different effects on the seam, large artifacts remain as you can see here. I'm using MM2 version 2.07 and Unity version 2019.4.9f1.

    Thanks,
    Bingobuzzard
     
  6. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    191
    • Spline Strokes have a Height Input instead of a Spline Input
    • Flatten nodes do not work across terrain tiles and create sharp edges there.
    • The Object Random node does not seem to be influenced by the input mask and spawns objects everywhere.
     
    Nunez-Torrijos likes this.
  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    With any new version I receive a bunch of emails describing the problems caused by compatibility issues of newer module and outdated core (or vice versa). I admit that it's really hard to keep in mind to updated all modules - especially when there's 3 of them - and additionally a core.

    I see two ways to help receiving this problem, and going to go both of them:
    - Each module will be shipped with the core version included. Bigger amount to download, but will help to resolve outdated core / newer module bug (will not help with newer core / outdated module unfortunately).
    - Release a special MM2 version with core and all 3 modules included. All the MapMagic stuff will be consolidated in one asset - easier to download and easier to update.

    So' I'd like to introduce you the fresh asset (but nothing new, actually :) ):
    Complete_Cover.jpg

    Asset Store link.

    The Bundle also brings clarity to correlation with MapMagic World Generator: this is the next iteration of MapMagic: it can do everything MMWG can, even more, even faster - except Voxeland nodes.

    Single module owners should get a discount on this at the Asset Store. Three model owners that want to change them for Bundle - please contact me.

    I should have thought about it too, when you described the symptoms. Got to add it to FAQ or something.

    When native code is off generate time is significantly increased - especially in editor.
    Instancing allows you to save draw calls, increasing FPS. It's the Unity thing, not MapMagic.

    Is it only the Linux issue? Could you please try the same on Win?

    Oddly enough. Locking should not be related with biomes or functions. Could you please email me your scene and graphs using in it (along with their meta files) so I could look into it?

    Could you please email me the graph with the scene (and their meta files)? I've already got report about it, but this will still help me to reproduce it. Is this seam occur any time time here, or there are some particular steps needed to make it appear?

    Thanks for reporting this. I've fixed improper inputs/outputs for spline nodes for the next version. However can't promise flatten node fix soon - it might take some time. Sorry for that, but splines are still under development.

    Got it, added to my to-do list!
     
    Last edited: Sep 15, 2020
    Nunez-Torrijos, protopop and mick129 like this.
  8. PiterQ70

    PiterQ70

    Joined:
    Mar 3, 2015
    Posts:
    82
    Last edited: Sep 16, 2020
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Thanks everyone for sending me the feedback and graphs/projects with the seam issue. I've looked into them and guess I could get the root of the problem.

    Above all I'll mention the way MM works. It generates all of the tiles independently - no tile can access any data from the other tile. When generating no tile can get the results of the neighbor ready tiles. Otherwise the generate result will differ depending on which tiles are ready - i.e. from what side the player will approach tile. And obviously, there is no way to get the result from non-generated tiles other than to force generating them, and they will force generating others, and so on.

    When a tile has an object within 100 units from the edge of the tile and Stamp/Flatten/Stroke node with radius of 200 it will be partially beyond the borders of the tile. The neighbor tile has no information about this object (as long as margin value is 16 pixels, or 32.8 units with resolution 513). So new tile is generating without this flatten stamp, that will occur seam between tiles.

    The same happens with Blur, or other nodes that operate with neighbor pixels. The more the blur value (iterations) - the further it tries to virtually 'look up'. When it exceeds the tile margins - it can't get pixels from the other tile. Using downscale value drastically exacerbate it: each step lowers the resolution twice. For example downscale of 5 will make blur operate on 32 instead 512, so it will exceed margins in first iteration.

    For the Blur case my recommendation is to keep blur/downscale values as low as possible. In cases where the Blur node operates on the results of the Noise node - I highly recommend using only the Noise with lower Detail value instead. I also recommend avoid blurring the map from the Import node - especially with high downscale/blur values. It's better to use preliminary blurred RAW/texture map instead. These recommendations are not only for the seams issue, but for performance reasons - even more so.

    Still I've got to thank everyone for notifying me about this problem. I will add some GUI stuff in Stamp/Flatten/Stroke nodes that will calculate maximum safe distance depending on current resolution and margin value and draw a warning if the radius exceeds it. And the same with the Blur node - I will add a GUI calculator that will calculate if it's safe with current margins, downscale and blur values, and draw a warning if it isn't so.

    The next thing I'm going to do is to try adding a custom margin value to Scatter node so that it could create objects on neighbor tiles with minimum performance loss. This will help to make the stamps of any size as long as the Stamp/Scatter/Flatten node connected directly to Scatter. Or return Safe Borders objects node if it's not possible.

    TL;DR: some graph setup can cause seam issue by tile independence design. I will add warnings to the nodes that have a setup that can theoretically cause them. But in any case try keeping blur/downscale and radius values as low as possible.
     
    Last edited: Sep 16, 2020
    Nunez-Torrijos and protopop like this.
  10. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    @Wright how do you save the terrain data in MM2? In MM1 there was a save option next to pin and lock, but I'm not seeing that in MM2.
     
    BlackManatee likes this.
  11. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    191
    upload_2020-9-17_17-59-30.png

    Now the spline interlink node has wrong ports, input and output are object ports. Same MapMagic version, same unity version only new blank project. Maybe the import order of the modules plays a role.

    After I completely removed MapMagic2 and re-imported it, the interlink node is working again but the stroke node is damaged again.

    Edit:
    As mentioned in my Assetstore Review there are other nodes that do not work (not only MapMagic Splines, which is still in beta).

    Also the Normalize node does not work. A click on the plus symbol causes the node to be destroyed.
    upload_2020-9-18_0-10-31.png

    Also the Object Random Node does not work properly. The Input mask has no functionality and no effect on the spawns.
    upload_2020-9-18_0-12-24.png
     
    Last edited: Sep 17, 2020
    Nunez-Torrijos likes this.
  12. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Splines quick fix. It's currently pending Unity review as part of v 2.0.8, but feel free to download it directly.

    Thanks for notifying me! I wasn't aware of Normalize issue, going to fix it ASAP and release a quick fix too.
    EDIT: another quick fix. Sorry for multiple files, but we'll have to wait at least a weekend until new version will be reviewed. However you can wait for it to update all at once.

    Random node works a bit different in MM2 rather than in MM1. In older version it combined the random and mask algorithms, and I decided to separate them and make each node make only one thing. I've done it for Noise, Voronoi, Scatter, and other initial nodes, but left input in Random. I admit it confuses, and will be removed in 2.0.8. If you want to mask scattered or random objects use Mask node together with it:
    RandomMasking.jpg
     
    Last edited: Sep 18, 2020
  13. PiterQ70

    PiterQ70

    Joined:
    Mar 3, 2015
    Posts:
    82
    Hi. Thanks for your help but.. I've remove blur, same problem with seams. Can you look into graph and try fix it? I dont have idea what I do wrong.
    Other problem.. I've changed tile size and now I can't use pin/unpin/etc buttons, doesn't work anymore.. I'm flustered :) I've been remove MM2 and imported again but not help.
     
  14. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    I can't tell from the docs or any of the examples whether there is any way to interact with placed Objects or Trees. In our case we'd like to chop down trees or smash rocks or other objects... is this possible?
     
  15. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    191
    You have to append a script to your tree prefab that controls the interaction. So that every instance have the script applied.
     
    mick129 likes this.
  16. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    You are using several Blur nodes in your graph - I've tried removing them all and it seems to create no seams anymore. However I might be missing something - could you please send me the updated graph, the scene where it's used, and MM Imported Maps (all with meta files)? I will need only these files and will appreciate if you don't compile the unity package with the dependencies.

    Tile and pin frames are gizmos, and like all the other gizmos they could be disabled to not interfere the scene view. It's done by clicking the Gizmos toggle in Scene View window. Please check that you have the Gizmos toggle enabled.

    It's possible but it's a gameplay element, a bit out of the scope of MM. As Diego_Graphics said you've got to write your own scripts and assign them to each tree prefab. Your trees should be objects, not unity terrain trees to make those scripts work, so you've got to use Objects output instead of the Trees one. And make sure you've got Use Pool disabled in output properties, otherwise it will be spawn (actually - just move) the chopped trees to the new terrains.
     
  17. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Yep, thats no problem at all, happy to write some scripts, but what is the API to remove an existing object? Is there any docs on this? I scoured the Scripting Faq and docs.

    Is it just a regular old GameObject.destroy?
     
    Last edited: Sep 21, 2020
  18. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    2.0.8 is available at the Asset Store.

    Main things that it brings:
    - Now all the modules come with the core version included to prevent version compatibility conflicts.
    - Objects Scatter additional margins feature. It might help to extend the radius of stamps/strokes. More info in post. Still a bit experimental though.
    - The objects module includes the demo graphs from the upcoming videos (Minute Island Objects and Villages)

    And bug fixes:
    - Spline nodes inputs/outputs types fix
    - Object nodes add/remove button not visible fix
    - Multiple node moving fix
    - Added warning to node setups that can cause seams
    - Fixed lock on negative tiles
    - Objects Random node input remove
    - Objects Random, Position, Mask icons
    - GUI field negative value dragging improvement
    - Delayed GUI fields now apply value on loosing focus
    - Map preview with > 4 textures fix
    - Draft not displayed when preview is on

    Yep, this should be made by Unity means. As long as the objects pool is off there will be no difference whether these trees are spawned with MM or placed manually.
     
  19. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    Hey @Wright,
    since 2.0.7, the VSPro's persistent vegetation storage doesn't get cleared up before stroing new data when Copy VS is disabled - so generating multiple times with different seeds causes the vegetation to stay there and float around and I have to manually initialize the persistent storage in VSPro component.
     
    Nunez-Torrijos likes this.
  20. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    I think I found a pretty big bug with Spread, just nest 2 spread operations with Objects, and the map goes into a totally broken state: http://screens.gskinner.com/shawn/2020-09-22_10-27-41.mp4

    Tried a similar thing with trees, worked better until we reached the 3rd level, then threw this error:
    Code (CSharp):
    1. Thread failed: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
    2.   at System.Collections.Generic.Dictionary`2+Enumerator[TKey,TValue].MoveNext () [0x00016] in <fb001e01371b4adca20013e0ac763896>:0
    3.   at MapMagic.Products.FinalizeData+<ProductSets>d__13`3[TOutput,TProduct,TBiomeMask].MoveNext () [0x00136] in D:\Project\Assets\Plugins\MapMagic\Products\FinalizeData.cs:189
    4.   at MapMagic.Nodes.ObjectsGenerators.TreesOutput.Finalize (MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x00307] in D:\Project\Assets\Plugins\MapMagic\Generators\Objects\Runtime\ObjectsOut.cs:323
    5.   at MapMagic.Nodes.Graph.Finalize (MapMagic.Products.TileData data, MapMagic.Products.StopToken stop) [0x00088] in D:\Project\Assets\Plugins\MapMagic\Nodes\Graph.cs:812
    6.   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:\Project\Assets\Plugins\MapMagic\Terrains\TerrainTile.cs:680
    7.   at MapMagic.Terrains.TerrainTile+<>c__DisplayClass39_1.<StopEnqueueTask>b__0 () [0x00000] in D:\Project\Assets\Plugins\MapMagic\Terrains\TerrainTile.cs:632
    8.   at Den.Tools.Tasks.ThreadManager.TaskThreadAction (Den.Tools.Tasks.ThreadManager+Task task) [0x00002] in D:\Project\Assets\Plugins\MapMagic\Tools\ThreadManager\ThreadManager.cs:133
    9. UnityEngine.Debug:LogError(Object)
    10. Den.Tools.Tasks.ThreadManager:TaskThreadAction(Task) (at Assets/Plugins/MapMagic/Tools/ThreadManager/ThreadManager.cs:136)
    11. System.Threading.ThreadHelper:ThreadStart()
     
    Last edited: Sep 22, 2020
    Nunez-Torrijos likes this.
  21. viveleroi

    viveleroi

    Joined:
    Jan 2, 2017
    Posts:
    91
    What's the best way to blend biomes for an infinite map? The examples in the wiki/videos use basic gradients but those don't work infinitely. I'd like to blend three or more different biomes.
     
  22. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    This tutorial is from MapMagic 1 but it should be easy enough to convert over to MapMagic 2. It shows how to use noise rather than a gradient for biomes:

     
  23. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    82
    I'm in the same boat. I remember jumping through hoops to get MapMagic's original version to save. I had hoped things would be simpler with the new version (to me, it seems like saving the file or prefab would be a super high priority!). I'd rather not have to take screenshots of all my graphs, but my export (right-click) menu item is grayed out, and like Camta, I don't see any saving option in the main "Map Magic Object's" inspector options.
     
  24. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    Hi all, I've been following the islands tutorial for MM2 and have it functioning but how do I apply water on an infinite terrain? ie. how do I make an infinite ocean? Any help?
     
  25. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    If you use a water shader where the surface of the water uses world space UVs you can have a large water plane follow the camera x,z co-ordinates. It makes it so the camera is always in the center of a large water plane, and the surface looks correct because it uses world space. Both Lux Water and Aquas 2020 have infinite water setup this way and I've tested both successfully in an infinite world.
     
  26. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    I have Aquas-lite but can't see anywhere to limit the view to x z. When I put it on the camera, the water level just goes up and down. Have you tried it with Aquas-Lite?
     
  27. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    Yes, the current version of Aquas-Lite also uses world space UVs and I have got it working with that too. Aquas 2020 comes with a script that you attach to the water plane that moves the water plane with the camera x,z co-ordinates, but Aquas-Lite doesn't have that script included. So don't parent the camera to the water plane have them separate and use a script to move the water plane.
     
    Daniel-Talis likes this.
  28. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    upload_2020-9-24_10-26-2.jpeg

    I just bought 'Lux Water' and have been playing with it. 'Infinite Ocean' (which is a feature in Lux water) has these big rollers so I'll need to tone them down somehow. Maybe make the islands higher too.
     
    camta005 likes this.
  29. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    There seems to be some problem related to detaching output nodes and then phantom objects being left behind:


    This happens to me quite a bit in the latest version, I want to disable something, so I detach a output node, and instead of clearing as I'd expect, it goes into some broken state. It's not super reproducible, but happens on a fairly regular basis.

    As a note, it would be GREAT if we could just disable an Output, so we don't have to modify our tree to temporarily disable something, for example when performance testing.

    The only options I know of now are A) Change the tree but setting scatter density to 0, or B) Disable output node, which is unreliable. Both require you to remember to undo the change later. Also, with complex nodes like Texture, this becomes even more complicated. I want to test the performance of the terrain shader, but there's actually no clean way to toggle it on and off.

    Edit - Just happened again. I popped off my tree node, and all the trees are now orphaned:
     
    Last edited: Sep 24, 2020
  30. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Seem to be having another issue (srry, not complaining, love this asset to death and just want it to be great)
    http://screens.gskinner.com/shawn/2020-09-24_00-09-50.mp4

    As I drag the seed, rocks are just accumulating in my scene.
    I have this error in the IDE:

    Tree removed: invalid prototype 1
    UnityEngine.TerrainData:set_treePrototypes(TreePrototype[])
    MapMagic.Nodes.ObjectsGenerators.ApplyTreesData:Apply(Terrain) (at Assets/Plugins/_Code Extensions/MapMagic/Generators/Objects/Runtime/ObjectsOut.cs:405)
    MapMagic.Terrains.<ApplyRoutine>d__43:MoveNext() (at Assets/Plugins/_Code Extensions/MapMagic/Terrains/TerrainTile.cs:771)
    Den.Tools.Tasks.CoroutineManager:Update() (at Assets/Plugins/_Code Extensions/MapMagic/Tools/ThreadManager/CoroutineManager.cs:147)
    MapMagic.Core.MapMagicObject:Update() (at Assets/Plugins/_Code Extensions/MapMagic/Core/MapMagicObject.cs:144)
    MapMagic.Core.MapMagicObject:EditorUpdate() (at Assets/Plugins/_Code Extensions/MapMagic/Core/MapMagicObject.cs:136)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     
  31. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Personally I use this simple script to save all kinds of assets: terrain datas, meshes, materials, textures - all those assets that were made procedurally and are not saved in any file yet. Select the terrain (not MM or it's tile, but the terrain itself), and press Edit - Save Asset - Terrain. Can save multiple selected terrains too.

    Guess it's not about terrain asset, but the graph asset. Unlike MM1, in MM2 it should have always be saved in a file. If you want to save it's current state save project (File - Save Project) to write all changes (like with any other Unity asset), and just duplicate the file.

    Do you remember what were you doing before this happened? Just tried to fiddle with trees and objects outputs in demo scene and new graph, but it seems that objects they produce disappear after I unlink them. As far as I can see you've got two errors in console - could it be related?

    Speaking about removing objects on disable - I could make the same message as when removing an output. However I'm afraid it will be too annoying. I'll think about if this setting could be saved in graph or MM object, and ask only once.

    Could not reproduce this issue. Could you please send me a scene, a graph and their meta files. I will need only 4 files, and will appreciate if you don't compile the unity package with the dependencies. There's no need to send models or other assets. It would be great if you remove everything that is not related with MapMagic from the scene.

    This one I could reproduce, clicking fields really opens up the foldout below. Added to to-do list.

    BTW 2All: I'm using Quire to plan my tasks, and don't keeps secret of my to-do list. You can find it for the next version and the general one with all the tasks listed (including the completed in last 30 days).

    I really appreciate all of the feedback, and try to fix all of the reported issues with each new version release (that happens every 2-3 weeks). These reports really make making MM better with each iteration. Just like to mention that I'm not against reporting issues here, but it would be far more convenient for me if the issues will be reported via idea.informer. It just makes issue tracking and dialogs on clarifying them far more convenient for me on the once side - no need to scroll up the forum to find what it all about, and I don't need to keep all the report stories in my head. And I hope it's a bit more convenient for you on the other side since you can know if this issue was reported (or find the answer) from the very beginning.
     
  33. viveleroi

    viveleroi

    Joined:
    Jan 2, 2017
    Posts:
    91
    Is there a way to see a larger area in the "2d preview images" under each node? I'm trying to generate noise for placing a relatively large biome, relatively far apart. The default area shown isn't large enough. Even if I click the `[ ]` icon, I can't change any size values in the preview window.
     
  34. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Sounds good, I'll do whatever works best for you. Just want this plugin to be robust as possible.

    Read up on Splines last night, I am in love :D


    If I can find good reproduce steps I will, but it's pretty random. It's happening a lot though, so pretty sure you'll stumble on it. Pretty sure it's related to object pooling or something. I've had to create a 'destroy all children' script to the Object layer, that just cleans up all these orphaned objects.

    One thing you could do that is simple is make sure that whenever generate is pressed, all the children of Objects are destroyed and remade. Or make a "Clean" btn?
     
    Last edited: Sep 24, 2020
  35. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    @Wright I don't have a direct reproduction step yet, but it definitely seems to be related to this type of setup:


    I'll have a totally working generator, then I do this (split before the output), and it goes into some broken state, that is hard to recover from. Seed stops changing output, rocks start duplicating up on top of eachother endlessly, and I have to reload scene to get rid of it.

    It seems to be maybe related to just adding an orphaned spread node?
     
    Nunez-Torrijos likes this.
  36. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    @Wright I have a number of UI feedbacks I think would improve the quality of life.

    Happy to file a feature request for any of these you think are worth pursuing:

    Multi-Shift Selections
    Would be nice if we could shift-drag to select one set, and then shift-drag to add to that selection. Currently I can multi-select single nodes, but I can't multi-select with consecutive drags.

    Duplicate Node / Selection
    Copy and Paste would be great for duplicating selected nodes, or any way to duplicate the current selection (with the outer input and output nodes detached)

    Larger hit box on expand arrow
    The expanding bar with the down arrow, could stand to be +15px taller or so, to make it more clickable

    Larger hit not on connection Arrows
    The arrows on the sides seem pixel perfect, and extra 5px around the sides would really help make em easier to hit.

    Collapsing Groups
    Would be really nice to collapse groups down to just a small card. A double click on the title to open close would be hot.

    Quick Access / Favorite System
    Often I have to access the same 5 or 6 notes. Specifically Portal-Outs, and things like Scatter and Noise. Some sort of quick select would be awesome so you can mark your favorite cmds, and select them with 1 click. Alternatively, a simple heat map approach, that just surfaces my top 10 nodes for quick select would be amazing.

    Consider the simple task of making scatter, making noise, blending it, and outputting it. You would save something like 15 clicks if you could just drag out those super common nodes.

    Quick Disable
    It's cumbersome to disable outputs. Things aren't cleaned up properly when I unhook the inputs, and somtimes by whole map breaks when detaching. A quick eye-toggle or something in the corner of the node would be nice to disable an output non-invasively.

    Easier Groupings
    It's very easy now for the bottom preview of some node to stick out of the bottom of the group when you unfold it, and then it is considered out of the group. It might be easier to use if just the top 50px or so of any node had to be within the group? For example, in this setup, scatter won't move with the group: http://screens.gskinner.com/shawn/2020-09-25_01-07-59.png
     
    Last edited: Sep 25, 2020
  37. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    228
  38. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    Hi guys! Few questions about mm2:
    How do you guys combine two modifiers into one mask? For example I want to combine gradient and then slope and use combined result as a mask.

    2. When I'm using flatten-node, i never get exactly plane like flat terrain unless i raise terrain to max. Should I use levels etc modifier before flatten node is connected to height node?

    3. Textures are blended with each other resulting that everything is bit washed out 50/50 mix of everything. Is this also because i'm not adjusting texture amount by levels etc modifier? In the videos textures have opacity value but that isnt in texture node anymore.
     
  39. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    treshold likes this.
  40. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    The next timelapse video. This one is showing the way Objects module could be used:
    It's the first part of Objects module videos, giving a general overview to object nodes. The second one might be more interesting, and will show the way to create villages.

    I'm thinking of a changeable node width in graph settings. This value will affect all of the nodes and will scale the graph horizontally. I try avoid big node GUI modifications since they will cause mess and overplayed nodes. Scaling all the graph will prevent this. Increasing the node width will expand a preview too.

    However I still recommend using the preview window for more detailed preview look. I did not get it - do you have an issue with zooming it in?

    Seems that you've got thousands of objects in Adjust, and you are spreading each 2-3 times. There are tons of objects, might it be the reason?

    Thanks for sharing your ideas and for the detailed description. I really appreciate this. Can't promise implementing these ideas in code in near future - still got 2 modules to be accomplished, but saved the link to the post to review it from time to time when I will be wondering what should I do to improve MM.

    I have not tried it myself, but I guess it should work fine as long as you are using the pinned terrains (and saved their terrain data assets with a script).
    Just to mention - MM is streaming worlds itself. It's just generating new terrains in the background instead of loading them.

    How do you want to combine these masks together? You can add one to the other, or multiply them - in any case Blend node might help you.

    Flatten node creates a flat land in the center, and gradually blends to original land on the edge. If you want to have 100% flat circular stamps try increasing the hardness value to 1.
    And make sure that flattened height is not modified with any other nodes if you want 100% flat areas.

    Are you sure that you are using the only Textures output? The results of several texture outputs are blended equally, as well as the results of height outputs are combined. Using multiple outputs of the same type could be a reason of both problems. If these outputs are somewhere inside a function or sub-biome the effect is still the same.

    Thanks for reporting issues and special thanks for using idea.informer. Additional margins feature is still a bit experimental, it extends margins only in 2 directions. It should work, but it won't affect the visible result of the Scatter node on terrain. It's doing it's work out of terrain borders, and could be visualized when Scatter preview is assigned to terrain.
     
    Last edited: Sep 25, 2020
    mick129 likes this.
  41. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    I think the total at the end of it was about 2 thousand, is that not a supported use case? They render fine. I have about 3000 trees and 2000 items now, all lit and shadowed, 110fps on an gtx780... we'd like to go beyond this up to 6-7k.

    Couple notes:
    * I would be fine with this being slow, we can happily make the player wait a few seconds while an island is generated. But it can't be breaking all the time.
    * I'm also happy if some internal limit is enforced, again it just has to be reliable
    * If there is some limit that leads to breakage, can it be enforced, and some error message surfaced?

    In general just really seeking robustness. I've really hammering the system for the last few nights, and there are a lot of different errors popping up. Maybe just be a little more aggressive in your testing? Some general things that keep happening:
    * Once every 20 regens or so, my terrain just jumps up 50m or so. I have to manually move it back down. I've done this about a dozen times in 2 days.
    * Nested spreading breaks the whole scene (logged a bug on this)
    * My rock layers continually break, objects get orphaned in the /objects transform, and I have to clear manually (this happens maybe 30 times in last few nights?). This seems to coincide with soem SystemBuffer overrun errror that shows up when things get really heavy... like a threading error I think.

    I'll do my best over the next cpl weeks to log specific reproduceable bug reports for you.
     
    Last edited: Sep 25, 2020
  42. viveleroi

    viveleroi

    Joined:
    Jan 2, 2017
    Posts:
    91
    I don't want to zoom, I want to see a larger area. I want some biomes to be quite rare but that means the preview window is too small. I want to see a 2k by 2k PNG of the noise to get a better sense of the pattern over a large area.

    I guess I could start with my noise scale small and design what I want and then scale up after confirming things in the preview....
     
  43. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    @Wright Is there a way to only refresh a certain area of the map like there was in MM1? I'm tinkering with a dynamic node and I want to be able to update just the portion of the map that needs to be updated.
     
  44. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    191
    When used with Microsplat, various bugs are noticeable:
    1. As soon as Triplanar UV Mapping is activated, the terrain appears Incorrect.

    Without Triplanar Mapping


    With Triplanar Mapping

    I have tested it in the same project on a non Map Magic terrain, this error does not occur there.


    2. Terrain Blending objects do not seem to work. This was also tested in the same project, on a non MapMagic terrain, where terrain blending objects work very well.

    upload_2020-9-26_14-54-7.png
    TerrainBlending on MapMagic

    upload_2020-9-26_14-54-52.png
    TerrainBlending on the standard Terrain.



    3. Then it happens again and again that the whole scene (terrain and sky) turns black, only the World Grid is visible. Here it helps to unpin all terrain tiles and repin them.

    The MapMagic2 wiki has still a lack of information about the MicroSplat integration. So I can only guess how the setup works.
    upload_2020-9-26_14-56-46.png
    This is the Output Node, the Microsplat material and the corresponding PropData Component were linked.



    Another problem occurs with Vegetation Studio. Vegetation does not seem to be generated on terrain tiles generated during runtime.

    Render Pipeline HDRP, unity version: 2020.1.6f1
     
    Last edited: Sep 26, 2020
  45. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Unity needs to buy this plugin so you can hire a couple more devs!! So much potential here, but tons of little issues that make using it in production a bit scary...
     
    valentinwinkelmann likes this.
  46. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    Performance question: how expensive is a blend node? Should I find a way to merge two or more of them or does it really matter?

    EDIT: Speaking of blend nodes, I keep getting an error with Add layers. However, if I send it through an unmodified Levels node, the error goes away.
    Thread failed: System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at Den.Tools.Matrices.Matrix.get_Item (System.Int32 x, System.Int32 z) [0x00001] in Assets\MapMagic\Tools\Matrix\Matrix.cs:86
     
    Last edited: Sep 26, 2020
  47. Juneav

    Juneav

    Joined:
    Feb 18, 2017
    Posts:
    28
    Any idea why I cant see any preview?
    Also, I cant get grass showing no matter what unless I open a sample scene...

    Unity 2019.4 / Enabled .NET 4.x / Built in pipeline

    Thank you!
     

    Attached Files:

    Last edited: Sep 27, 2020
  48. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    So as far as I understand it's the matter not of a preview size, but a preview area. Preview is working on per-tile basis, and, unfortunately, there's no way to see multiple tiles at once. But I like the idea - feel free to share it on idea.informer.

    Hmmm... I don't remember such a feature in MM1. Could you please remind how it could be done?

    The only difference between manually created MS terrain and the one created with MS output is the presence of splat map information - the standard terrain data that's applied with Textures Output. I plan to combine these outputs in upcoming version. But for now I guess it's worth trying to use two outputs together in one graph - MS output and Textures output. At least it will show if this happens because of the absence of splat data.

    Could you please email me a scene, a graph and their meta files? (Note: A description of the issue in email will also come in handy - way more handy than mentioning post on forums. I will need only 4 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).

    I fix all of the reported (edit: properly reported and reproduced) issues with each new update, which happens every 2-3 weeks. Guess it's just the matter of time like it was with MM1. I need testers more than devs, or even better - users that are working with MM and can share their ideas on what to improve - like you did.

    Blend node is very fast. However it still consumes some memory in editor (but not in playmode, until it has only one connect to it's outlet). So I'd rather recommend using multiple layers when when it's handy, but it's not a strict rule. There's no need to strive to use only one blend node per graph.

    I can see you've got a null reference exception on the first screen. Is it related with MM?
    If so, could you please email me a scene, a graph and their meta files? (Note: A description of the issue in email will also come in handy - way more handy than mentioning post on forums. I will need only 4 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).
     
    Last edited: Sep 27, 2020
  49. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Another really nice quality of life thing I thought off:

    Double Click to Open/Close preview - Much easier than clicking the little drop arrow, would be double clicking the node itself to open and close

    Regarding bugs, hear you loud and clear and I'll submit bugs with repro steps as often as I can find them

    Cheers and thanks for all the amazing stuff you've built for us!
     
  50. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Also if anyone is having problems with the object pool being flaky, I've been using this function to just brute force clear out a pool cache, and it's been really helpful:

    Code (CSharp):
    1.  
    2.         var mm = GetComponent<MapMagicObject>();
    3.         ObjectsPool pool = mm.GetComponentInChildren<ObjectsPool>();
    4.         pool.enabled = false;
    5.         foreach (Transform t in pool.transform)
    6.         {
    7.             if (t != pool.transform)
    8.             {
    9.                 pool.Depool(t.gameObject);
    10.                 DestroyImmediate(t.gameObject);
    11.             }
    12.         }
    13.         pool.enabled = true;
    14.         mm.Refresh();
    15.  
    This basically makes sure there's no orphaned objects in the pool, and then rebuilds the map.