Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MapMagic 2 - infinite procedural land generator

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

  1. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    So the solution i came up with generates a dictionary of custom data and then i have a node that i treat as a stop sign. When i reach that node the first time it stops, then when all of the tiles have been processed to this point, it reruns the graph again - the pre stop sign nodes, since it already has good data, skips generating most of the tile data and this happens stupidly fast, and the stop sign sees all the nodes in the dictionary so it gets skipped, processing the rest of the world.

    I do not do my custom world data on this stop sign already reached pass. then the rest of the world can access this dictionary of data that includes a full map of the terrain (currently only in draft mode.. but we will see)

    This allows me to on a per node basis decide if i need extreme margins or not, and i can let mm nodes do thier thing normally or dip into the dict and run there. This MASSIVELY reduces world build pass times as i dont need any kind of extreme margin, and when i do.. dict. Ultimately this dict approach has solved a lot of my problems overall, even if it presents its own challenges for me.(which i usually solve by resorting again to the dict to solve somehow....)

    Me doing a planet my theory is that if you approach it from space like warp in to the system, u need to see the draft version, and when u get into the atmosphere u need to see higher res of the tile u r on + x tiles with no more than grid width / 2 in draft tiles visible, so i dont need the whole world when they spawn on it originally or teleport to it or are generally running around it, cause that data can be pulled per tile and or all at once using the custom dict built with the draft data. It may not be perfect but it is very close so far, and close is enough ;)
     
    Last edited: Jun 10, 2022
  2. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    So these are some things i was considering asking you to work in to the asset, some these things seemed like they would be super useful when i first thought of them....
    1. split the nodes in unity asset code from 1 jumble lump into individual scripts - this makes it easier for us to debug in unity.
    2. a refresh ONLY PREVIEW TILE option would be more useful than the current secondary map reload option
    3. since u can only have 1 preview active, when u go to open the window - look for an existing preview window and use that if its open instead of just opening a new one <-- this will let u dock the window, and you can say.. hold shift to open multiple windows for comparing.
    4. on that note, the ability to see multiple or the whole pinned terrains with the preview option simultaneously
    5. Unerror the error that appears when you have a preview miniview open and are only working in the draft view
    6. include a series of blank templates for making nodes, i know its easy but for those struggling to get the inital grasp on it, and based on what i read on discord, it seems like that would probably go a long way... i say a series of templates, cause theres a fair difference in the structure of a node that has one input and or output as opposed to either having many... so two? three?...
     
    Last edited: Jun 15, 2022
  3. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    and this is a question unrelated to the suggestions, but is there a means to override the margins per node?
    My custom data dictionary solution is working, reducing the nodes that needed extended distance data from 1 minute down to ~10 seconds, and giving me solid results with default margin settings all around, decreasing the entire world build time as planned, but i kind of feel theres something i am missing that I should be doing instead of this thats already there?
     
  4. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
     
  5. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    darrelltstevens, thanks for the feedback and all the ideas! It really helps to have a fresh look at MM, and think about things I've missed. However I will appreciate if you could clarify some details:

    It was easier for me to write them, but yes, now it's not necessary. Will consider this.

    Could you please clarify what it is and how it will work?

    You mean auto-focus window on preview map when opened?

    For multiple tiles - what would be displayed in each of the nodes' small preview window?

    Is there a way to reproduce this error?

    You mean other templates to start new graph with, like template noise/erosion/height? What would be these templates - what should they do?

    I think it will work if next node decreases the margins from the previous one, but what about increasing? Where will it take the missing information?
     
  6. psistalk

    psistalk

    Joined:
    Sep 23, 2013
    Posts:
    68
    I would like to see save and load groups
     
  7. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    It was easier for me to write them, but yes, now it's not necessary. Will consider this.
    :) THANK YOU :)


    Could you please clarify what it is and how it will work?

    Not really sure what the reload button on the right actually does, just seems to reload everything same as the one on the left... However when you are working in detail tiles with a preview, (and auto reload on change is NOT selected) and you make a change to the settings for the current graph, it would be nice if that second reload button did not process the entire map, or all visible tiles, but instead JUST rerun the currently selected preview tile through the graph - this can speed up testing changes when you have alot of tiles up (I know probably doing it wrong if thats the case) changing just the one you are looking at currently


    You mean auto-focus window on preview map when opened?
    Currently when you open the preview you always get a new window if it is a different tile you are selecting. This means you cant really "dock" the map preview to your UI for longer than its current iteration. So instead of this, when opening a full preview - have it check for an open map preview tab and using that instead of opening in a new window. User override this opening in the same window with each preview with a shift click modifier.

    For multiple tiles - what would be displayed in each of the nodes' small preview window?
    add a secondary one only active selection for "active" preview - this allows users to still diag multiples using god view of the green yellow red data, and you could alter the current preview dropdown by enabling a different tiles active preview state (disabling the current one - just like the current functionality)

    Is there a way to reproduce this error?
    upload_2022-6-16_3-37-6.png
    This appears when you are working in draft mode and either have preview dropdowns open, or open one of them.
    The error is that there is no preview to load into the node preview, sure i get it, but when you open a 30 node graph and they all toss up an error just cause you are in draft, well, lol :)

    You mean other templates to start new graph with, like template noise/erosion/height? What would be these templates - what should they do?
    litterally nothing.... blank that shows how its supposed to work with comment insights on the less intuitive parts
    (here i commented why "this" is used instead of the target for example), multi in / out variants with the same thing... it does nothing... but you can copy this and paste it and poof you have in this case the skeleton for a 1 in 1 out node that someone with zero mm experience can understand whats going on on a simple and basic level :

    Code (CSharp):
    1.  
    2. public class YOURCLASSNAMEHERE: MonoBehaviour
    3. {
    4.     [Serializable]
    5.     [GeneratorMenu(menu = "Custom/Terrain", name = "Your Node", iconName = "GeneratorIcons/Noise", disengageable = true, helpLink =  https://www.youronlinedocumentation.com")]
    6.     public class BLANKNODE : Generator, IInlet<MatrixWorld>, IOutlet<MatrixWorld>
    7.     {        [InitializeOnLoadMethod]
    8. #if UNITY_EDITOR
    9.         private static void EnlistInMenu()      {
    10. MapMagic.Nodes.GUI.CreateRightClick.generatorTypes.Add(typeof(BLANKNODE));  
    11. }
    12. #endif
    13.         [Val("SOMEVAL", 0.0001f, 1.0f)] public float yourNodeVal = 0.0001f;
    14.         [Val("TerrainIn", "Inlet")] public IInlet<MatrixWorld> inLink = new Inlet<MatrixWorld>();
    15.         [Val("TerrainOut", "Outlet")] public Outlet<MatrixWorld> outLink = new Outlet<MatrixWorld>();
    16.  
    17.         public override void Generate(TileData data, StopToken stop)
    18.         {
    19.             if (!generator.enabled)
    20.                    return;
    21.             MatrixWorld land = data.ReadInletProduct(this); // "this" is inLink because there is only 1 input
    22.             if (land == null)
    23.                 return;
    24.             MatrixWorld outMap = new MatrixWorld(data.area.full.rect, data.area.full.worldPos, data.area.full.worldSize, data.globals.height);
    25.             YOURCUSTOMLOGIC(land,mapOut,stop);
    26.             data.StoreProduct(this, mapOut); // "this" is used when there is only one output
    27.        }
    28. }
    29.  
    30. public void YOURCUSTOMLOGIC(MatrixWorld terrain, MatrixWorld outMap, Stop stop);
    31. {
    32.      Coord min = terrain.rect.Min;
    33.      Coord max = terrain.rect.Max;
    34.             for (int i = min.x; i < max.x; i++)
    35.             {
    36.                  for (int j = min.z; j < max.z; j++)
    37.                  {
    38.                        if(terrain[i,j]>0)
    39.                            outMap[i,j] = yourNodeVal; // your cell value here
    40.                  }
    41.              if (stop != null && stop.stop) return; //checking stop every x line
    42.             }
    43.    }
    44. }
    i kinda think a 1:1 / multi : multi / and if there is any other unique scenario that my brain wont come up with right now should be more than enough for anyone to atleast get the idea and run with it with those syntax's that are less than intuitive predone for just the purposes of being copied and pasted. This one is really for the less capable coders out there who want to and would if they could figure out how. And theres alot of those far as i can tell.


    I think it will work if next node decreases the margins from the previous one, but what about increasing? Where will it take the missing information?
    making certain ones larger is the goal for that actually... so that when you have some complex long range sensitive data that could benefit from data 2+ tiles away doesnt need every node to have say tilewidth * 2.5f margins.
    This example is maybe specific to my coding with this and my using finite terrain lengths, and it is specific to me searching for a waterline and needing to look more than a tile away occasionally, but only some things need extended margins to fix odd edges, (like parallax with higher values like 100+ on it can benefit from this) and if you can just look farther when you need or want to and not force every single node to have such a large margin, you can seriously decrease load times, while not overburdening nodes that do not really benefit from this like generator nodes, blur, or blend or a whole list of others that work fine with smaller normal margins.
    So...
    What if, If there is a custom margin, you overlap from 0 - where 0 is the edge of the actual terrain grid, and not the margin, discarding anything over when you go to get the data.
    So that in theory means that you have a larger margin looking at a smaller margin then it only cares about the rows it can count equally discarding its own margin in its math, and if you have the inverse, cast off the excess from the incoming data for the calculation.

    This should work i think, cause alot of the issue in sudden drops on the edges is based on one node or another not getting the data a tile needs via a lack of reach and the neighbor node doesnt care about or need this data.

    Maybe reach is the key there, a custom hidden value that lets the node look farther than the margin?
     
    Last edited: Jun 16, 2022
  8. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    darrelltstevens, thank you for clarifications! I cannot promise anything, but at least I will keep these ideas in mind when developing further versions.

    Especially I will consider splitting node code in files, and think of the way to display all tiles in preview window.

    You can select all of the generators in group with shift and right-click, then choose Graph -> Export. This will save selected generators to a new graph.

    Choosing Import will add all generators from any other graph, including exported one.
     
    Greviouss likes this.
  9. Morothar

    Morothar

    Joined:
    Dec 3, 2009
    Posts:
    25
    Hello. I also ran into the non-transparent grass problem. Is there a workaround? Do you know any assets that I could buy/use instead of the grass nodes? Could I setup an objects node with grass models to be dense enough?
    Or did I miss that the problem is already fixed? Do you have a link to the ticket?
     
  10. montyjack

    montyjack

    Joined:
    Jan 10, 2014
    Posts:
    43
    Hi, love the product so far (MapMagic 2), but I've got a terrain with a lot of near vertical cliffs in it and I'd like to use a custom shader to make them look better (I'm using Raving Bots triplanar shader). The documentation says to use the Custom Shader output node, but there's no such node in Mapmagic 2- just the Custom Material output node which doesn't appear to work the same and has no documentation. How do I use a custom terrain material so I don't get stretched out textures on vertical faces?
     
  11. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    I'm running MapMagic on Linux Mint. Only issue at the moment is that grass is not compiling past the 1st terrain. ie. grass is not appearing in on infinite terrains when I compile. It is fine in the editor, just not there when I compile my scene. Please tell me there is an easy fix.
     
  12. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    Did you try the 'tiling' setting?
     
  13. montyjack

    montyjack

    Joined:
    Jan 10, 2014
    Posts:
    43
    The tile setting just changes the U and V sizes of the tiles. It doesn't have anything to do with vertical height. Also, there's no way to specify a custom shader / material in the standard texture output (or the custom material output, for that matter) and the "custom shader" output shown in the documentation has apparently been deprecated?
     
  14. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Unfortunately it's a Unity issue. In Unity 2021.2 or later grass created with scripts is not working properly. In older versions everything works fine. I have opened a ticket IN-4122, hope Unity will fix it one day. On 25 June the issue is still open.

    Update on the issue: according to some users feedback the issue doesn't occur in URP and HDRP. According to the others, switching to URP doesn't have an effect.

    I'm creating terrain tiles for procedural terrain with scripts. Both billboard and usual grass are shown properly in playmode in editor. But when I perform and run the build the build usual grass has no transparency, while billboard grass is not displayed at all.

    Screenshots (attached):
    EditorGrass and BuildGrass - the way usual grass is displayed in editor and build
    EditorBillboard and BuildBillboard - the way billboard grass is shown in editor and build

    Steps to reproduce:
    Start Unity 2021.2.19f1 or later (issue is NOT reproduced in Unity 2019.2.0f1)
    Open DetailApplyIssue.unity (attached)
    Run the playmode, see a new terrain created with script, and see grass properly applied
    Perform and run the build (standalone Windows x64). See that:
    for Grass mode grass has no transparency, and not affected with wind
    for GrassBillboard mode grass is not shown at all
    terrain has no default texture, but that's not a big deal

    The scene fires a script (attached DetailApplyIssue.cs) attached to ScriptedTerrain game object that performs these actions on start: – makes new TerrainData – creates new Terrain with Terrain.CreateTerrainGameObject – creates DetailPrototype array with one element, assigns texture to it, switches DetailRenderMode to Grass or GrassBillboard, and assigns it to terrain data – creates SetDetailLayer and assigns it to terrain data

    Is this asset a script + shaders (or shader compile script) like MicroSplat, or it is a pure shader? Can it read splats assigned to terrain? If so have you tried outputting them with standard Texture output? If not - how do you paint terrain with it?

    Can you please point out where documentation mentions "custom shader"? This node was used in MM1, and brief search found pages only related with MM1. Probably something was copied from older documents, and I'd like to fix it.

    This node was really replaced with Custom Material, but I recommend you outputting splat maps the regular way instead, and let 3rd party asset convert them to textures it's own way.
     
  15. montyjack

    montyjack

    Joined:
    Jan 10, 2014
    Posts:
    43
  16. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    Thanks for the reply, before I experiment further, can you say which older version or versions in particular will compile correctly?

    UPDATE: 2019.4.40f1 works.
    UPDATE: 2020.3.36f1 works.
    nothing newer.

    UPDATE: Bought 'Aquas 2020' and found the same compiler problem for underwater rendering in anything newer than '2020.3.36f1'. They really need to fix that.
     
    Last edited: Jun 29, 2022
  17. Morothar

    Morothar

    Joined:
    Dec 3, 2009
    Posts:
    25
    I planned to switch to URP soon anyway. Since there are no other known ways to possibly fix this it won't hurt to put that switch higher on my priority list. I'll post if the switch to URP did indeed fix the problem or not.
     
  18. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    update to this answer from me :
    Only allow overriding margins to be larger than whatever the default is, that should overcome that problem i think (unless im reading it backwards), and solves the problem there still of having only certain nodes look really far away while most look the default distance away.
     
  19. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Hello,

    I was using GeneratorsAsset class to get the scatters etc on MM so I can run randomized seeds etc. How is this possible on MM2?
     
  20. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
     
  21. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Yeah I know this, but I mean to change generator seeds from code, thanks
     
  22. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    White/invisible grass Unity bug
    The ticket status is still open. I would like to gently notify Unity that this problem is kinda critical for all projects that have procedurally generated terrain (not only those using MapMagic). I remember the other feedback / bug reporting form, public one, with voting, but can't find it now. The only thing I see is a roadmap, that doesn't seem right to report a bug. So if anyone could point me a link to other Unity bug reporter I'll create a ticket here as well.

    Generator effect depends both on node seed and global seed. You can change both from script. Easiest way would be changing the global seed, this will make MM generate different terrain with using this graph. You can also access the node by it's id and change the seed, and this will only affect one node, leaving other terrain intact.

    If some nodes (like blur or erosion) reads previous nodes result and then increase margins - what will they do to fill new margin areas? Using black or clamped data won't prevent seams to appear, so it doesn't make much sense.

    I'm afraid that it's MM1 documentation, but you were talking about MM2. This document is still relevant for MapMagic World Generator, but MapMagic 2 is a new deeply re-made asset.

    I have not tried Raving Bots Triplanar Terrain Shader asset. I cannot promise that I will make MM compatible with it, but if you could suggest this idea at ideainformer and others will vote for it at least I will know that there is a demand for it.
     
    Last edited: Jul 7, 2022
  23. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Thanks @Wright but both links not working for me
     
  24. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    MapMagic 2 is such a useful program and it's being held back by Unity not bothering to fix bugs in their new releases. How good it would be if MapMagic could become a 'standalone' program for developers to use. I know it's too much to ask because MapMagic relies on the Unity terrain system but but it is this reliance that is the problem. Just saying.
     
  25. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    I m having issues with the Range, on MM1 I had 2-3 tiles open at any time with the range system, now I use Main Range:1 and Draft Range: 2, and when I press play I have 25 tiles open which cause a lot of lag, anything I m missing? Only 1 tile is open before I press play

    https://ibb.co/ZmGy7LG
    https://ibb.co/5W5X78H
     
  26. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    What the, I don't know why they copied this way. I fixed it, edited the post.

    I doubt that I will ever make MM standalone. The biggest MM advantage is that it can generate terrain in game build - both infinite and new seed-based land. The standalone version will lack this advantage, so it doesn't make much sense. Unreal version - maybe, but not standalone.

    With the range of 2 you get 5 tiles in row and line: 2 tiles range + 1 center tile + 2 tiles range again. And a square of 5*5 tiles is 25 tiles.
     
  27. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    Thanks for clarifying that. Unreal 5 and Nanite, yep.
     
  28. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    So blur erosion etc would all have non overridable sizes, id say all your nodes dont need this custom thing, but custom nodes we write can..
    In that event if blur comes up against a custom node that has larger margins, it will read its depth and ignore the larger right, ok, custom margins are always larger so there will never be a blank area for them.

    Some nodes need to see farther than others :
    The custom margin data is for that node alone to get legit numbers when generating its own tile data from excessive distances. Doesn't even need to store it as a larger final margin data, but to look that far when building the data to put in.

    Specifically for me i am looking for the nearest waterline, and that can be many tiles away. BIG margins fix this, and i get legit results but it takes FOREVER to finish, because ALL NODES use this excessive size to overgenerate data they do not need and only that one single node and a handfull of other really benefits from generating its own data and looking at that data it generated for margin cell values up to two or three tiles away for example.

    There are only a small handful of your included functions that can generally can benefit from this oversizing while most really outright cannot or don't as far as i can tell. Some of the nodes that can benefit from the excess margins are like parallax erosion and blur with LARGE values placed on them (like 4-500 on parallax for example), but make no sense for most of the rest to have such excess distances tacked on to process because data two tiles away has no effect on ledges or cliffs or a small hill or blending etc.. that far out in the margins.
     
    Last edited: Jul 9, 2022
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Thanks for sharing your ideas! I still see only a way to shrink margins during the generation, but not extend them. But maybe I'm missing something, and I will try to comprehend and think about it.
     
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Good news! The ticket about not creating grass / grass materials with script has been confirmed and transferred to the appropriate internal development team at Unity. When done, this will fix the grass not visible or not transparent in builds in latest Unity version.
     
    Greviouss, Daniel-Talis and Morothar like this.
  31. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    I for one am very pleased to hear this. I wonder though, how long it will take them to get it sorted.
     
  32. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    what if its not margins but some new options that allows a node to just oversample?

    fustrating to accept that one node works properly if i force all the other nodes to draw insane margins (like tilewidth*2.5) raising the generation time for a terrain by powers of insanity when only one node needs it

    Im trying to find a way around this using my custom dictionary, closing in on a maybe i got it but problems with results at every turn still leaves me knowing your better at this than i am.
     
  33. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    May I ask you to paste a screenshot of your graph? It will make it easier to understand your use case, and how this node could require margins without preceding nodes.

    The only case I know is the Scatter node - but it can work with empty margins (and it does, you can increase them in node's advanced settings). I'm curious to know what node and scenario could be made the same.
     
  34. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Hello @Wright!
    I bought your MM2 Objects add-on and thinking about the biomes add-on, too! One question before buying, is MM2 fully compatible with Nature Renderers instanced tree rendering? I am targetting VR platforms and I need to maximally optimize for performance. Thanks
     
  35. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    I have not made compatibility with Nature Renderers, and I'm not aware if Nature Renderers makers done any compatibility with MM. So, unfortunately, I guess no.

    But since you already have Objects module it's worth testing. Biomes does not bring anything to trees spawning algorithms.
     
  36. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Thanks for the answer! I will try

    Edit: Seems to be fully supported from their side :)
    https://v3.visualdesigncafe.com/nature-renderer/docs/2020/map-magic
     
    Last edited: Aug 6, 2022
  37. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    specifically i am trying to determine the closest waterline / cell with a value lower than <waterLevel>. Not sure how much help the graph would be so heres a clarified intent on what im having the biggest issue with

    My most recent attempt at this kinda sorta mostly gud nuff works with a tilewidth * 0.5 margin setting...
    best so far but not really that acceptable still for tile sizes in the 1025+ categories and fully relies on the bit of small magic working in my custom landmass data dict that lets me look into neighbor tiles

    the graph could be as simple as : generate landmass, apply this to look around and find the nearest waterline, and should feedback something like this :


    or kinda :

    keep in mind while this looks like a landmass - it is supposed to not be and be data storing the distance from the water, and not a height - this produces what should be a slope that starts at
    (cell *100) / tilewidth*2 (cell count of the current +1 tiles away) and works from the (lowest iteration * distance to water) up to 1.0 as the value stored

    see the borg cubes? they couldnt find water in any direction up to current +1 tiles away, and removing that limitation would be great, but i can work with it... There are errors in all of these actual maps, even now with my latest refinements but im getting closer. However, even still, these require a sizable margin to generate, which ive shrunk considerably but not quite good enough yet
     
    Last edited: Aug 7, 2022
  38. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    I have used nature renderer to make the sexy with mm2

     
    Zimnel and ledshok like this.
  39. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,267
    Cool! Kudos to Visual Design Cafe! I really appreciate them taking MM into account while developing Nature Renderer.

    And looks cool as well!

    Are you using custom node to find water pixels? If so how about performance?
    I'm afraid there could not be much done for the high cube blocks. If the tile is located far enough from water it cannot get information about it, even if the neighbor tile has it. Unfortunately there is no way to pass information to other tile - it might not be even generated.
     
  40. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    yes almost every node im using is custom
    I have said before that I have overcome this specific issue.... :)
     
  41. DreamcatcherProduciton

    DreamcatcherProduciton

    Joined:
    Sep 29, 2016
    Posts:
    32
    Did you ever make that? This is perfect for what my team is trying to do.
     
  42. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    upload_2022-8-7_22-14-57.png

    "Not Assigned to MapMagic Object"

    Getting this bug fairly often which then leads to me not being able to apply the node preview to the terrain (and other issues). I have the map magic object selected in the inspector. Also tried closing the graph window again, nothing seems to help. Any ideas?

    When this happens I am also not able to set the Microsplat material directly from the graph. It gives the same info message ("not assigned to current MapMagic object")

    Edit: This bug is really frustrating because also the live update of the terrain is not working when this is happening. Currently it seems to be constantly the case in my scene and I can only update the terrain manually everytime I change something which really slows me down :(
     
    Last edited: Aug 7, 2022
  43. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Edit: Disregard this but please get back to me regarding the issue above when graphs unlink - another user has the same problem (see below)
     

    Attached Files:

    Last edited: Aug 11, 2022
  44. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    159
    someone has made this - i saw it on the discord
     
  45. Astrobinary

    Astrobinary

    Joined:
    Aug 20, 2013
    Posts:
    4
    Hey, I have been having this error for quite a long time. I have searched through the forum and discord and noticed others are as well so here I am reporting it.

    Whenever I open a graph I get the error below. Normally I would just ignore it while working on the graph but the troublesome part comes when I try to run the game while a graph is showing. I have to close/hide the docked graph in order to get into game.

    Code (CSharp):
    1. Property _Rect already exists in the property sheet with a different type: 3
    2. UnityEditor.EditorGUI:DrawPreviewTexture (UnityEngine.Rect,UnityEngine.Texture,UnityEngine.Material)
    3. Den.Tools.GUI.Draw:Texture (UnityEngine.Texture,UnityEngine.Material,UnityEngine.ScaleMode) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:1876)
    4. MapMagic.Nodes.GUI.CurveDraw:DisplayCurve (Den.Tools.Curve) (at Assets/MapMagic/Nodes/Editor/CurveDraw.cs:172)
    5. MapMagic.Nodes.GUI.CurveDraw:DrawCurve (Den.Tools.Curve,single[]) (at Assets/MapMagic/Nodes/Editor/CurveDraw.cs:49)
    6. MapMagic.Nodes.GUI.GeneratorEditors:DrawCurve (MapMagic.Nodes.MatrixGenerators.Curve200) (at Assets/MapMagic/Generators/Matrix/Editor/MatrixEditors.cs:58)
    7. Den.Tools.GUI.Draw:Invoke<MapMagic.Nodes.MatrixGenerators.Curve200> (System.Delegate,MapMagic.Nodes.MatrixGenerators.Curve200,object[]) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:1562)
    8. (wrapper dynamic-method) object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
    9. System.Dynamic.UpdateDelegates:UpdateAndExecuteVoid4<System.Type, System.Delegate, object, object[]> (System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
    10. (wrapper dynamic-method) object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
    11. Den.Tools.GUI.Draw:Editor (object,object[],string) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:1549)
    12. MapMagic.Nodes.GUI.GeneratorDraw:DrawGenerator (MapMagic.Nodes.Generator,MapMagic.Nodes.Graph,bool,bool,MapMagic.Nodes.GeneratorMenuAttribute) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:140)
    13. MapMagic.Nodes.GUI.GeneratorDraw:DrawGeneratorOrPortal (MapMagic.Nodes.Generator,MapMagic.Nodes.Graph,bool,bool,bool) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:50)
    14. MapMagic.Nodes.GUI.GraphWindow:DrawGraph () (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:361)
    15. Den.Tools.GUI.UI:Draw (System.Action,bool,UnityEngine.Rect) (at Assets/MapMagic/Tools/GUI/Editor/UI.cs:259)
    16. MapMagic.Nodes.GUI.GraphWindow:OnGUI () (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:225)
    17. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    Details:
    Fresh project (Unity 2021.3.8f1)
    MapMagic 2 Bundle (v2.1.10)
     
    exitsimulation likes this.
  46. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Can someone please explain me how to re-link a graph, so it auto updates again because this is an issue that's driving me slightly crazy. Sometimes graphs just unlink and show "Not Assigned to MapMagic Object" which breaks auto update and other functions and then after some time they seemingly randomly re-link. I would like to find the mechanic for manually invoking the relink because it's a really annoying bug.
     
  47. Astrobinary

    Astrobinary

    Joined:
    Aug 20, 2013
    Posts:
    4

    I can second this issue, it's a real flow killer. Many times I just have to restart Unity :(
     
    Last edited: Aug 10, 2022
    exitsimulation likes this.
  48. AndersonMarquess

    AndersonMarquess

    Joined:
    May 20, 2017
    Posts:
    2
    Beautiful! Did you achieve this using a custom node or just with the built-in nodes?
     
  49. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    255
    Just saw the asset got nominated. Congrats, it should be unity default for me. Any idea why im getting this in profiler?

    https://imgur.com/a/sKiILh9
     
    Last edited: Aug 17, 2022
  50. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Hello! I am encountering a really strange situation regarding the Stroke operator of Objects module. I wanna texture the terrain under certain objects (using MicroSplat for terrain shader). The stroke works fine when just using a Scatter-Adjust-Stroke setup, however, any time I am trying to additionally mask the objects with either Mask operator or Blend (Min) the nodes do not connect (showing red spline).

    Working fine without masking:
    upload_2022-8-13_15-31-26.png

    When trying to mask:
    upload_2022-8-13_15-31-59.png

    DOES NOT CONNECT when trying to apply a mask to the stroke.

    upload_2022-8-13_15-33-10.png

    Either possibilities that I tried - Mask node or Blend node do not let me connect to the Microsplat texturing node anymore :(

    Please assist @Wright. Your tools are amazing, however, they still seem to bug out in a few areas or maybe I am using it wrong here? Thank you