Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

MapMagic 2 - infinite procedural land generator

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

  1. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    Just a note - "Not Assigned to MapMagic Object" displays when the the graph in graph window is not used in scene anywhere.

    Graph window is per-asset. It's not bound to scene. You can edit other graphs, biomes or functions regardless of what scene you are using. When you open the scene with MM object it won't assign MM graph to graph window (and it shouldn't by design). You won't be able to edit sub-graphs otherwise. Treat it like Animator or any other asset-relative window - if you have a scene with animation controller assigned to some object it won't open it in Animator window. You might switch between different scenes with different MM graphs, but the same graph will be opened in graph window. And regarding on whether it is used in scene or not it will draw a gauge or "Not Assigned to MapMagic Object".

    exitsimulation, Astrobinary If this caption persists while the graph is 100% used at currently opened MM's top level then it's definitely an error, and I will appreciate if you could describe the steps to reproduce it.

    May I ask you to clarify: are you talking about "Not Assigned to MapMagic Object" issue or something else?

    Thanks for reporting this issue! I have already fixed it for upcoming MM version, but I appreciate you letting me know about it anyways.

    Thank you. MM didn't win though, but it was nice to be nominated :)

    Seems to be Unity's terrain is waiting for the other thread to apply heightmap. I'm curious what this thread is, and how it's related with trees. If you could shed some light on it I guess it might help other users.

    You might be trying to create an endless loop. The link turns red if you are trying to link generators that already depend on each other in opposite direction. Sometimes this dependence is not explicit, and could be passed via portals.

    Might it be that Blend or Mask nodes rely on MicroSplat output somehow (i.e. have is as a child node) - possibly through portals?
     
  2. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    I am creating a new scene with Map Magic 2 and following the tutorial here :


    I am getting Unity crashes in all sorts of places when trying to follow the tutorial and I have no idea why :/ I got a crash when connecting the noise and height modes, i got another crash when hitting generated on a mapgraph, i even got a crash when adding a new graph to the scene. Is there something wrong with MapMagic 2 and this Unity version maybe ?

    Here is a paste of the crash i got when trying to add the mapGraph to the scene:

    https://pastebin.com/qFR3HTAn

    I also see this error on my console when selecting the MapGraph:

    [Error] Property _Rect already exists in the property sheet with a different type: 3
    UnityEditor.EditorGUI:DrawPreviewTexture (UnityEngine.Rect,UnityEngine.Texture,UnityEngine.Material,UnityEngine.ScaleMode)
    Draw.DrawGrid() at /MapMagic/Tools/GUI/Editor/Draw.cs:2480
    2478: gridMat.SetVector("_Rect", new Vector4(displayRect.x, displayRect.y, displayRect.size.x, displayRect.size.y) * dpiFactor);
    -->2480: UnityEditor.EditorGUI.DrawPreviewTexture(displayRect, StylesCache.blankTex, gridMat, ScaleMode.StretchToFill);
    2481: }
    Draw.StaticGrid() at /MapMagic/Tools/GUI/Editor/Draw.cs:2439
    2437: //displayRect.size *= dpiFactor;
    -->2439: DrawGrid(displayRect, dispCellSize, dispOffset, color, background, 1, 0, fadeWithZoom);
    2440: }
    GraphWindow.DrawGraph() at /MapMagic/Nodes/Editor/GraphWindow.cs:284
    282: #endif
    -->284: Draw.StaticGrid(
    285: displayRect: new Rect(0, 0, Screen.width, Screen.height-toolbarSize),
    286: cellSize:32,
    UI.Draw() at /MapMagic/Tools/GUI/Editor/UI.cs:259
    257: {
    258: for (int i=0; i<afterDraws.Count; i++) //count could be increased while iterating
    -->259: afterDraws.action();
    260: }
    GraphWindow.OnGUI() at /MapMagic/Nodes/Editor/GraphWindow.cs:225
    223: else
    224: using (new UnityEngine.GUI.ClipScope(new Rect(0, toolbarSize, Screen.width, Screen.height-toolbarSize)))
    -->225: graphUI.Draw(DrawGraph, inInspector:false, customRect:new Rect(0, toolbarSize, Screen.width, Screen.height-toolbarSize));
    227: //toolbar
    GUIUtility.ProcessEvent()


    I can't do anything unfortunately, whatever I am trying i keep getting crashes :/
     
  3. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Thanks for getting back to me. I really appreciate you taking the time to answer these questions and having this support channel for your tools. Other asset store creators often don't seem to care at all (had some bad experiences with other vegetation tool developers lately).

    Yes sometimes this bug occurs with a graph open that is definitely present in the current scene. I will try to recreate when it happens exactly and let you know. For now what is helping me most of the time is to double click again the asset of the current graph in the Project window.

    Yes this was regarding the "Not Assigned" issue

    Thanks I tried again today and this helped! I think the mask was partly relying on the Microsplat output as you suggested.
    -------------
    Another issue: Apologies, but I have another thing that I wanted to bring to your attention. When using the Trees node it's currently not possible for me to use Terrain Normals. The switch on the node only rotates the object along the Y-Axis. Using the Objects node for testing purposes however produces the right results.

    Trees Node with Terrain normals = Trees not aligning with slope:

    upload_2022-8-14_15-14-20.png


    Objects node with Terrain normals = Trees aligning to slope normals properly:

    upload_2022-8-14_15-16-25.png

    This a test setup (I don't wanna actually place trees on the slope like this but I need to align with terrain normals for other purposes and it's not working).

    I am attaching a gif which demonstrates how the "Terrain Normal" switch just rotates the tree along the y-axis. I'd highly appreciate your help. Is there an issue with my setup?

    Best regards!
     

    Attached Files:

  4. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    I can't reproduce this issue in passing. What is your Unity version? Does it crash every time you connect Noise to Height (or 1 of 3 times, 1 of 10)?

    May I ask you to try this: MatrixInitial (in MapMagic\Generators\Matrix\Runtime)? It's not a fix, but at least an attempt to find out if it's caused by some MM logic or C++ noise function (log doesn't provide this information).

    I've fixed _Rect error for the next version. Going to submit new version as soon as find out why MM crashes.

    If you are using Unity impostor (billboard) trees - they could not be rotated at all in any axis. Unity automatically treats trees as impostors if they don't have LOD group (and probably other game objects inside prefab, but I'm not sure about this). Unfortunately it's Unity limitation, it's the way it works. Probably it's related with optimization - impostor trees are way faster other trees even in close non-billboard mode.
     
  5. Astrobinary

    Astrobinary

    Joined:
    Aug 20, 2013
    Posts:
    4
    I was able to recreate the issue in a fresh project using latest MapMagic bundle.
    1. Open any demo scene (ex. Badlands)
    2. Click on MapMagic object in hierarchy then press the folder icon to open the current graph's window
    3. While graph is open/docked replace graph with any other graph
    4. Repeat step 3
    5. Press the folder icon on the mm object to open current graph

    The issue presents itself between steps 3 and 4. Changing graph consecutively on the MapMagic Object without opening new graph (clicking folder icon) will lock any future graphs with "Not Assigned to MapMagic Object". Hope it helps, if my instructions are still unclear, I can create a short clip as well.
     
  6. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144

    I am using 2021.3.6f1. It crash like 1 out of 3 times or so there, but it crashes in other spots too. Like when a add the graph to the scene at times. It's kinda random. Let me try this fix that you are proposing and I will come back with the result, thanks !
     
  7. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144

    OK, i replaced the file and did the whole thing again. Here is the full editor.log :

    https://pastebin.com/h58yTu0p

    It did crash now when connecting the two nodes.

    ----------

    Obtained 19 stack frames.

    #0 0x0000015756c6a0 in lookup_pinvoke_call_impl

    #1 0x0000015756d1aa in mono_lookup_pinvoke_call_internal

    #2 0x000001573679e1 in mono_jit_compile_method_with_opt

    #3 0x000001573ef209 in common_call_trampoline

    #4 0x000001573eec37 in mono_magic_trampoline

    #5 0x0000010e54d396 in (Unknown)

    #6 0x000001974a3d83 in Den.Tools.Matrices.Matrix:Fill (single) [{0x7f95c52632d0} + 0x33] [/Users/spyros/Documents/Unity/One Man Show/Assets/MapMagic/Tools/Matrix/Matrix.cs :: 1056u] (0x1974a3d50 0x1974a3d88) [0x151002a80 - Unity Child Domain]

    #7 0x00000191b9664a in MapMagic.Nodes.Graph:Finalize (MapMagic.Products.TileData,MapMagic.Products.StopToken) [{0x7f95d259b360} + 0x9a] [/Users/spyros/Documents/Unity/One Man Show/Assets/MapMagic/Nodes/Graph.cs :: 951u] (0x191b965b0 0x191b96673) [0x151002a80 - Unity Child Domain]

    #8 0x00000186362c47 in System.Threading.ThreadHelper:ThreadStart_Context (object) [{0x7f95cf1d71b0} + 0xa7] (0x186362ba0 0x186362cc9) [0x151002a80 - Unity Child Domain]

    #9 0x00000152844b6b in System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [{0x7f95d0cad388} + 0x2b] (0x152844b40 0x152844b70) [0x151002a80 - Unity Child Domain]

    #10 0x0000015736bd1c in mono_jit_runtime_invoke

    #11 0x0000015752133b in do_runtime_invoke

    #12 0x00000157522e45 in mono_runtime_delegate_try_invoke

    #13 0x000001575421e0 in start_wrapper_internal

    #14 0x00000157541fb1 in start_wrapper

    #15 0x000001575bf309 in GC_inner_start_routine

    #16 0x000001575bf2a1 in GC_start_routine

    #17 0x007ff8089674e1 in _pthread_start

    #18 0x007ff808962f6b in thread_start
     
  8. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    @Wright Is there something specific i can show to shed light? This is the nodes. https://imgur.com/a/QuItTwW
    I use the unity basic assets trees with default settings. I removed trees, grass, disabled infante terrain, problem remains.
     
  9. Turniper

    Turniper

    Joined:
    Nov 2, 2013
    Posts:
    15
    I'm trying to get my existing mapmagic w/ biome set situation transitioned from the default hdrp terrain shader to microsplat and running into a weird, annoying issue. The microsplat output node seems to be somehow 'unstable' in that, when I create one in my graph, it tends to turn into one of these: (UNKNOWN Node)

    I'm running the latest versions of Mapmagic and microsplat on Unity 2021.3.8f1. The issue occurs intermittently when I run my game process that sets a bunch of seed values, but can be easily triggered by just creating a microsplat output node, doing any operation, then hitting control-Z.
     
  10. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    I not using impostor trees. I am using trees with an instanced shader for optimized rendering with Nature Renderer and I am also using this nodes for other (non-tree) objects because with Nature Renderer it renders really efficiently a ton of objects, however, no matter what object I put in there the slope normals are not getting applied.

    I even tried it completely without Nature Renderer and with the example trees from your package (without any instanced shading) and the normal are not getting applied. Please also see the gif in my last post where you can see how the tree just rotates around the y-axis when flipping the normal switch. Thank you!
     
  11. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Any ideas by any chance @Wright ?

    Let me know if i can provide any other info to help with the fix, i'd love to be able to use MM.

    Thanks !
     
  12. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    Thanks for describing steps to reproduce! I've followed them and fixed this issue for upcoming version.

    Got it, will try to reproduce this and fix for upcoming version.

    Haven't you noticed when exactly it becomes Unknown? I will try to fiddle with MS output on my side and reproduce it myself, however if you already have instruction it will help a lot.

    Will try to fix it, however can't guarantee if the fix will be in upcoming version - it already got many fixes that are waited by others.

    Okay, so it seems to be not C++ noise. May I ask you to try to disable C++ completely in Window - MapMagic - uncheck C++ native code?

    What issue are you talking about? It would be quite convenient if you could link it in Reply in a message to track what's it about faster. Thank you!
     
    Astrobinary likes this.
  13. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    @Wright

    After i disabled the C++ Native code, I haven't gotten a crash yet ! The noise->height combination also worked normally and I do see the generated map too.

    Is this to be expected ? I will let you know if i get a new crash.
     
  14. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    @Wright this issue. Also is it possible to manipulate nodes from script?
     
    Last edited: Aug 17, 2022
  15. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    Do you get it every frame, or only on creation of new terrain?
    What resolution do you use? What is your Unity version? Anything specific about the nodes or MM setup?
    At first glance I could not reproduce anything like 50ms lag, so will appreciate if you could provide more detail on this.

    You can change node values by accessing them in graph with their ids: FAQ

    Okay, so it's still related with C++. I will really appreciate if you could find a reliable way to reproduce it - at least on your PC.
     
  16. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Basically it's very easy to reproduce it on my mac, but it is not always on the same spot. The moment you enable this C++ option, it basically crashes either at connecting nodes or just plain adding the graph to the scene, or even clicking on the generate button of the graph. That doesn't happen when the C++ Native is off :/ But it crashes every time I reopen Unity and do the same things.
     
  17. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    I tried 512 and 1024 resolutions. It happens in every frame. I use latest LTS. I have a link with the nodes in my last post. Its probably my ancient GPU - GT 330m
     
  18. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Hello Denis!

    I am encountering a very strange bug when building my scene to a stand-alone DX11 Windows Build. I am using Unity 2021.3, HDRP12.1.7 and Map Magic 2, together with Nature Renderer. In Unity everything runs fine, however, the build runs with only ~2 FPS, very heavy rendering bugs (black streaks all over the screen):

    upload_2022-8-19_16-32-43.png

    The profiler gives me this
    upload_2022-8-19_16-33-51.png

    A process in MapMagic (Gfx.ReadbackImage -> Semaphore.WaitForSignal) is taking up 96% of the rendering time and taking over 300ms (sometimes up to 500ms) per frame to execute.

    This issue goes away when I disable Nature Renderer which is why I am also filing a bug report with them. However, I would appreciate your input if you have any idea what might be going on here.

    Thank you!

    EDIT: This seems to be a problem with a detail (grass) mesh. Applying any grass as Mesh Vertex Lit together with Nature Renderer seems to break. However not technically a Map Magic problem I think.
     
    Last edited: Aug 19, 2022
  19. LuciferDreams

    LuciferDreams

    Joined:
    Oct 8, 2019
    Posts:
    6
    Hey I need some help, well Im not that good with programing but I wanted to add more generators to be specific I wanted to add the Fast Noise can someone help me or guide me how to do it?
     
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    You can create your custom node and call Fast Noise functions from here. However as far as I can see most useful noise type are already in MM, and using C++ (and SIMD when possible) as well.

    Thanks for sharing your findings! I'm not sure that I can speed up Nature Renderer grass apply time, but if by chance I find a possible workaround I will implement it in MM.

    Liminal-Ridges, might it be the same problem you have? Are you using Nature Renderer?

    Can I ask you to do some testing? This will help me a lot to at least to find out whet to look at.
    Does the issue occur when you are using only two nodes: noise and height, and use modified MatrixInitial I linked previously?
    Thank you!
     
  21. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Hi, yes it does happen when linking these 2 nodes and the modified script you sent me.
    It stops happening completely when i uncheck C++ though, no crash after that.
     
  22. LuciferDreams

    LuciferDreams

    Joined:
    Oct 8, 2019
    Posts:
    6
    yeah the type of noise are good on MM2 but Ive been trying to get the voronoi diagrams in to MM2, Ive looked in to the scripts of MM2 and found where the noise is defined and start from there as reference but after some tests I still have no results.
    Basically I just needed to implement some kind of voronoi diagram and the ones of Fast Noise are really flexible, Ive checked your link but still cant achieve the results.
     
  23. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
  24. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Yes looks like the same problem I am encountering. Are you also using Nature Renderer together with MM2?
     
  25. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    No only MM2, but my problem is because my gpu is S***. so the cpu needs to wait for the rendering
     
  26. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    New version 2.1.11 is currently available. It brings these changes:
    - Crash on Spline Stamp fix
    - "Not Assigned" display fix (when graph is actually assigned)
    - "Property _Rect already exists" error fix
    - Graph window resize issue fix
    - Fixed error when no camera in scene
    New features:
    - Objects Randomize node
    - Objects Read by Tag node

    Do you need some help with this? Have you tried making a generator that just prints something in console or makes terrain flat?

    As far as I understand it's just CPU waiting for GPU to finish frame. Some say that disabling multithread rendering might help.

    I believe Nature Renderer utilizes GPU so hard that the problem appears on usual devices as well.
     
    Liminal-Ridges likes this.
  27. amprost

    amprost

    Joined:
    Sep 12, 2020
    Posts:
    3
    How did you fix this?
     
  28. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
  29. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    @Wright any idea why projectors dont work on MM2 terrain?
     
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    MM uses the standard Unity terrain. Do projectors work on it?
     
  31. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    No :/ it works on meshes but not on the terrain. I tried changing the terrain material but nothing. Maybe its some setting?
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    IDK, I suppose it's not supported by Unity.

    Just to clarify: you tried it on the standard terrain, created manually, not with MM?
     
  33. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    Tried with both, MM doesnt work for some reason
     
    Last edited: Aug 25, 2022
  34. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    75
    if you are only considering infinite terrain then this is true.
     
  35. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    Last edited: Aug 26, 2022
  36. PrimeAlly

    PrimeAlly

    Joined:
    Jan 2, 2013
    Posts:
    35
    Is it possible to export the splatmaps generated by MapMagic 2? I've tried to export using Terrain Toolbox and MicroSplat but only get a uniform image (no data). I guess there's some magic needed here? :)
     
  37. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    75
    this
     
    Liminal-Ridges likes this.
  38. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    75
    Can you please take some time looking into how mm handles errors,

    Finding errors requires alot of quad click backtracking, and unity defauts to your error line with links,
    I feel like theres a way to pass the inner error to unity console, and not the map magic generic thread error that we get now.

    ive tried like this with limited luck, maybe some supa coder can help me fix this for proper error reports?
    Code (CSharp):
    1. Debug.LogError("Thread failed: " + e.Message + "\n" + e.GetBaseException().StackTrace +"\n" + e.InnerException);
     
  39. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    @Wright any idea why infinite terrain doesnt apply the trees?

    UPDATE: stopped working at all

    also why is this happening https://imgur.com/a/QEUkCwh
    ive done the nodes as you said in the manual
     
    Last edited: Aug 28, 2022
  40. PrimeAlly

    PrimeAlly

    Joined:
    Jan 2, 2013
    Posts:
    35
    If anyone is wondering, the splatmap export works if you use the textures node in MapMagic 2 to apply your texturing (and not a MicroSplat node).
     
    Last edited: Aug 28, 2022
  41. focuslabstudios

    focuslabstudios

    Joined:
    Feb 23, 2018
    Posts:
    35
    Hi! I'm using GPU Instancer together with TVE. I've ran into an issue with it...
    Basically I'm using TVE for all my vegetation and TVE does not support 2d texture grass.. Since I'm generating grass based on microsplat output (to generate grass on a specific splat) I use the 2d grass map node. However since TVE does not support 2D Grass I'd like to generate grass prefabs instead but I find myself stuck on this part..

    How can I efficiently generate grass prefabs to fill up a specific texture map? When I used VSP before I simply outputted it to a VSP map and that fairly efficiently generated grass prefabs that filled up the given texture map.. I've scrapped VSP because of how slow it is to generate new tiles tho.. Is there a similar way to do this with GPUI instead?

    I tried to use the scatter node together with an object mask node but I have to set scatter density to like a 100,000 to make the grass event remotely dense and that ofc is terrible for performance.. I feel like I'm missing something? Has anyone had this issue before? @Wright
     
    exitsimulation likes this.
  42. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    Yes, if these are spawned prefabs it will be extremely slow. I have not worked with GPUI, but I believe there should be something it works with - like Unity terran works with trees by unifying them in a patch. What does GPUI use instead of individual objects?

    Could you please try demo scenes that come with MM - will the trees be applied here on infinite terrain on your system?

    May I ask you to clarify what exactly is happening? Some gradient from left to right on tiles? Are you using Simple Form node with size of a tile?

    How wide is the road? If it is comparable to the grass plane width then it might have spawned at non-road pixel.

    You can select terrain and export RAW heightmap the usual way it could be done in Unity.

    I usually just attach VS to Unity. This way you can see all the variable values at first glance, and find out what exactly gone wrong. But even I don't want to bother attaching I don't have issues finding out here it comes from. Don't remember how was it exactly - got no error at hand to remind it. Could you please paste full error log to see it?

    MicroSplat output can still generate splat maps if you switch apply type to Both.
     
  43. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    75
    impossible to track to the actual problem :
    upload_2022-8-30_14-22-1.png

    ^ this completely kills graphs dead and theres zero info pointing to what actually causes it
     
  44. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    75
    upload_2022-8-31_1-44-58.png
    my mod to your error message atleast gives me direction to look when theres an error closer to the top of the error message.
    However clicking that to find the error in code still does the default action and takes me to threadmanager.cs <--- THIS IS ANNOYING AF!!!

    The IDEAL setup returns the exact error point where the error was created along with nav click links - the way a log message does in modern unity
    upload_2022-8-31_1-48-25.png



    I spend alot of time working on custom nodes and these little quality of life things I have been coming up with lately are the things that would make life better for me when doing so, armed with that i am reasonably sure these things would make it better for those who are not coding gurus or generally less versed in the codebase coming in green through the front door..


    My aim is to make it easier for more adept / neophyte level coders to be able to approach custom nodes
    I cant actually DO that, i can only relay and see what you do, and you as the pro coder can of course set the standard by your capabilities and let all those less talented than you just figure it out over time. /shrug
     
    Last edited: Aug 31, 2022
  45. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    I have it working on my side project, but haven’t cleaned up the code to make it an add-on yet. Wasn’t sure how much interest there would be.
     
  46. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    242
    Hey sorry for the many questions, i managed to solve all of them except the biome one. My problem is that the transition from biome 1 to biome 2 should happen somewhere in the middle of the tile but it happens everywhere. both sides have both biomes. Can i make the transition not so wide? Like this https://imgur.com/a/ZyBw0BU
     
  47. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    75
    you need a gradient height offset to define where the change occurs
     
    Liminal-Ridges likes this.
  48. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,178
    Speaking of errors - may I ask where it comes from? Is it my fault and I messed up somewhere? If so it is me who should del with it (but I appreciate if you could describe the steps to reproduce).

    If you are writing your own node - I recommend disabling multithreading (checkbox in MM object), this should make this error occur in main thread, and it should be treated as a regular script error.

    If you want to make your gradient more contrast you can connect the Contrast node right after the gradient, and raise the contrast value.
     
    Liminal-Ridges likes this.
  49. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    75
    Definately is my code writing failing generating such errors, thats for sure :), but custom logic node writing is hard and i expect to fail 500 times and errors are the result of that...What i am aiming to impart is that yes sure your error handling works, and does exactly what you would expect, but could be nicer to us the users in general in writing such things. Yes we can edit it on our end, and thats what i have done - so it is (kinda-i know my edit is not right but gud nuff) more helpful in that, cause when were writing nodes, we kinda need to know where our error is with a higher priority to the fact that map magic just failed to succeed 100%.

    You did not mess up anywhere, you have created the best terrain asset out there bar none - ive used them all, and this truely is magic with what it can do, Im just providing QoL suggestions based on my extended use of it.
     
  50. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    75
    Which as an added bonus to my QoL suggestions, mm needs to provide preview data in draft mode.