Search Unity

MapMagic 2 - infinite procedural land generator

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

  1. Draganovaaa

    Draganovaaa

    Joined:
    Nov 18, 2021
    Posts:
    13
    I've got another question related with the grass density. Few days ago I was testing different grass assets for our game and a density value of 10 or 15 produced great results and lots of grass on the terrain (the resolution per patch is set to 64). Today I imported few more assets to continue testing but now I need values of over 300 to even get the grass to appear on the terrain. It's not the grass asset itslef as I tried going back to the old ones which worked and same thing happens to them now too. Maybe I changed a setting somewhere without realising, any idea what it might be?
     
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Probably you have lowered Detail Density in MM Object -> Trees, Detail and Grass Properties. This value corresponds to detail density in terrain properties.
     
  3. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Oh yeah, it works! A bit differently, but the core idea of using terrain data template is still the same. Thank you for it! Going to submit it next week!
     
  4. Draganovaaa

    Draganovaaa

    Joined:
    Nov 18, 2021
    Posts:
    13
    Could it be anything esle? I changed the detail density value in the MM object but it has no effect on the grass. I tried values between 1 and 5000 and nothing changed.
     
    Last edited: Jun 19, 2023
  5. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    Curve nodes could kinda use a tooltip when hovering or adjusting the position of a point on the line to give an accurate readout of where said point is at.
     
  6. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    Complex map magic nodes can STILL fail and DIE if you change a node on the graph signifigantly in code, resulting in the following error :


    InvalidCastException
    System.Array.SetValue (System.Object value, System.Int32 index) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    Den.Tools.Serializer.DeserializeObject (System.Int32 refId, Den.Tools.Serializer+Object[] serialized, System.Object[] deserialized, System.Object[] reuse, System.Action`1[T] onBeforeDeserialize) (at Assets/MapMagic/Tools/Serializer.cs:583)
    Den.Tools.Serializer.DeserializeObject (System.Int32 refId, Den.Tools.Serializer+Object[] serialized, System.Object[] deserialized, System.Object[] reuse, System.Action`1[T] onBeforeDeserialize) (at Assets/MapMagic/Tools/Serializer.cs:633)
    Den.Tools.Serializer.Deserialize (Den.Tools.Serializer+Object[] serialized, System.Action`1[T] onBeforeDeserialize) (at Assets/MapMagic/Tools/Serializer.cs:191)
    MapMagic.Nodes.GraphSerializer200Beta.Deserialize (MapMagic.Nodes.Graph graph) (at Assets/MapMagic/Nodes/GraphSerializer.cs:60)
    MapMagic.Nodes.Graph.OnAfterDeserialize () (at Assets/MapMagic/Nodes/Graph.cs:1193)
    UnityEditorInternal.InternalEditorUtility:GetObjectFromInstanceID(Int32)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    This should maybe list the offender and remove it from the array instead of leaving us with a permanantly dead graph.
     
  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Under change a node on the graph significantly in code - do you mean custom nodes, or changing node values during generation with code?
    It's hard to say where cast exception comes from - it might be you have changed variable type and trying to load your previous graph. If not - do you have any instructions to reproduce it?

    I guess when you'll have that data the next natural step will be possibility to input it manually. I'll think of what would be the best way top do it.

    As far as I remember there's nothing else that can affect it. I have Grass Density factor implemented for 2.1.14, but not released yet. If you will drag and drop your graph to empty scene to re-create MM object - will it have different density? It's also worth trying to connect Constant node as input to make sure that the problem is not in previous nodes. After that re-creating Grass node might also help.
     
  8. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    This appears to be exclusive to editing custom nodes.
    Specifically you can almost guarantee this will kill your graph if you make the following alteration to an existing custom node that you wrote and edit while is active on a graph :

    change the type of in/out put of the node :

    Original This -> Generator, IMultiInlet, IMultiOutlet
    Change EITHER of This -> Generator, IInlet<MatrixWorld>, IOutlet<MatrixWorld>

    I believe this works equally in any direction from origin custom node to newly saved version as a graph killer.

    Original This -> Generator, IInlet<MatrixWorld>, IOutlet<MatrixWorld>
    Change EITHER of This -> Generator, IMultiInlet, IMultiOutlet

    The node ALWAYS works in a new graph just fine.
    There is a 50/50 chance that undoing the edit will restore the graph functionality, but only 50/50...

    I do try to make a point to externally save all my custom work specifically because of this error, but i dont always remember to and man when it hits cause i forgot its always at the best time...
     
    Last edited: Jun 22, 2023
  9. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    today i had a successful run at my project and figured id share :

    what i am currently working on is a 8x16 tile array that is a fully x axis wrapping planet with 11 biomes on it.

    upload_2023-6-23_12-27-59.png

    only 256 res on this...
    but 0 major anomolies with all biomes and wrapping intact makes for a win for me.

    Hang in there if you are new to map magic...that thing you wanna do with it, sure it is possible.... but you need to write your own custom nodes to bring it to reality!

    Custom coded node count :
    Written : 100 or so
    in use : ~20
     
    Wright likes this.
  10. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    I see, so you are changing the node type and it's graph behavior. Yes, this way you destroy backwards compatibility with graphs already using this node. This is expected behavior, but I will look into it and add some hacks with try/catch on deserialization maybe.
     
    Greviouss likes this.
  11. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    i know better now and all ... mostly... but aside from my not paying attention, im sure someone comin behind me will definately appreciate that not killing thier work.

    on another note...

    is there a way to manually trigger the weld action on two biome maps within a terrain grid?

    upload_2023-6-24_13-9-52.png


    i added my own terrain heights to the sub biome and it does not always like lining up.
    be fantastic if it would, sure it still needs to be close, but would look so much better if welded.
     
  12. SteenPetersen

    SteenPetersen

    Joined:
    Mar 13, 2016
    Posts:
    103
    Hello, I have a question for the MapMagic 2 developer or community. I'm interested in creating overlapping biomes similar to the ones in Valheim, complete with large oceans and around 6-7 different biomes. My initial strategy involves creating a base biome, then accurately shaping the water to form correctly sized islands. My challenge is how to overlay additional biomes onto this base biome. Could you advise me on how I can mask the additional biomes using the base biome? Is such a thing feasible within the MapMagic 2 toolset?
     
    Greviouss likes this.
  13. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    @Wright :

    I understand why this is not exactly working as i expected it to.... the biome will not read input filtered to it, just writes and then merges on top after?

    upload_2023-6-26_15-43-53.png

    Im not sure how thats actually working but what i do know is it makes texturing difficult because it will not see the input as it is and cover it as instructed in the nodes (nothing is what it should be on the exit)

    Im going to try to make a custom node for reading the inputted land data filtered to a biome, before i do, am i reinventing the wheel on this one?
     
  14. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    Sounds like what im doing.... its hard, especially if you want an accurate world wrap... but its possible.
    Im not the greatest coder, or unity developer and i managed to pull this off mostly

     
  15. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    New version, 2.1.14 is available at AS.
    Main fix it brings is enabling grass in build - thanks TheSniperFan again for finding workaround!
    Here are the other improvements:
    - Pathfinding node now can weld endpoints to fix roads at different levels
    - Exposed Scatter Mode for Grass output to fix empty grass in URP
    - Nodes have Help link in right click
    - Generator to view documentation pages
    - Unity's new Affect Density Scale support (MM object - grass settings)
    - Grass not appearing in builds fix
    - NullRef exception fix when disconnecting nodes in graphs using functions

    Could you please clarify what exactly do you mean under overlay? In case if you want, for instance, have one heightmap, but paint it differently based on biome, or want to spawn some trees in all biomes - consider using Functions instead BiomeSet. It's more advanced approach that gives way more possibilities - biome set is just a toy compared to them. It's more complicated, but if you want to make advanced things it worth it.


    Speaking of functions - what input are you providing with parent graph? Is this input generated, but does not go to function for some reason? Could you please make a screenshots of graphs you are using?
     
    protopop, TheSniperFan and Greviouss like this.
  16. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    Sent you some info in dm's, thank you.

    Also, I found a bug with right click generator -> goto the code functionality... does not seem to work on direct texture node.. opens an image(?)
     
  17. Hummy91

    Hummy91

    Joined:
    Jun 7, 2017
    Posts:
    67
    Hello. Im testing this asset out to see what it's capable of and if it would be suitable for our current project before we purchase the addons.

    Some issues we've noticed immediately which some advice on would be helpful:
    • By just following the tutorial videos and exploring the nodes, we created a 2x2 set of tiles, surrounded by 4x4 "draft tiles". This results in strange gaps/seams/raises between various tiles as seen here: from one side: https://puu.sh/JKEaR/52e8b48ba8.jpg, from the opposite side: https://puu.sh/JKEaV/9cf2b1cb50.jpg
    • Following the tutorial videos, it seems that billboard grass does not render at all, we're using Unity 2021.3.18f1 with HDRP. And the "grass" option results in solid white billboards placed everywhere, presumably a material issue?
    • An immediate concern from a design perspective was, while this tool helps immensely for quick terrain generation for surrounding terrain, what if we want to author specific areas/land shapes in certain gameplay areas, is this still achievable once the overall terrain setup is done using MapMagic?
    Thanks for your help
     
  18. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Thanks for letting me know! The link should be generated automatically, but for this particular node it doesn't work for some reason. Will look into it.

    This is odd - might it be that you have moved tile objects accidentally? Does the seams remain if you re-generate terrain?

    Billboard grass is used in demo scene - may I ask you to look whether it is working here?

    If you want to edit some area manually, and then prevent it from any change with MM you can use Lock feature (video). It will secure area within some radius on terrain from change, while other terrain will still be generated.
     
    Hummy91 likes this.
  19. Hummy91

    Hummy91

    Joined:
    Jun 7, 2017
    Posts:
    67
    We did try removing the tiles and placing them again but the odd deformations/seams remain. Oddly, when I restarted unity yesterday they dissapeared for a while and the tiles all looked perfect and matched at the edges and then this morning turning on unity and loading the same project they're back, pressing either of the generate terrain buttons has no affect on them. But the way the seams look has changed, the large flat peak side is gone and now they're just holes. http://puu.sh/JKFIi/1e58f3fc55.jpg

    There is no grass that we can see in play mode or editor mode in the demo scene. (Went into play mode with a character controller to make sure it wasnt being culled or anything). We're using HDRP Version 12.1.10 which is the latest one this version of unity can support I believe.

    That's perfect. Thank you
     
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Ah, so you are talking about billboard grass in HDRP. Can you use it on Unity terrain, without MM? Last time I checked it didn't work for me, but I didn't dive into detail.
     
  21. Hummy91

    Hummy91

    Joined:
    Jun 7, 2017
    Posts:
    67
    Ah so MM uses the built in stuff from HDRP, to my knowledge that has never worked ha. I noticed that MM has an option for "Grass" and "Billboard" (ignoring the two mesh options), is it possible for us to plug in a custom shader/material into the MM grass node to create grass?
    We have a shader programmer on hand so we can easily put together a grass billboard shader that would work for HDRP but plugging it into a system like MM is the end goal.

    On a side note, we tried using vertex lit grass with various grass meshes but they all show up without textures (solid white). We tried the demo HDRP grass meshes too, same thing. Some of these get placed in an odd stripped pattern also, no idea what that's about http://puu.sh/JKGat/7e38ba2c1d.jpg
    Ran a quick test, dragging in the HDRP Demo terrain mesh grass prefabs directly onto the terrain/scene, they render and show up fine, but when added via the grass node in MM, they're all white and in a weird stripe pattern.

    Solved this by enabling "instancing" for the grass node.

    Also not sure what that odd dark artifacting is http://puu.sh/JKGcQ/bb3a25acb4.jpg , normal issue perhaps? Just using the default terrain assets in a fresh project.

    Testing things further is proving a bit difficult at the moment, we're getting almost 100% consistent crashes when using the right click>generator>disable on output nodes like Trees and Grass.
     
    Last edited: Jul 5, 2023
  22. tanaka0123

    tanaka0123

    Joined:
    Nov 6, 2016
    Posts:
    11
    Hi,
    I've been using this great tool for my development. I was unaware of the recent update and up until now, I've been dealing with an issue where the grass wouldn't appear. However, I have successfully resolved it now. Thank you.

    Currently, I am learning how to use this tool following Tutorial 3 from this link:


    I encountered an issue when using Scatter: some of the trees are appearing as if they're covered in white paint. Could you please advise on this?
    upload_2023-7-6_15-56-35.png

    Also, in the tutorial video it looks like the scatters are somewhat contained in the Terrain, but in my project many of the trees seem to be outside the Terrain.
    Should I be aware of this?

    Tutorial Project:
    upload_2023-7-6_16-19-46.png

    My Project
    upload_2023-7-6_16-22-5.png

    Settings used
    upload_2023-7-6_16-22-15.png

    I am using Unity 2022.3.4.


    This is slightly off-topic, but it seems there's an issue with the graph nodes not being draggable. Is this issue currently being addressed?
     

    Attached Files:

  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    MM always scatters objects outside terrain - it's called "Margins", and made for more or less proper tile welding. Outside objects are not actually applied to terrain, but their markers are displayed for visibility in case you will use stamping or flatten tool. Tutorial uses low margins value, but if I'm not mistaken there are still objects visible out of all sides:
    upload_2023-7-6_11-16-55.png
    You seem to be using bigger margins, so the effect is more noticeable.

    Trees are just demo assets - they are using the shaders that work in standard RP. If you are using HDRP or URP you can change tree material shader to standard one to display trees properly (will require scene reloading to update terrains).

    It's not what I'm aware of. Is there any way to reproduce it?

    Hmmm, yes, looks like normal map artifact, maybe something about compression. Does this happen with all the textures? Can you please check any non-MM textures?

    If you have reliable chance to reproduce it - could you please email be your scene, your graph and their meta-files? May I also ask you to add comment/group in graph displaying what node to disable?
     
  24. tanaka0123

    tanaka0123

    Joined:
    Nov 6, 2016
    Posts:
    11
    Then it seems we don't need to worry too much about it.

    Thanks.
    I applied URP shaders and got the expected results.
    upload_2023-7-6_18-30-26.png



    Sorry. I didn't communicate it well.
    The node itself is draggable.
    However, when I try to select a range of nodes by dragging, the range selection mark does not appear and I cannot select multiple nodes, which is a little inconvenient.
    As for how to reproduce, I downloaded/installed the MM2 Bundle package and did not do anything special.
    I am using the 2022.3.4 LTS version of Unity.
     
  25. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    @Wright
    node previews show the margin data on the previews,
    that can make it difficult to pinpoint a location cause you cant actually see on the one tile where the edges are at,

    while on the topic of precision map troubleshooting and feedback tools - it would be cool if there was some way to "ping" the preview <-> map point, so for example :

    in the map preview window if you middle click a pixel - and it lights up that pixel on the node preview and editor map live preview overlay... this would make hunting down the area your trying to find really easy to find.... sure some instances are really easy to tell what your looking at, others are much less subtle.

    Wrapping up a previous thing - A while ago i mentione a tooltip overlay for the curve window to tell you where your at, alot of people have lolded at me for using unity curves, and i somehow forgot that one of the main benefits of using unity curves is that they give you an insane precision as well as zoom capabiliy in thier detail window where normal curve nodes do not. So I'd consider that as solved :p
     
  26. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    this happens in 2020.3.48f1 and nearby editors - i dont think its the shader

    Preview is just generally semi broken for me....

    if you click to apply a HD terrain - you recieve an error that there is not a preview selected.... if you dont have one and its not processed FIRST.
    to actually get preview - the button is not working, you have to select the tile, then select mark as preview then go back to mm obj
    THEN - HD pass that ONE tile, then you can make the rest hd and all is fine

    It didnt always work this way :)
     
  27. tanaka0123

    tanaka0123

    Joined:
    Nov 6, 2016
    Posts:
    11
    I would like to use Infinite Terrain, but I want to fix a portion of the terrain.
    I would like to start with my own custom terrain, use terrains generated by Infinite Terrain for the 2nd to 9th terrains, and use my own terrain when I reach the 10th terrain. I think this would require a special implementation, but can you give me a hint as to which class I could access to make this happen?

    By the way, what is the function of Export Cluster?
    It is not mentioned in the documentation and there seems to be no response when I press the button.
     
  28. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    You probably can code some custom logic nodes to achieve this - the issue you might run into that will be the biggest headache is edge welds when your custom import data edge hits the procedural edge... on the plus side, you can overcome this with more custom node logic i think....

    As for the second part of your post... There are a series of nodes like the plethora of map sets nodes that have no description on how to apply or what to expect from them, so i second this question ...

    @Wright - what it do dev?
     
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    You mean frame selection to select multiple nodes? Are you dragging with Shift pressed?

    Sorry, I got confused in the explanation. May I ask you to write steps to reproduce it, like 1., 2., 3., what do you expect at the end, and what you get. It would be handy if you could mention details like Unity version and render pipeline just to keep all in one place. You can email it to me (or post here).

    Possibly Locks are what you are looking for (video).

    Oh, it's leaked from the cluster system I'm currently working on. It's not ready yet, and thus not documented. Export Cluster works, but it makes no sense to use it without the rest of the system :p
     
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Map sets - these ones? You can find brief usage example in Brush video.

    But where did you find "plethora", I don't remember making anything like that.
     
  31. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    upload_2023-7-13_23-42-43.png
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Oh, I thought you were talking about a node named Plethora. My bad. This could be object node to generate dense grass bushes or something.
    Speaking of map sets - these nodes do exactly the same as Map nodes - they use their code actually. But they are processing several maps at once. This was made to make a processing operations for Brush module, and mainly used in Brush. It reads all the terrain textures as a map set, do something with all of them - or get a single map from set and process it - and then write back as a map set. They go best with the Brush, but could be used in other graphs as well.
     
  33. tanaka0123

    tanaka0123

    Joined:
    Nov 6, 2016
    Posts:
    11
    Indeed, with the Lock function, when you go from one starting point to another and return, the target object will be there as expected.
    upload_2023-7-18_16-52-50.png


    Is it possible to place this lock target somewhere in the destination? Currently, it appears that this feature can be used for pre-visible terrain, but it is not possible to place it somewhere in the destination and have it track the height of the terrain.

    upload_2023-7-18_17-2-9.png


    Okay, looking forward to the release of the nice features.
     

    Attached Files:

  34. tanaka0123

    tanaka0123

    Joined:
    Nov 6, 2016
    Posts:
    11
    Oh, did you need the Shift key?
    Thanks.
     
  35. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Sure, you can pin terrain here and use lock on it.
     
  36. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    @Wright - do directtexturearray outputs cover the active area of a tile or the active area + margin area?
     
  37. tanaka0123

    tanaka0123

    Joined:
    Nov 6, 2016
    Posts:
    11
    Oh, with this, it definitely seems achievable.
    One thing I was wondering, if you create large maps, I assume they will be hidden and waiting.
    Do you have any information on performance?
     
  38. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Active area only - it is easier to transform terrain position to read pixel. To read texture out of tile bounds neighbor tile can be used instead.
    TexturesOut.cs, line 647, creates color array to apply to texture in main thread later:
    Code (CSharp):
    1. colors[textureNum] = new Color[data.area.active.rect.size.x * data.area.active.rect.size.z];
    They will be just disabled. It won't affect graphical performance, but scene size and loading time will be increased.
    However, if you pin, for example, only two tiles distant from each other - all the tiles between them will be generated, not loaded, won't be stored to scene and won't affect it's size.
     
    Greviouss likes this.
  39. Tarmack

    Tarmack

    Joined:
    Dec 16, 2016
    Posts:
    12
    Hi, we have been working a lot with your tool, and first of all i would like to say that it is amazing. Great Job on it.

    We have actually encountered a thing that we consider a massive issue on our usecases.

    Generations of the same Graphs, with Same seeds and same everything in data setup.

    Lead to differences between 2 clients.

    We are working on a multiplayer game, where a server generate the map, and then when client connect on the server, it send the Seed and all of that stuff to the said client, who will then initiate a Map generation using all same data of the server and same seed.

    The thing is we end up at then end seeing (visually without paying close attention) almost the same result.

    But as our game is Server Authoritative, we got notified instantly when climbing slopes and things like that.

    This is how we have discovered the issue, we have tested a lot of things, and ended up seeing some weird data on the 6-7th decimal number, for example a height pixel on Client would be 0.25487635 and on Server would be 0.25485896


    We have tested it to every Graph node we used to see if it was coming from us, but ended up seing the "Noise200" Graph is actually one of the issue, we haven't found every single Graph that occur these kind of differences.

    But i belive, This is a good start for you to be able to Debug / Investigate.

    An easy usecase would be to setup ParrelSync on a Unity project using MapMagic, and compare from the same project the differents texture map.


    If you have any idea on how to fix this we would be highly gratefull.
    Other option we have would be to send all the HeightMaps / Terrain etc on the Client and regenerate all of that with our own thing, but that would be really sad to loose the power of MapMagic for our clients.
     
  40. wangtonghe66

    wangtonghe66

    Joined:
    Aug 3, 2023
    Posts:
    2
    Hello magicians, I am a beginner who has just started to learn this magical plug-in. Is there any good solution for adding lake water?I've been trying to find a tutorial, but I can't find it, if there is a good way, please let me know, By the way, besides this, I also want to add caves. I saw that a new cave has been added in the wiki, but the picture cannot be displayed. This makes me very confused. I also hope that some magicians who have tried can help me answer how Use Holes. Thank you so much
     
  41. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    172
    And im back here at this specific 'need to find a solution for' item again....

    if we were to assume that there was a custom implementation for handling the generated worldmatrix by an individual dev implemented removing from the scope of need any must have checks there (that do make sense, but all in all not for this) and instead specifically looked at how do you generate a temporary worldmatrix in code that mm will treat as a higher res world matrix...
    with my specific need if i were to need it later, i would cache the matrix and call it directly down the graph some, but again im at a point where i need to simulate the existance of a higher res tile, and i cannot figure out how to generate the higher res worldmatrix while doing a draft pass.

    I dont need an out of the box solution, or a pro solution, just the solution that c# will accept and compile.

    I think this exists even in the tiledata, im just not sure how to tell it to access the full variant and not the draft portion.
     
  42. jpileborg

    jpileborg

    Joined:
    Jan 5, 2013
    Posts:
    33
    I'm playing with MapMagic 2 (version 2.1.14) and the NatureManufacture Meadow Environment but have problems with the grass textures.

    Take for example
    T_grass_meadow_01_A_M
    which seems to contain six different grass textures in one image. Two which are on a much higher level than the other four (which aren't aligned to the bottom of the image).

    MapMagic will display the image as is, it seems, so all the grasses will float a little above the ground. With some quite a bit (and very noticeable) above the ground as seen in this image:
    upload_2023-8-5_19-5-15.png

    The grass output node is very simple:
    upload_2023-8-5_19-8-17.png

    Changing mode doesn't help.

    Is there a simple way to use the NatureManufacture dynamic nature assets with MapMagic 2?
     
  43. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Does generate different value each time you generate land, or is it always the same for client and same for server? If so - what is different on server platform? Is it Linux server, or does it work with disabled c++ code?

    It depends on the way you make lakes. If is a global water plane, and all the lakes are at the same level - then you can treat underwater with selector node make shoreline with ledge and beach. If your lakes should be on a different level then you've got to spawn water plane in each of them - to do so you can use object output that spawns plane prefabs. To prepare input for it you can use slide and then rarefy to leave only one central object. And again you can use ledge/beach to create shoreline.

    I'm terribly sorry but I don't follow what exactly you have in mind. Maybe any use case or example?

    It seems not, unless NatureManufacture authors made it to work with MM. Unfortunately I have not, but I will consider this at some point since it's pretty popular and quality asset.
     
    jpileborg likes this.
  44. jpileborg

    jpileborg

    Joined:
    Jan 5, 2013
    Posts:
    33
    Oh well that's unfortunate. Well, there are other grass textures to use (not always as good, but still) so I'll get by one way or another.

    At least trees work as expected. :)
     
  45. wangtonghe66

    wangtonghe66

    Joined:
    Aug 3, 2023
    Posts:
    2
    Thanks, I'll try it.
    So how to use Holes? Is it the function of opening a walkable cave on the mountain as I understand it?
     
  46. Tim-Wiese

    Tim-Wiese

    Joined:
    Jul 7, 2012
    Posts:
    77
    Have you looked in floating point error? The further you get from 0,0,0 world space position the more floating point error comes up.

    https://forum.unity.com/threads/floating-point-error.643057/
    https://www.reddit.com/r/Unity3D/comments/ijwfec/the_further_you_are_from_000_the_messier_stuff/
     
  47. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    This node paints default terrains cut-outs, these ones. Yes, it is required to make a passage through the terrain to the cave.

    As far as I understand there's not a big chance that it's related. Most probably it's computational difference on different machines, probably even when applying terrain, not even during generation. But I'm curious whether there is a way to reproduce it.
     
  48. daspete01

    daspete01

    Joined:
    Aug 19, 2015
    Posts:
    14
    Hi there, i have a strange issue with the newest version of MM2....

    There is no more interlinking between scattered points.

    How to fix this?
    upload_2023-8-9_15-50-41.png
     
  49. XByte

    XByte

    Joined:
    Sep 19, 2014
    Posts:
    1
    Hi Dennis,

    i have a problem with Unity 2022.2.5 URP and MapMagic2 2.1.14.
    The preview of a Noise or other nodes don't show on the terrain.

    upload_2023-8-10_9-47-29.png

    I fixed the shader like in the post from TheSniperFan, but no luck.
    upload_2023-8-10_9-42-15.png

    Some idea ?

    Greetings
     

    Attached Files:

  50. gurayg

    gurayg

    Joined:
    Nov 28, 2013
    Posts:
    269
    Hi,

    I started testing MM2 for a project.
    I'm using Unity 2022.3.4 with latest MM2 on the UAS.

    I have a tile of terrains and I need to make sure a manual spline node with multiple spline points can be placed across terrain tiles to flatten some areas on terrain tiles. This needs to be on runtime.
    I had some trouble with manual spline nodes across tiles creating seams but I want to ask it on another post if I still have it.
    Then I decided to use just a basic Constant node

    Screenshot 2023-08-10 130406.png

    And when I change the constant value. I'm still getting seams

    Screenshot 2023-08-10 130434.png

    That made me think, I may have some other kind of problem.
    Auto connect is on, Interpolate doesn't fix the seam. Project is in linear space.
    I just used the "Pin new Tile" to add new terrain tiles. Everything else is default.

    If it doesn't happen for you. Try lowering Tile size and Main resolution.
    You can try tile size 100 and resolution 65

    I guess this is happening because of neighboring.
    I sometimes see "Right neighbor of the terrain has a different heightmap resolution. Stop neighboring."
    warning.
    If I disable "Use Draft Terrains in" Editor and Playmode and hit Generate button after I get the results with seam. It fixes the seams. Meaning I'm rendering twice to get correct results.
    That's why I think I'm missing something.
     
    Last edited: Aug 10, 2023