Search Unity

[RELEASED] MapMagic 2 - infinite procedural land generator

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

  1. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996

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

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

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

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


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

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

    Susihiisi

    Joined:
    Jan 11, 2018
    Posts:
    25
    It's the Brush graphs provided with Brush. I also have Objects and Splines and everything in those works. I just noticed that I can make my own Preset and Graph and it works. It's just those premade ones that comes with Brush so it's not too bad. I can't open those so I can't see how they are made which is bit inconvenient of course.

    Welcome to Finland. Summer is almost over, but should be pretty nice still. :)
     
    Last edited: Sep 8, 2021
    twobob likes this.
  3. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,022
    Patch to fix loading brush graphs in locales with decimal comma symbol.

    Thanks for reporting this issue! Interesting thing that for some reason it worked with Russian locale (where comma is also a decimal), but not with Finnish one.

    Just to collect more votes - a link to idea. And no matter of votes - I will think about the way to make some biome override node, or biome priorities in set, or something.
     
    twobob likes this.
  4. Susihiisi

    Susihiisi

    Joined:
    Jan 11, 2018
    Posts:
    25
    Thanks! Now it works. Quite strange thing. :)
     
    twobob likes this.
  5. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    95
    when i am blending biomes, i have trouble with some of my objects that are only supposed to appear under a certain y axis appearing where they shouldn't be where the two biomes begin to blend

    such as these fish appearing on the hill here

    upload_2021-9-9_20-21-22.png
     
    twobob likes this.
  6. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    new TransitionsList(); hi when using this I seem to get a blank array of 4 as a default.
    Thank you for your consideration
     
  7. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    If I had to guess those fish are within maybe 16 pixels of the edge. Internally there is a concept of "Full" tile data which is the tile size like 1000x1000 plus some blending border (I think the one set in prefs. we will call it "border") say 16.. so 1016x1016. One step therefore might be to pull in the objects by "border" width to avoid it - since you know the size - However if that is not acceptable for whatever reason can't think of a non-script solution.

    Might I ask - please check: those fish are actually spawning outside of this border area

    EDIT: Or maybe the scatter went beyond its border but that seems unlikely
     
    Last edited: Sep 17, 2021
  8. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    272
    Can you help me to access to that object via c#? upload_2021-9-10_20-42-46.png
    I need to store this Vector3 array into a script.

    And also, any idea my grass is so .... bend? (this is InEditor screenshot)
    upload_2021-9-10_15-1-27.png
     
    Last edited: Sep 10, 2021
  9. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996

    I believe you fixed the first one.

    The second, grass, one I'm not sure on.
     
    MaximilianPs likes this.
  10. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    For my birthday MapMagic decided to teach me a lesson.
    Randomly crashed: Disconnected every node to do with a spline anywhere. And then saved all those broken links into every sub functions graph. I never even considering backing up sub-graphs until now. Why would they break I thought?

    upload_2021-9-11_6-36-34.png

    Which means manually reconnecting over a hundred links...
    Joy. EDIT: Eh. took an hour. not too bad.

    Anyway. Back up your sub graphs. Them not being actively open does not mean they are safe.
     
    Last edited: Sep 11, 2021
    MaximilianPs likes this.
  11. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    272
    Yep, for the first, I've work-around it, but for the second I think it's about pre-defined wind in the terrain.
     
  12. lemapp

    lemapp

    Joined:
    Mar 30, 2020
    Posts:
    5
    Failing to install MapMagic2.

    Unity 2020.3.16.f1 / Package Manager

    Errors:
    Exception: Could not load graph data:
    System.Exception: Could not find type for: MapMagic.Nodes.MatrixGenerators.MicroSplatOutput200, MapMagic.MicroSplat, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

    Exception: Could not load graph data:
    System.Exception: Could not find type for: MapMagic.Nodes.ObjectsGenerators.Split200+SplitLayer, MapMagic, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

    Shader error in 'MapMagic/TerrainPreviewHDRP': Couldn't open include file 'Packages/com.unity.render-pipelines.high-definition/Runtime/Material/TerrainLit/TerrainLit_Splatmap_Includes.hlsl'. at line 98

    Shader error in 'MapMagic/TerrainPreviewURP': Couldn't open include file 'Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitInput.hlsl'. at line 160

    and others.

    I'm using a Apple Mac Mini with the silicon M1 chip.

    Thank you for your attention.
     
  13. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,022
    Have you made any change in your custom node (Mask to Zero)? Renamed inlets, or changed their order maybe? Renamed the class? Moved it into another namespace or assembly?

    It seems to be standard Unity wind bending. Usually it looks weird in editor since it displays all of the grass frozen in some bending state, in some locations it could be pretty extreme. Should look better in playmode, but if you want completely remove it change the grass wind settings (for some reason not only the bending strength, but size and speed as well). Yes, it would be better if the grass would enable bending only in playmode, making it vertical in editor, but I can't dictate this to Unity.

    Thanks for finding this issue, I will appreciate if you could report it on ideainformer. Could you please clarify whether you are installing modules or bundle? If modules, in what order and after which one "Could not load graph data" error appears?
    It's a special page to report both ideas and issues. Helps to keep things organized, that result in some pluses:
    - You will be able to track your issue/idea and know when it's fixed;
    - This ticket can also provide a communication channel dedicated to this issue;
    - Other users can also see if the issue/idea was reported, add some comments on it or clarify details.
    - And for me it's way more convenient to track issues in tickets, and discuss them per-ticket rather than use email or forum
     
  14. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    Aren't these errors supposed to occur? He simply doesn't have those modules, he listed a bunch of graphic platforms and a demo from something he also doesn't have. unless he has microsplat installed.
     
  15. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,022
    MicroSplat doesn't require any module - it should work with the Core version.

    But the second error comes from the Objects module - it says that it cannot load the Split node from objects graph. However, you can't get this graph unless you have this module installed. It might be something on installing objects module, when the scripts are not compiled (because of MicroSplat?), but graphs have been added. It's hard to say for sure what and how had happened without additional information.
     
    twobob likes this.
  16. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    Mid play. the editor just froze. Crashed.

    And then on reload reloaded all the assets from the mapMagic folder and decided that it "Could not find the outlet" seemingly for a brief second. I saw it do a pile of drive access then when it finally opened all the sub graphs and the main graph had been completely decoupled.

    In technical terms: It completely lost it's S***.

    There were no code changes, no recent tweaks even - I was working on something completely unrelated, simply with that graph as the backing at the time it decided to throw a wobbler.

    I did something incredibly banal like "change direction quickly" testing scenery with a fly script on possibly just at the wrong moment as the tile border loaded and it bombed.

    What crashes it: A thread or whatever process, maybe it's system call I dunno. I did post a screenshot of the exact hang wait state back then - I'm just gonna say "Thread"

    It's not the first time. It bombs usually once per session. hanging on a 13% thread that never returns. Reported it months ago but there is no real way to define what the issue is . I have tried running in MM_DEBUG mode and even managed to crash it - IN THAT WAY - in MM_DEBUG mode and since the thread never returns there were NO meaningful entries in the log after the "hang/crash" had begun.

    Short of you actually looking at this graph I don't know what to say. My graphs are pretty huge now since we don't have that top biome node. Not sure of your average users graph complexity but mine is in the many hundreds - which is sad. It will be done with about 1/6 of that with the time comes that the more game-suitable tools are in place. Perhaps at some point you will get a chance to look at it. It took an hour to fix. I'm okay with that. It was just my first surprise on my Birthday morning, and not the kind with party poppers.
     
  17. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    @Wright my custom nodes. Other than the big Town one. are just too simple to explode.

    Mask just does a Fill(0). I mean. what could actually go wrong. they are all like that. Just stupidly simple. I've even tried to hunt around and not reinvent internal methods. So - as with Fill(0) the methods are largely yours, the data is clamped, cleansed with data.area.active.Contains(blah) before it even arrives and does not populate in the event of nulls, This logic is usually in any other thing I have built as well. such as the town thing. "Don't send crappy malformed data, don't send null data, don't send data for some other tile"
     
    Last edited: Sep 11, 2021
  18. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    I've invited him onto Discord, Thanks for that info. It's odd because I kind of recall that exactly happening during one mf my reinstalls (on 2020) and just - well - assumed - the information I shared above. it seems to make sense. The errors are certainly obscure. Thanks for the refresher

    EDIT: He is good now, has it installed
     
    Last edited: Sep 12, 2021
    Wright likes this.
  19. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    272
    by changing the sitting to Wind Bending in MapMagic object to 0.1 all grass now is standing up.
    ... to just as information for everyone.

    Anyway with Azure[Sky] 0.37 gives me a good result without stretching the grass too much.
     
    Last edited: Sep 12, 2021
    Wright and twobob like this.
  20. tomobiki

    tomobiki

    Joined:
    Sep 27, 2020
    Posts:
    22
    Rendering in main mode all the tiles of my project in many cases generates artifacts between edges, like the one is shown in the screenshot (I circled in red the artifacts). Is there some setting to tweak to avoid this problem? Thanks!
    unknown.png
     
    Last edited: Sep 12, 2021
  21. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    what you got in here?
    upload_2021-9-12_19-18-16.png
     
  22. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    95

    thank you for trying to help. I am not a programmer but currently paying programmers to build the game. I try and attempt to do things that do not require coding. I have worked with map magic and have made a pretty good environment.

    I am not sure if what you are suggesting requires me to edit code. All my map tiles are 512x512 and i have multiple. I will create the environment and then use worldstreamer to load and unload them.

    Currently this is what my biome graph looks like:
    upload_2021-9-12_15-43-39.png

    I cannot get the fish and seaweed to be placed where they are supposed to be in the lowlands graph when they are blending with the mountain biome.
    upload_2021-9-12_15-48-27.png
     
  23. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    Hi.

    No code edits.

    upload_2021-9-12_20-51-25.png

    When you press play, what does this number say
     
  24. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    if you are also the " Fish about the ground " guy. try moving them in from the border
     
  25. tomobiki

    tomobiki

    Joined:
    Sep 27, 2020
    Posts:
    22
    Hi, my settings are these:
    Cattura.JPG

    These are different from yours, but the "Main Margins" parameter has the same value, actually.
     
  26. tomobiki

    tomobiki

    Joined:
    Sep 27, 2020
    Posts:
    22
    I solved the problem setting the Main Margins to 128 (even with 64 there were a little artifacts).
    Thanks!! :)

    Cattura.JPG
     
    twobob likes this.
  27. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    33
    Is there a way to force objects to not spawn near or in the same place as other objects if they are in different groups?

    For example, I have a set of nodes for my trees and then a different set for rocks and another different set for bushes. I can't combine them into the same set as I want them to have different properties and different Initials. When I do this however, I often get trees inside rocks or rocks inside bushes, etc.

    Is there a way to avoid this?
     
  28. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    Yes.

    upload_2021-9-13_3-6-10.png

    However it is destructive so order it by "please don't delete this"
     
    Calamitycal likes this.
  29. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    272
    Seriously, Denis...
    you have to fix MM2 ASAP.
    It's an advice, 'cause the texture blend won't work (as expected) and also splines need to be fixed when cross the tiles, and so the Object Splat.

    upload_2021-9-13_11-41-42.png upload_2021-9-13_11-43-55.png

    Look, I can pay for it if you need incentive / motivation... but please FIX IT!
     
  30. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    95
    i played with that setting like you said, i didn't see much change.

    Is it possible to put the lake settings inside the biome graph so that they are only placed after the biomes are blended?
     
  31. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    95
    I tried the function node but it seems bugged
    upload_2021-9-13_9-35-40.png
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,022
    Think of functions like of biomes with portals. You can pass some map into a function and get information from it. Do do this you've got to use function inputs and function outputs. Here you can find more information and usage example.

    Unfortunately it's not the MM2, it's the splines module. The reason why it's still marked beta is that it won't allow some features no matter of what.

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

    This way the tile is not aware of what roads do you have on your neighbor tile. The things that look easy from generating limited world perspective, but I don't know the way to solve it for infinite world. There are some assumptions and some workarounds like scattering road anchor objects within margins. Or avoiding passing roads to the other tile. Or some other hacks, but there is no way to do a "true" roads network.

    Yes, like twobob said you've got to use Rarefy. Posting it's description just in case.

    Yes, margins is one of the ways to deal with the seams. But note that they are adding additional pixels from the neighbor tiles to generate them - this way setting 128 will double the generate time. These seams might be related with the Blur node - consider lowering the blur amount instead (don't see it in your graph, but I don't see the whole graph).
     
  33. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    95
    is there anyway that i can make it so that my lake graph is spawned in after the "biome set" so that the water plants are placed in the right location
     
  34. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    272
    This is an excuse as old as Methuselah, the point is whether or not you are able to fix these problems, because we are here to make a decent product, and you should take your responsibility, would you fix it or not?

    Because if the answer is negative, it is clear that we should search for other solution.
     
    Last edited: Sep 14, 2021
  35. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,022
    Sorry for being unclear, but it's not an excuse. I'm trying to clarify the way the things work. It's not the matter of fixing - it's the matter of general approach. You either generate limited terrain all at once, or generate infinite terrain tile by tile on demand - and you cannot predict what would be generated until you generate it. MM uses the second approach, and I'm not going to change it in scope of this asset. No, you cannot predict what splines would be generated on a neighbor tile to weld them with currently generated tile, and there's nothing I can do about it.

    If you need an advanced control you've got to use functions instead of a biome set. Each function might represent one biome, and have it's own function outlets for height, textures, objects, etc. In a parent graph you can blend these maps similarly to what biome set does - multiply the map with the mask (blend, multiply), and then sum all these maps (blend, add). However, if you need something to be applied differently - you have the full control to do it using functions.
     
  36. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    272
    No, you won't, 'cause you can wait to generate the mesh terrain, then apply spline and then paint the texture (possibly without bending issue). So, when the next terrain get generated you could read where the hek was the lastest spline vertex and continue from there...
    But it's obviously that you don't care at all.

    So thanks for nothing. :mad:
     
  37. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,022
    But if you will go the opposite way, all of the chunks will be generated in an opposite order, and that will make generated tiles be different. The generated result will depend on the direction player moves. This will ruin generating consistency, and you will not be sure that each of your players gets the same generate result as long as all seeds are the same.
     
    twobob likes this.
  38. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    95

    my functions seem broken; mine looks like this:


    yours looks like this:

    upload_2021-9-14_21-1-37.png

    i opened a new project in unity 2020.1.17f1 and i have the same problem with a clean download
     
    Last edited: Sep 15, 2021
  39. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    Did you add a function ENTER and EXIT?

    doesn't look like you did. There are videos on using that. I suggest politely you watch one.
     
    Wright likes this.
  40. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    95
    ok thank you, i had gone to the githab page but didn't know there was a tutorial video. i had followed the githab page and it wasn't clear. Is there a discord channel so that i do not appear rude in asking questions and can more easily discuss my concerns without coming off as rude?
     
    twobob likes this.
  41. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
  42. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    The is correct. However. in this context (games, with a world-complete dataset) the actual application of data need to be "global". (It's why he's frustrated. trying to convert what-he-needs to what-is-there)

    I solve it in a few ways, largely just using your internal methods.

    EXAMPLE: upload_2021-9-16_0-23-39.png

    The red roads cross tiles with no issue, to another town many KM away.
    In fact everything on this screenshot does that pretty much.

    perhaps people need to change the question:

    "Can we have a global set of data that is applied to the whole world please"

    since it is very easy to walk over such a set at Generate time like so:

    upload_2021-9-16_0-30-41.png

    And spit out tile sized spline chunks. that "look" like they cross tile borders. Within reason...

    The "data" in that example could just be anything??? anyway that's how I do it.
    In that case it's just a list of Vector2's wrapped up in some other holder.

    BUT: A LIST OF POSITIONS would have been fine too. hint hint to anyone who fancies doing this.
     
    Last edited: Sep 16, 2021
  43. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    if you EXACTLY smack into a corner of 4 tiles? it does what it can with two...
    upload_2021-9-16_1-7-38.png
    Best we can hope for I would imagine
    If only we had some way of making those wiggly now...

    upload_2021-9-16_5-21-54.png

    Oh wait ;)
    upload_2021-9-16_5-40-1.png
    Happy to share. it's just a stupid random offset.
     
    Last edited: Sep 16, 2021
  44. Calamitycal

    Calamitycal

    Joined:
    Jul 6, 2014
    Posts:
    33
    Getting multiples of this error and the warning below it whenever I make a build...

    Draw Generator MapMagic.Nodes.ObjectsGenerators.ObjectsOutput failed:
    System.NullReferenceException: Object reference not set to an instance of an object
    at MapMagic.Nodes.GUI.ObjectsEditors.DrawObjectsOutput (MapMagic.Nodes.ObjectsGenerators.ObjectsOutput gen) [0x00146] in D:\HammerHelmHolder\HammerHelm2024_4 - SurvivalMode\Assets\MapMagic\Generators\Objects\Editor\ObjectsEditors.cs:315
    at Den.Tools.GUI.Draw.Invoke[T] (System.Delegate action, T obj, System.Object[] args) [0x0001e] in D:\HammerHelmHolder\HammerHelm2024_4 - SurvivalMode\Assets\MapMagic\Tools\GUI\Editor\Draw.cs:1562
    at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
    at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) [0x00035] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
    at (wrapper delegate-invoke) System.Action`5[System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,System.Object,System.Object[]].invoke_void_T1_T2_T3_T4_T5(System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
    at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
    at Den.Tools.GUI.Draw.Editor (System.Object obj, System.Object[] args, System.String cat) [0x000bf] in D:\HammerHelmHolder\HammerHelm2024_4 - SurvivalMode\Assets\MapMagic\Tools\GUI\Editor\Draw.cs:1549
    at MapMagic.Nodes.GUI.GeneratorDraw.DrawGenerator (MapMagic.Nodes.Generator gen, MapMagic.Nodes.Graph graph, System.Boolean selected, System.Boolean activeLinks, MapMagic.Nodes.GeneratorMenuAttribute menuAtt) [0x0024d] in D:\HammerHelmHolder\HammerHelm2024_4 - SurvivalMode\Assets\MapMagic\Nodes\Editor\GeneratorDraw.cs:140
    at MapMagic.Nodes.GUI.GeneratorDraw.DrawGeneratorOrPortal (MapMagic.Nodes.Generator gen, MapMagic.Nodes.Graph graph, System.Boolean isMini, System.Boolean selected, System.Boolean activeLinks) [0x00030] in D:\HammerHelmHolder\HammerHelm2024_4 - SurvivalMode\Assets\MapMagic\Nodes\Editor\GeneratorDraw.cs:50
    UnityEngine.Debug:LogError(Object)
    MapMagic.Nodes.GUI.GeneratorDraw:DrawGeneratorOrPortal(Generator, Graph, Boolean, Boolean, Boolean) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:56)
    MapMagic.Nodes.GUI.GraphWindow:DrawGraph() (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:337)
    Den.Tools.GUI.UI:Draw(Action, Boolean, Rect) (at Assets/MapMagic/Tools/GUI/Editor/UI.cs:245)
    MapMagic.Nodes.GUI.GraphWindow:OnGUI() (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:200)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    null texture passed to GUI.DrawTexture
    UnityEngine.GUI:DrawTexture(Rect, Texture, ScaleMode)
    Den.Tools.GUI.Draw:ObjectFieldFn(Rect, Object, Type, Boolean) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:651)
    Den.Tools.GUI.Draw:ObjectFieldFn(Rect, TerrainLayer, Boolean) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:592)
    Den.Tools.GUI.Draw:Field(TerrainLayer, Func`4, Boolean) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:513)
    Den.Tools.GUI.Draw:Field(TerrainLayer, String, Func`4, Boolean) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:542)
    Den.Tools.GUI.Draw:ObjectField(TerrainLayer&, String, Boolean) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:589)
    MapMagic.Nodes.GUI.GeneratorEditors:DrawTexturesLayer(Generator, Int32) (at Assets/MapMagic/Generators/Matrix/Editor/MatrixEditors.cs:439)
    MapMagic.Nodes.GUI.GeneratorDraw:DrawLayer(Generator, TextureLayer[]&, Boolean, Int32, Action`2) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:393)
    MapMagic.Nodes.GUI.<>c__DisplayClass20_0`1:<DrawLayersThemselves>b__0(Int32) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:377)
    Den.Tools.GUI.LayersEditor:DrawLayer(Int32, Int32, Action`1, GUIStyle, GUIStyle, GUIStyle) (at Assets/MapMagic/Tools/GUI/Editor/Layers.cs:242)
    Den.Tools.GUI.LayersEditor:DrawLayersThemselves(Object, Int32, Action`1, GUIStyle, GUIStyle, GUIStyle, GUIStyle) (at Assets/MapMagic/Tools/GUI/Editor/Layers.cs:128)
    Den.Tools.GUI.LayersEditor:DrawLayersThemselves(Object, Int32, Action`1, Boolean, Boolean) (at Assets/MapMagic/Tools/GUI/Editor/Layers.cs:73)
    MapMagic.Nodes.GUI.GeneratorDraw:DrawLayersThemselves(Generator, TextureLayer[], Boolean, Action`2) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:376)
    MapMagic.Nodes.GUI.GeneratorEditors:TexturesGeneratorEditor(TexturesOutput200) (at Assets/MapMagic/Generators/Matrix/Editor/MatrixEditors.cs:384)
    Den.Tools.GUI.Draw:Invoke(Delegate, TexturesOutput200, Object[]) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:1562)
    System.Object:CallSite.Target(Closure, CallSite, Type, Delegate, Object, Object[])
    Den.Tools.GUI.Draw:Editor(Object, Object[], String) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:1549)
    MapMagic.Nodes.GUI.GeneratorDraw:DrawGenerator(Generator, Graph, Boolean, Boolean, GeneratorMenuAttribute) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:140)
    MapMagic.Nodes.GUI.GeneratorDraw:DrawGeneratorOrPortal(Generator, Graph, Boolean, Boolean, Boolean) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:50)
    MapMagic.Nodes.GUI.GraphWindow:DrawGraph() (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:337)
    Den.Tools.GUI.UI:Draw(Action, Boolean, Rect) (at Assets/MapMagic/Tools/GUI/Editor/UI.cs:259)
    MapMagic.Nodes.GUI.GraphWindow:OnGUI() (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:200)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Any idea what is causing these?
     
  45. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    upload_2021-9-17_8-8-38.png

    some of my graphs don't load with this message. pretty certain I did this to myself though ;) That's the second time in three months I have had a spurious "Default Constructor missing" error. ̶D̶o̶ ̶y̶o̶u̶ ̶d̶o̶ ̶s̶o̶m̶e̶ ̶k̶i̶n̶d̶ ̶o̶f̶ ̶"̶G̶e̶n̶e̶r̶i̶c̶s̶"̶ ̶t̶h̶i̶n̶g̶ ̶b̶e̶h̶i̶n̶d̶ ̶t̶h̶e̶ ̶s̶c̶e̶n̶e̶s̶?̶ ̶I̶ ̶s̶h̶o̶u̶l̶d̶ ̶r̶e̶a̶l̶l̶y̶ ̶j̶u̶s̶t̶ ̶r̶e̶a̶d̶ ̶e̶v̶e̶r̶y̶ ̶s̶i̶n̶g̶l̶e̶ ̶l̶i̶n̶e̶ ̶o̶f̶ ̶c̶o̶d̶e̶ ̶I̶ ̶s̶u̶p̶p̶o̶s̶e̶.̶.̶. EDIT: okay, I read the code. I dies in deserialiser then. Hmm not sure what I did to serialise a Noise there. oh well. I switched to Perlin for now.

    Perhaps a check as you SERIALISE the object? for a default constructor? or refuse to do it?
    Ok thanks.
    upload_2021-9-17_11-17-23.png
    HOWEVER:

    about errors:

    ALSO: When that THIRD message occurs (Outlet disconnected) can it please say THE NAME OF THE CONTROL that it disconnected? when you have 400 controls. some of which aren't even in the graph that is currently open... it would really help.
    EDIT:

    Code (CSharp):
    1. Cell outletCell = UI.current.cellObjs.GetCell(outlet, "Outlet");
    2.                     Cell inletCell = UI.current.cellObjs.GetCell(inlet, "Inlet");
    3.  
    4.                     if (outletCell == null || inletCell == null)
    5.                     {
    6.                         Debug.LogError("Could not find a cell for inlet/outlet. Removing link");
    Eesh. hmm. not sure you even it even has a name at that point... I'll dig around
    errr... maybe we can have the name of the connecting control? (I don't see any low-hanging FIND CONTROL BY ID methods...)

    Well. even the name of the graph would be something

    upload_2021-9-17_9-1-42.png In precis. please can we have more expansive errors.

    upload_2021-9-17_12-17-51.png

    EDIT: that happened the next time i pressed play. that was a sub-graph in a function from the main graph see. useful. It was enough to help me realise that LIKE AN IDIOT I had forgotten AGAIN to declare my inlet/outlets :facepalm:
     
    Last edited: Sep 17, 2021
  46. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    EDIT: Disconnected Heightmap. Junk or missing data to the map HEIGHT output does that. at least in my context.

    EDIT EDIT: REPRO
    upload_2021-9-17_20-9-12.png
     
    Last edited: Sep 17, 2021
  47. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
  48. AlexLuss

    AlexLuss

    Joined:
    Aug 5, 2021
    Posts:
    2
    Hello,

    I have currently setup 2 graphs that I want to use as biomes, one of mountains, the other is a sea biome that is mostly underwater.

    My current problem is that where the 2 biomes blend, I end up with grass and trees being spawned underwater. My mountain biome has a selector to start spawning trees at height 55+ (my water is at 50). I assume this is because when the mountain biome is generated before blending, the height is sufficient, but it is brought down afterwards as part of the blending process, that happens after trees are spawned, right?

    Is there a way to work around this issue?

    upload_2021-9-17_22-46-9.png
     
  49. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    I also share that assumption.
    Not currently that i can think of immediately. A couple of people have noticed this. Denis will likely get a chance to eyeball all this lot at the w/e with any luck
     
  50. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,996
    upload_2021-9-18_0-23-19.png

    The red box is what people would assume would happen with such a margin.
    the green dot is what does happen.

    Please apply margin before doing other calcs, not after. Thanks.
     
unityunity