Search Unity

MapMagic 2 - infinite procedural land generator

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

  1. Deleted User

    Deleted User

    Guest

    Just tried beta14, still the same ... dll don't work and serialization is broken.
     
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Do you want to read some terrain data during generating? I'm afraid Unity won't allow you doing this. Generate happens in a separate thread, and you can't access terrain that is in the main thread. Exception are output nodes (Apply method is called in main thread) and brush input nodes, but I'm not sure you can use this in your case.

    I will think of the way to use MM only for objects scattering. Actually the brush was made for this purpose, but it won't be procedural. Interesting use case to generate terrain in some other settings and place objects with MM.

    Yes, I might have missing something. I don't guarantee reliability of compatibility nodes (and mention in in asset description) since there are a lot of cases to test when something can go wrong.

    Thanks for reporting this issue on Asset Store, and I appreciate you looked into and found some hints of what can cause it - but it would be way better if you just describe the steps to reproduce it instead. Clear instructions on how to reproduce will come way more handy then any investigation - I will doing these investigations in anyways, so there's no need to do this work at your side.

    I'm not sure that this maximum value should be limited in some way. It's like limiting the number of objects you can place in scene before Unity crash. Personally I would be very careful with any value called "Iterations", and would rather save the scene before setting it to 40.

    Again it would be more handy if you could formulate a question of what you are trying to achieve, and I will try to help you to find the way to do it (or at least admit it's not possible, and then think of implementing it).

    In most cases Unity beta issues are not being fixed until release. I don't why. Maybe they change submitting pipeline, pass through unit tests, or perform some comprehensive release tests.
     
  3. ciathyza

    ciathyza

    Joined:
    Aug 16, 2015
    Posts:
    111
    Hello, does MapMagic2 support HDRP?
     
  4. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    It is possible to use HDRP shaders and hdrp oriented products in MapMagic2. upload_2021-10-2_21-40-2.png
     
    Wright and MaximilianPs like this.
  5. ciathyza

    ciathyza

    Joined:
    Aug 16, 2015
    Posts:
    111
    Thank you for the info! Checked once more and found that it's working with HDRP (initially saw some pink shaders in the package and assumed it would not work with HDRP).
     
    twobob likes this.
  6. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    322
    Anyway just as info.
    I've been able to access to the SplatMap via MatehrialPropertySerializer and by reading Texture[] array.
     
    Wright and twobob like this.
  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Yes, MapMagic works in HRDP (as well as in URP and default render pipeline).

    Just a warning: it's not related with MM, but note that Unity HDRP does not have a grass shader, so grass is not displayed here.

    Demo assets materials (especially trees) we not made for HDRP, so they will displayed as pink unless you change their shader to HDRP one.

    Nice finding!
     
  8. ciathyza

    ciathyza

    Joined:
    Aug 16, 2015
    Posts:
    111
    Thank you for the info! One question ... I'm getting these shader errors after importing MapMagic2 Bundle. I did not include the demo folder in the import. Will these errors cause any problem?

    Code (CSharp):
    1. Shader error in 'MapMagic/TerrainPreviewURP': Couldn't open include file 'Packages/com.unity.render-pipelines.universal/Shaders/Terrain/TerrainLitInput.hlsl'. at line 106
     
  9. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Are you using URP? Just come over to the discord. https://discord.gg/tubVUVE4
     
    Last edited: Oct 5, 2021
  10. Deleted User

    Deleted User

    Guest

    Just for the info; I've been able to make the Native Plugins work on M1 !
    Only remains the Den.Tools.Serialization.Serializer.SerializeRecursive error; hopefully fixed in B15
     
    jukibom and twobob like this.
  11. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    you can deep dive the Serializer... I seem to think SerializeRecursive is something to do with circumnavigating Denis "infinite loop checks"
     
    Deleted User likes this.
  12. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    The main question is why it works on all Unity versions except beta. Intentionally or not, but they changed something. I will try to find what in case it won't change on release.

    If you are using HDRP it won't affect anything - this is a preview shader for URP. There is the other one for HDRP, and it doesn't seem to be generating any warning.
     
  13. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    121
    @Wright Is there a timeline for getting Brush to work with multiple terrains? I have a lot of terrains I made with MM2, but I need to make manual changes to them, and Brush is great.

    But it splits the terrains at the seams, as one would expect. Is this coming soon to Brush so it can work with multiple terrains? Is there a workaround for it not existing now?
     
  14. Deleted User

    Deleted User

    Guest

    Thank you so much !

    I can edit the graph but the moment it recompiles any script, graph gets back to previous state. I took a look at the code, I've seen you had a 'GraphSerializer200Beta' but also a GraphSerializer199 that's commented out; would it be worth to re-activate that one to see ?

    One more thing I've noticed is that every 2 error there's one difference with the 'OnGUI' method that's referring to a '/Users/booken/...' link Maybe that's the issue ?
    refering to IMGUI/GUIUtility.cs:189

    Also, I saw that the

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Den.Tools.Serialization.Serializer.SerializeRecursive (System.String name, System.Object val, System.Collections.Generic.Dictionary`2[TKey,TValue] serializedObjsIds, System.Collections.Generic.List`1[T] unityObjs, System.String offset) (at Assets/MapMagic/Tools/Serializer/Serialize.cs:218)
    3. Den.Tools.Serialization.Serializer.SerializeRecursive (System.String name, System.Object val, System.Collections.Generic.Dictionary`2[TKey,TValue] serializedObjsIds, System.Collections.Generic.List`1[T] unityObjs, System.String offset) (at Assets/MapMagic/Tools/Serializer/Serialize.cs:218)
    4. Den.Tools.Serialization.Serializer.Serialize (System.Object val, UnityEngine.Object[]& unityObjs) (at Assets/MapMagic/Tools/Serializer/Serialize.cs:64)
    5. MapMagic.Expose.Override.OnBeforeSerialize () (at Assets/MapMagic/Expose/Override.cs:244)
    6. Den.Tools.Serializer.SerializeObject (System.Object obj, System.Collections.Generic.Dictionary`2[TKey,TValue] serialized, System.Boolean skipNoCopyAttribute, System.Action`2[T1,T2] onAfterSerialize) (at Assets/MapMagic/Tools/Serializer.cs:379)
    7. Den.Tools.Serializer.SerializeObject (System.Object obj, System.Collections.Generic.Dictionary`2[TKey,TValue] serialized, System.Boolean skipNoCopyAttribute, System.Action`2[T1,T2] onAfterSerialize) (at Assets/MapMagic/Tools/Serializer.cs:422)
    8. Den.Tools.Serializer.Serialize (System.Object obj, System.Action`2[T1,T2] onAfterSerialize) (at Assets/MapMagic/Tools/Serializer.cs:177)
    9. MapMagic.Nodes.GraphSerializer200Beta.Serialize (MapMagic.Nodes.Graph graph) (at Assets/MapMagic/Nodes/GraphSerializer.cs:53)
    10. MapMagic.Nodes.Graph.OnBeforeSerialize () (at Assets/MapMagic/Nodes/Graph.cs:1149)
    11. UnityEditor.Undo:RecordObject(Object, String)
    12. Den.Tools.GUI.Undo:Record(Boolean) (at Assets/MapMagic/Tools/GUI/Editor/Undo.cs:50)
    13. Den.Tools.GUI.UI:MarkChanged(Boolean) (at Assets/MapMagic/Tools/GUI/Editor/UI.cs:418)
    14. Den.Tools.GUI.Draw:DragValue(Single) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:3042)
    15. Den.Tools.GUI.Draw:Field(Single, String, Single, Single) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:110)
    16. Den.Tools.GUI.Draw:ClassField(ValAttribute, Object) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:1187)
    17. Den.Tools.GUI.Draw:Class(Object, String, Action`2) (at Assets/MapMagic/Tools/GUI/Editor/Draw.cs:1163)
    18. MapMagic.Nodes.GUI.CellExpose:ExposableClass(Object, UInt64, String) (at Assets/MapMagic/Expose/Editor/CellExpose.cs:90)
    19. MapMagic.Nodes.GUI.GeneratorDraw:DrawGenerator(Generator, Graph, Boolean, Boolean, GeneratorMenuAttribute) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:119)
    20. MapMagic.Nodes.GUI.GeneratorDraw:DrawGeneratorOrPortal(Generator, Graph, Boolean, Boolean, Boolean) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:50)
    21. MapMagic.Nodes.GUI.GraphWindow:DrawGraph() (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:337)
    22. Den.Tools.GUI.UI:Draw(Action, Boolean, Rect) (at Assets/MapMagic/Tools/GUI/Editor/UI.cs:259)
    23. MapMagic.Nodes.GUI.GraphWindow:[B]OnGUI() (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:200)
    24. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)[/B]
     
  15. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    It should not, so seems something went wrong. Do these terrains have the same size and resolutions?

    No, that won't help - only make all of the graphs unreadable.
    I will take a look at Beta this weekend.
     
  16. Deleted User

    Deleted User

    Guest

    Awesome ! Thank you sir !
     
  17. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Hello @Wright I'm using the newest Beta 15 and am having a bunch of errors. Everything was fine until I pressed the Play button.

    While I don't really expect a ton of support for beta's, I just hope it helps identify any changes they've made for the next actual non-beta release for 2021.2

    I get a lot of errors, mainly of two types.
    First Error (lots of them)
    Code (CSharp):
    1. Unexpected node type.
    2.  
    Second Error (lots of them too)
    Code (CSharp):
    1. Unexpected node type.
    2. UnityEditor.Compilation.CompilationPipeline:GetAssemblies (UnityEditor.Compilation.AssembliesType)
    3. Unity.Burst.Editor.BurstReflection:.cctor () (at Library/PackageCache/com.unity.burst@1.6.0/Runtime/Editor/BurstReflection.cs:618)
    4. Unity.Burst.Editor.BurstLoader:.cctor () (at Library/PackageCache/com.unity.burst@1.6.0/Runtime/Editor/BurstLoader.cs:169)
    5. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes (System.Type[])
    6.  
    The next three errors are single errors.
    Code (CSharp):
    1. Exception: Could not load graph data:
    2. System.NullReferenceException: Object reference not set to an instance of an object
    3.   at MapMagic.Nodes.GraphSerializer200Beta.Deserialize (MapMagic.Nodes.Graph graph) [0x00040] in C:\GameDevProjects\Project Dinosaur\Assets\MapMagic\Nodes\GraphSerializer.cs:63
    4.   at MapMagic.Nodes.Graph.OnAfterDeserialize () [0x00008] in C:\GameDevProjects\Project Dinosaur\Assets\MapMagic\Nodes\Graph.cs:1156
    5. MapMagic.Nodes.Graph.OnAfterDeserialize () (at Assets/MapMagic/Nodes/Graph.cs:1165)

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. MapMagic.Nodes.GUI.GraphWindow.GetNodesCenter (MapMagic.Nodes.Graph graph) (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:705)
    3. MapMagic.Nodes.GUI.GraphWindow.ScrollZoomOnOpen () (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:1045)
    4. MapMagic.Nodes.GUI.GraphWindow.OnEnable () (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:121)
    5. UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget(String)
    6. UnityEditor.WindowLayout:LoadDefaultWindowPreferences()
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Den.Tools.EditorHacks.SetIconForObject (UnityEngine.Object obj, UnityEngine.Texture2D icon) (at Assets/MapMagic/Tools/Editor/EditorHacks.cs:19)
    3. MapMagic.Core.GUI.MapMagicInspector.OnEnable () (at Assets/MapMagic/Core/Editor/MapMagicInspector.cs:52)
    4.  
     
  18. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    121
    Yes, they are same size and resolutions, all created in a single MM2 pass.

    How should it be set up? I have been putting the MM Brush on given terrains, but then other terrains dont have it.

    I tried putting it on all of them and set up with the same brush, but that didnt do anything.
     
  19. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    As mentioned on Discord, he is working on this over the weekend. Ref the post above. https://forum.unity.com/threads/rel...al-land-generator.875470/page-33#post-7555285
     
  20. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    twobob likes this.
  21. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Certainly could help. Your machine is a different processor than the previous report. Chances are though it will be one or at most two tiny changes that cause that variety of errors. Time will tell
     
  22. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Hey, having some problems with painting details in terrain.
    I'm using mapMagic for the terrain, but I'd like to paint my details (grass). But when using mapmagic it doesn't work, and when it does, this happens: ezgif-5-c7487df7e617.gif

    It doesn't paint correctly (wrong location), also it seems to have it's own strength/opacity separate from the set one for the brush. Any ideas? (HDRP 2021.2)

    EDIT: Tried it on 2020.3 with URP, same issue. This time it doesn't paint anything at all when using mapmagic. Is this expected? I assume it's not, otherwise how would I place grass in the terrain. Especially since I also want to use nature renderer.
     
    Last edited: Oct 9, 2021
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Quick fix to solve serialization issue (could not load graph data) in Unity 2021.2 beta.

    Just a quick update: I've traced this issue the whole day today. I don't know what it is and how is it even possible:
    Dict.jpg
    Dictionary that has "Position" key... does not contain it. No, I'm not using any custom comparer. That's why I don't like fixing bugs on beta - it's not clear if it is me going crazy or Unity. Anyways, recreating this dictionary after deserialization solves this issue.

    Could you please provide some info on when these errors occur, what should I do to reproduce them? I've got to attach VS to find what causes them, just console messages don't help a lot.

    Just tried painting grass in Tutorial scene (not HDRP/URP) - seems to be working? Could you please try the same to find out whether the issue is in your setup or grass settings?
     
    twobob likes this.
  24. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    it's been that kind of a day. I called one of my graph variables "guiPosition" - and made it a bool... and that obviously made the world explode too.. (It's a reserved name referring to the /actual/ position and it's a float, DO NOT DO THIS)

    Given the generally insane "Direction" of our Days Denis...
    I guess it really is impossible to know "Position" and "Direction" (That was a quantum joke)

    Thanks for looking (And no, I don't need help, it's all fixed)
     
  25. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I just tried built-in, same results.
    When you mentioned the tutorial, I tested it, and painting the tutorial worked..
    fixed: so I checked all settings between the tutorial and my scene, turns out by default with mapmagic detail resolution & detail resolution per patch are way too low. Increasing them fixed it. :)
     
    Last edited: Oct 9, 2021
    twobob likes this.
  26. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    @Wright - happens after I press "Play". After that the errors pop up, can't view the graph, can't even view MapMagic at all and change any settings, and if I close Unity and load it back up the errors are there again. If I click on the graph its self, they show up again.

    Edit: before pressing "Play" everything worked as entirely expected, no issues at all.
     
  27. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Did you try the "Fixed beta" release linked above? People have reported success
    https://www.dropbox.com/s/sj4utpqjb8aipke/MapMagicUnityBeta.zip?dl=0
    @N1warhead
     
  28. Sheppard_25

    Sheppard_25

    Joined:
    Jan 9, 2013
    Posts:
    10
    hi, does mapmagic work with microsplat terrain object blending module? i tried it but it only blends the object with the index 0 texture in the microsplat node. I asked it in the microsplat post and this was the answer:

    Is Map Magic setup with the MicroSplat output or standard? Because when using the MicroSplat output, I think Map Magic bypasses setting splat maps on the terrain, instead setting them directly on the material instance and avoiding the CPU overhead, which means the original terrain has blank splat maps. You'd have to ask in the Map Magic forums to be sure though, he wrote that output node.
     
  29. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    edit:nvm:D
    thanks twobob
     
    Last edited: Oct 11, 2021
    twobob likes this.
  30. Deleted User

    Deleted User

    Guest

    Amazing ! I confirm it now works flawlessly up to b15. I hope it's not something that will make it thru final release; at least you now know where it comes from. Thank you Denis for taking the time to troubleshoot. I now can enjoy working with MM flawlessly on a M1 !
     
  31. Deleted User

    Deleted User

    Guest

    Well .. spoken too fast.

    I think there's some minor things to fo for the Splines; trying to Splines Demo (I'm using the Bundle btw). Other scenes seems to work. I bet it's an easy fix to replace the missing/new generators ?

    edit: Same for Objects, Biomes
    Capture d’écran 2021-10-11 à 13.25.11.png
     
    Last edited by a moderator: Oct 11, 2021
    twobob likes this.
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    It might be it was saved after trying to load it previously - even if you had not made it intentionally, Unity is trying to save any asset when when changing it. Try to remove these files, press File - Save Project, re-open Unity and re-import these scenes from package manager. They seem to be opening in my case.

    This is what MM does by default. The most reliable solution would be to use standard output along with MS one, and the same texture list. Alternatively you can switch MS output node to splats and control textures at the same tile (advanced - Apply Type - Both), but this has some known issues yet.

    Could not reproduce it - at least in a fixed version. I recommend fix for all of the Unity beta users, and I also recommend removing the graph, saving project and importing it again - just in case, if you had applied any change.
     
  33. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058

    well. I would try again. Gave it a quick go.

    upload_2021-10-11_23-36-57.png
    Only a quick test. Imported denis fix. It did error then I rebooted ,
    After reboot seems fine. Errors gone
     
    Last edited: Oct 12, 2021
    Wright likes this.
  34. Deleted User

    Deleted User

    Guest

    This doesn't work for me. I import the 'fix' by overwriting the files. I delete the scenes and graphs. "Save Project" then I re-open, import from package manage the scenes and try to open. Still complaining.

    Can't open anything that's containing Biomes/Objects/Splines.

    My bet is that the graphs from the package manager are with the old serialization and are not included in the fix. Would it be possible to share a 'patched' bundle version (in private of course) ?
     
  35. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    @Wright I Got "one fox" to the point where he can at least do some more testing.
     
    Deleted User likes this.
  36. Deleted User

    Deleted User

    Guest

    So ... The 'fix' actually removes the Objects/Spline nodes ...
    I will start to cry ... oh gosh tears are coming ... that's it ... I'm crying now :'(

    fix.png
     
    twobob likes this.
  37. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    121
    @Wright
    Any update on this?
     
    twobob likes this.
  38. mike114

    mike114

    Joined:
    Dec 29, 2017
    Posts:
    7
    Hello, what is the correct way to save the terrain height data after I modified it with magic brush?

    Edit: I found it, I exported the raw with "flip vertically" checked.
     
    Last edited: Oct 13, 2021
    Wright and twobob like this.
  39. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Wright likes this.
  40. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    It's weird that it does that since clearly it is at that point running the core?
    I'll try to catch up with you today again, has to be a way to fix that.
     
    Wright likes this.
  41. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm evaluating MapMagic for a freelance coding project. Is it possible to get at runtime which biome the player is in? If so, what kind of information can you get from that?

    [EDIT]
    Also, does the evaluation version of MapMagic let you create biomes? I tried to follow the tutorial on biomes, but when I added one with IslandData, it didn't do anything to the flat terrain.
     
    twobob likes this.
  42. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    You can use Direct Textures output or Direct Matrices output to export any generated map (including biome mask) - in Direct Textures. Or store it in Direct Matrices.

    I guess you mean free Core version under evaluation. It is fully functional product, you can use it in your game, as wel as results it generate. However, yes, it missing some features that are available only in modules. Biomes is one of them.

    Not clear what setup do you use, but just in case - to use brush on multiple terrains you've got to use only one brush script. It can be assigned on any of the terrains or on any object at all, but all the terrains should be included in list in Terrains foldout.

    I'm attaching a setup that is currently working (at least for me).

    Maybe it's worth trying to re-install all modules, except core. This will refresh all of the scripts, but will keep the fix - it does not affect modules files.

    Anyways, got to release it soon (probably this weekend).
     

    Attached Files:

    ge01f likes this.
  43. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    121
    I got it to work by adding the a terrain in. I tried adding all terrains and moving the cursor took over 1.5 minutes continuously. So it appears multi-terrain has HUGE performance problems. I have 26 terrains, and that basically doesnt work at all because its too slow to move the cursor. I guess its going through a lot of data instead of restricting which terrain the cursor is over?

    I reduced it down to 2 terrains (2048x2048) and it was still slow, but usable. Undo was extremely slow, but again its usable.

    Im unblocked on this, thanks!
     
    twobob likes this.
  44. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    For the love of mike. That's ridiculous.
     
  45. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @Wright Is there documentation on any APIs that can be accessed? I'm wondering if there are any events I can tie into. I would like to be able to know whenever MapMagic adds or removes a tile when using Infinite terrain without any pinned tiles.
     
    twobob likes this.
  46. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Yes. I believe there are some in a wiki (although I could not lay my hands on it)
    Here is a homebrew one i made with Sandcastle.

    upload_2021-10-15_3-56-57.png

    The events you want are these I think?
    upload_2021-10-15_3-49-23.png
    MapMagic/Terrain/TerrainTile.cs

    Hope it helps
     

    Attached Files:

    Last edited: Oct 15, 2021
    AndersonMarquess, Wright and jukibom like this.
  47. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    twobob likes this.
  48. harpingseal

    harpingseal

    Joined:
    Sep 3, 2020
    Posts:
    57
    Hello,so i have some questions regarding this with mirror,a multiplayer unet modification
    1.Does the terrain generate for each individual users only?like user 1 generate some terrain at 100,10,1000 and user 2 go to -100,10,-1000 ,will user 1 be able to see user 2 generated terrain?,or user 2 will just see their own terrain.
    2.If it doesn't,then will 2 user both see both generated terrain?
    3.does floating point method map magic uses support multiplayer?
    Thx in advance
     
  49. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    It can generate for multiple cameras, it uses noise so ensuring continuous heightmap flows
    Whilst not impossible to setup a layer for multiple separate camera outputs the default is you would see both. It does not occur to me immediately how one might achieve this splitting I know it must be possible with some additional faffing in the unity system itself.
    3) is an extremely general question. Define it better please.

    If you were to pass exactly the same set of starting graph points and seeds to two different systems the outputs would be the same. If there is some limitation to the way you envision your ability to shuffle packets about with certain bits of data - outline the limitation specifically.
     
  50. jukibom

    jukibom

    Joined:
    Aug 31, 2015
    Posts:
    54
    I've got a game working in Multiplayer with MM, ideally you want to provide the same seed and just allow each client to handle their own terrain generation. The code is freely available here if you want something to pick at https://github.com/jukibom/FlyDangerous

    As for floating point, not sure what you mean here. If you mean floating origin, I use that too and that's also in the code above.
     
    PutridEx, twobob and Wright like this.