Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MapMagic 2 - infinite procedural land generator

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

  1. barbamix

    barbamix

    Joined:
    Apr 6, 2018
    Posts:
    15
    Hi!

    I was planning to get MM2 bundle but I have some problems understanding what can it be done with it and how.

    I see most of tutorials are outdated and a lot have changed.

    When testing, I mostly have problem with Blur node since it seems it is unusable in most cases because it produce seams between tiles and has this warning: https://gitlab.com/denispahunov/mapmagic/-/wikis/Tile_Seams_Reasons.

    I didn't figure out yet how can I avoid Blur node and seams between tiles.


    Also, can anyone help me to reproduce this particular node setup with new version of MM2? I can't seem to produce the same setup that works properly and has the same final appearance...


    It suppose to produce this desert terrain. Infinite and without seams:

    https://imgur.com/a/4JZiift

     
  2. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146
    :rolleyes:

    The youtube map magics tutorials are still applicable even if they are old, things have not exactly changed much.

    :oops:

    lower your blur settings some -
    also - if your relying on intense blur to fix/mask what you view as mistakes in the terrain then your approach is very likely wrong

    and lastly - mm and mm2 are not the same asset even tho they may loosely work on the same principles at the core.
    "how can i duplicate my work in this totally not the same asset i did my work in before"

    @Wright might know something i dont but -
    im gonna go with.... the same way you created it originally, slowly over time till it becomes your vision.

    MM2 is superior to MM1 in pretty much every way.
    You may have to lose some preconceived conceptions on how things work for things to work, but all in all you have your foot in a better asset overall.
     
  3. heartingNinja

    heartingNinja

    Joined:
    Mar 26, 2015
    Posts:
    27
    I had lots of problems setting up MicroSplat the last few days so I will post my setup here. I am using Unity 2021.3.

    First I followed the tutorial for Map Magic 1. Making a Custom Splatmap. This partly worked but as I was setting up environment changes I saw only the wind was working. Snow or water was not.

    For what worked for me I took all of my graphs from my biodome and put them in a blank scene. I selected all of the main terrains and added the component Micro Splat Terrain. Then I converted to MicroSplat. Some of the textures were not added so I added them manually. Next in each graph I set up the Microspat Texture and made it the same as my Texture node and deleted the old node. On the microsplat texture node I have Apply Type set to Both, but all three options seem to be working. It always says "The assigned material is not MicroSplat" just ignore. On the MapMagic gameobject I have the MicroSplat I made set in the Material Template. Make sure Copy Layers to Terrains and Copy Tags to Terrains is off. I have the Prop Data with the MicroSplat_propdata and Apply Type set to both.

    After this it seemed to be working but many textures didn't look correct. I had to go in the Per Texture Properties in the MicroSplat material and adjust the UV Scale for some of the textures. Finally everything was working.
     
  4. barbamix

    barbamix

    Joined:
    Apr 6, 2018
    Posts:
    15
    Thanks for advice @Greviouss,

    I'm actually a new Map Magic user and was just testing it before I buy. But I'm having some trouble to understand ins and outs of how things works.

    I was trying to replicate this desert terrain with new node system...






    But this is issues I'm getting and I can't find source of the problems. I don't have experience with MM exactly. Been using it last couple of days...

    Getting these weird texture lines, height clamping, some different nodes, seams ragardless reducing blur...

    Snimka zaslona 2023-11-21 105245.jpg



     
    Last edited: Nov 21, 2023
  5. barbamix

    barbamix

    Joined:
    Apr 6, 2018
    Posts:
    15
    Here is MM graph file if someone wants to help or have a look ...
     

    Attached Files:

  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    I'd like to start with some clarification. There are two MapMagics, actually:
    - MapMagic 1 - predecessor, it's now deprecated. It was made years ago, but still used in some projects (mainly for Voxeland compatibility reason). Here is the video. This video shows the way things work in MM1, but not MM2. It's not outdated itself - it's for the other asset.
    - MapMagic 2 - current asset. It's alive, last update was literally 2 days ago. I was planning to make a major update this year, that will change all the way it works - but stuck - because it changes all the way it works. I won't make it to the end of the year. Sorry for that!
    Anyways, here are the videos that are relevant for it: MapMagic 2 Tutorials. They might show not all of the features that were added during asset life, but what they show - mostly should exist. If you run into something - please let me know, it's probably an issue.


    Well, I guess it's worth starting with lowering Noises intensity - it's them who define overall terrain height:
    upload_2023-11-21_22-7-33.png
    Then consider changing the curves, since they were made to work with high noise values.

    I didn't made it fully replicate MM1 graph, but I can see no seams or stair effects. The graph is attached.
     

    Attached Files:

  7. User414322

    User414322

    Joined:
    Jul 9, 2019
    Posts:
    27
    I've just sent the email. Apologies for having taken so long.
    I'm at your disposal to provide any resources I can to help you help me.
     
  8. barbamix

    barbamix

    Joined:
    Apr 6, 2018
    Posts:
    15
    Thanks for clarification, @Wright

    I was acutally starting to get some satisfying results. At first I thought something was wrong but after a lot of messing around I'm starting to get there. The thing is you have to blindly change a lot of values that you dont know what they actually represent. Also a lot of trials and errors.
    Maybe it would be useful to have tool tips for some values with short description and example about what it does. Maybe it would be more clear and beginner friendly.

    Anyways, I think I will use the asset since I can't find any other that does all the stuff MM2 does. Great asset it is!
     
  9. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    @Wright It seems that there is a bug with margins, I have the Main Margins in the editor to 15, with 129 resolution and it works fine, but in build the results it's like the resolution is set to 2. Could you check this?

    Also to add to that, it seems that resolution is not the same in build as in editor, there is some some spots in the map that the navmesh is build correctly, but when in build its a bit higher, and after multiple tests it seems that the map is in 257 resolution, at least the heights. Is there another spot that resolution/margins are handled while you build the game?

    edit: After further testing, the issue seems to be happening when the tiles generating on runtime, when the tile is pinned before build it's fine on the build as well. But on editor, even on closed tiles, when pressing play and generating them on runtime they work as intended.

    So in short the issue appears in build only, but only on closed tiles that generated on runtime. Hope it helps

    edit2: After more testing, when I changed the main margins from 15 to 5, it was working in build runtime as intended, so it seems to me that somehow it bypasses the main margins in build when tiles are generated on run time
     
    Last edited: Nov 26, 2023
  10. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    Yes, tooltips might be useful, but they will lose the lion's share of their usefulness without images. Unfortunately I can't add images or show examples here, but you can always look in the documentation. You can quickly get the right page by right-clicking on the node, Generator -> Help.
    upload_2023-11-27_11-10-7.png

    You mean margins set to 2, or resolution multiplied with 2?
    Are you sure that the tile you were looking into was not draft - it's quite easy to confuse them on such a low resolution, and draft has default margins of 2. It seems to be that the resolution doesn't change - in build I still get 129, just like in editor. I've also tried to find out if margins are changing, and all of the tiles seem to be welding similarly in both build and editor at first glance. Do you have a scenario on how this could be reproduced?
     
  11. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Main Margins set to 2. I m not sure about resolution but margins are having this issue for me. Have you checked with Main Margins 15, and with the tile closed before you build so that it generates in runtime the tile, cause if the tile is open the issue is not appearing. As for the Draft, I m not sure why draft generates in runtime and stays draft if that is the case, since I m in the tile for long enough to generate the main tile but here are my settings:




    edit: I m trying to disable the draft terrains in editor and playmode and I end up with so many tiles open with same settings as before (1 Main Range): is there a way to not having some many tiles open with just 1 main range?



    edit 2: Changed the draft settings to match Main settings (129 resolution and 15 draft margins), same issue, so its not the draft terrain that is generated.

     
    Last edited: Nov 27, 2023
  12. timothee_le_corre

    timothee_le_corre

    Joined:
    Sep 20, 2023
    Posts:
    9
    Hello, we have some issue with ILCPP, we just switch the compilation method to it and it multiply by 10/20 our loading time. In the editor we can load faster than in our build. Did we miss a settings ? Show we toggle off the Native C++ code or something like that ?
     
  13. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    MM automatically disables C++ code when the project is built using IL2CPP. Now it is C# code converted through IL2CPP instead of native C++. And yes, it is still much, much slower.
    Just to make sure - you are talking about not a project loading time, but terrain generate time?

    Just out of curiosity: how do you determine the margins size? I have tried to make a build with tile of your resolution (129) and margins 16, and checked the height matrix size on HeightOut's Finalize - the last moment it's used - but still get total resolution of 161. It's exactly 129+16+16. Do I miss something?
    Screenshot_4.jpg
     
  14. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    Sorry didnt understood the question, if you can elaborate. One think to add here is that I use Spline Tools for MM (3rd party app) for a while, and contacted the developer there as well as that might be the cause
     
  15. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    Sure. I've checked it, and it's still 16 for me. What makes you think that the resolution is set to 2? It's not easy to find it out using just a visual appearance of the terrain. Are you sure that it turns 2? Probably, the problem is in something else?
     
  16. NestorVG

    NestorVG

    Joined:
    Feb 12, 2019
    Posts:
    30
    Building for Android (I'm making a VR quest 2 compatible game) got this error:

    Exception: Cannot include plugin 'Assets/MapMagic/Tools/Plugins/x86/NativePlugins.dll' (Key: nativeplugins.dll;None) since plugin with the same name and architecture was already added ('Assets/MapMagic/Tools/Plugins/NativePlugins.dll (Architecture: None)'). UnityEditor.Android.AndroidBuildPostprocessor.CollectPlugin (System.String path, Unity.Android.Types.AndroidArchitecture architecture, System.Collections.Generic.Dictionary`2[TKey,TValue] pluginContainer) (at <eb597642bbca4ce2aa0c70543523a5c8>:0) UnityEditor.Android.AndroidBuildPostprocessor.PluginsDataFor (UnityEditor.Modules.BuildPostProcessArgs args) (at <eb597642bbca4ce2aa0c70543523a5c8>:0) UnityEditor.Modules.BeeBuildPostprocessor+<GetDataForBuildProgramFor>d__38.MoveNext () (at <11d97693183d4a6bb35c29ae7882c66b>:0) UnityEditor.Android.AndroidBuildPostprocessor+<GetDataForBuildProgramFor>d__21.MoveNext () (at <eb597642bbca4ce2aa0c70543523a5c8>:0) UnityEditor.Modules.BeeBuildPostprocessor.SetupBeeDriver (UnityEditor.Modules.BuildPostProcessArgs args)...
     
  17. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    347
    So the reason I m saying this is that on runtime (again, only in build and with the tile closed so it generates on runtime), in editor runtime is fine) I took screenshots of the landscape, and then went to editor and changed the Main Margins to different values and when i went from 16 to 2 it was the same result like the build, so it makes me think that is what happens.
     
    Last edited: Dec 5, 2023
  18. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146
    @Wright - how do i use multiple biome packages in VSP with mapmagic2?
     
  19. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146
    margins work fine for me...
     
  20. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146
    delete one of the duplicates?
    cmon man this is basic unity stuff....
     
  21. NestorVG

    NestorVG

    Joined:
    Feb 12, 2019
    Posts:
    30
    It's so basic it will not work when I remove either of them. Had to completely strip the asset from the project and redo a lot of stuff to get it to work and it's still giving issues :)
     
    Greviouss likes this.
  22. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    Try switch to pure C# by disabling C++ Native Code in Window -> MapMagic -> Settings and remove the whole MapMagic/Tools/Plugins folder.

    Unfortunately it's not possible, if I remember correctly. MM uses it's own biome system, and writes all to a single VSP biome.

    Do you have steps to reproduce it? Can you please email me the graph (and it's meta file), and instruct me on where to look exactly?
     
  23. timothee_le_corre

    timothee_le_corre

    Joined:
    Sep 20, 2023
    Posts:
    9
    Hello,

    I want to place structures like dungeons & stuff on my map, but some of them have underground parts and in rare case when they spawn the underground part is bellow our water level (that is a plane). I want to be able to know before placing my structure if the underground part is bellow the water level. What can be useful is having a way to approximate the real world height of a structure when we try to place it. Is there a way to have this kind of information ?

    Would be also useful to be able to flatten the terrain or set the terrain height at a world height.
     
    Last edited: Dec 7, 2023
  24. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    You can use the Selector node to define a minimum height for spawning the object, and then provide the result to Mask node that remove objects based on mask intensity.

    If you mean flatten height at dungeon entrance - then Flatten node seem to be what you are looking for.
     
  25. timothee_le_corre

    timothee_le_corre

    Joined:
    Sep 20, 2023
    Posts:
    9
    Thanks for the answer, but it's not really what I mean. Here is the workflow I have for my dungeon.
    I have a dungeon with 2 entrances, the entrances are not necessary on the same height level and not mirror each others.
    What I need to do with this dungeon is set his position, in the prefab the position is not at the same height level as the dungeon entrances, to set the position I want to be able to say "I spawn the dungeon at the height 100". In my workflow I know where the dungeon should spawn so I can calculate the height position of my dungeon entrances base on their local position.
    But in the end for this dungeon entrances I have the height in WORLD unit and the flatten doesn't allow flattening the terrain at a specific WORLD height, I tried to make it happen but I can't just do : DungeonEntranceHeight / GlobalHeight it will the normalize height off the entrance in the terrain but not in the current biome.
     
  26. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    The problem here as I see it is not in world height - you can just multiply 0-1 value with a total height you set in Height output. But you will create an infinite circle - you should have the height generated at the point of calculating dungeon exists. But still you have to change it afterwards to place dungeon exits. The only solution might be creating custom node that works in 2 iterations (instead making whole MM work in 2 iterations) - first you place the enters, calculate exit positions, and output exits. It will be buggy if enter of one dungeon will be close to the exit of the other, though.
     
    Greviouss likes this.
  27. TheHedgehogMan

    TheHedgehogMan

    Joined:
    Dec 12, 2023
    Posts:
    1
    Hello,

    I found this asset today, and after experimenting with it, I've noticed that the terrains look really cool. However, I'm struggling with splines. My use case is quite simple: an infinite, straight road with terrain generated around it. The 'Infinite Terrain' option in play mode arranges the terrains as I desire, but the issue is the flat area beneath the road. I can achieve this for the first terrain, but it doesn't work for subsequent ones. At the moment, I'm using positions, but I think they are not local to each terrain. Is there a way to create the same spline on each terrain? Or can I generate an infinite spline that is straight and flattens my terrains?

    The red line is the center terrain with the spline and stamp applied.

    upload_2023-12-12_20-45-30.png
    upload_2023-12-12_20-46-19.png
     
  28. timothee_le_corre

    timothee_le_corre

    Joined:
    Sep 20, 2023
    Posts:
    9
    Sorry for the late reply, I had moved on to something else on this topic, but I encounter this issue again. But it is more annoying because now with some modification I made in the way I spawn my monument (calculating position & flattening, I was spawning them always at the midle of the tile), if I use nodes like "Slide" to make my monuments spawn rarely on high relief, the tiny heights difference between Server & Client is enough to make my terrain not be flatten at the same place as the server (for the monument placement I can just send the correct position & rotation to place them correctly). I have no clue why it does this or what difference there is between my client & my server. But from what I remember from my test there is a tiny height difference just using one node like a noise or something like that, may be there is something wrong with the method you use for random ? In my custom nodes I use the System.Random and it works if the result doesn't depend on what the graphs generate.

    I joined the map magic config I use to generate the map if that can help.
     
    Last edited: Dec 14, 2023
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    Positions take coordinates in world units - you can make them big enough to cover several terrains. However, Floor node won't work here - it won't know the end height unless it will start to generate it. So you've got to spawn these two objects at some average level.

    Do I understand it correctly that you have a different result sometimes (1 time of 5) when you are generating the same graph? Does it happens in editor? What is your graph? What exactly should I do to reproduce it?

    The ideal steps description looks like this:
    1. open attached scene in Unity XXXX.XX
    2. generate attached graph in editor. Note the positions of objects named "Tree"
    3. unpin the tile and pin it again
    4. see the objects positions changed X units
    5. if the positions of the objects named "Tree" didn't change - try generating again 10 times.

    Feel free to email me your graph and scene.
     
  30. V1ncent7

    V1ncent7

    Joined:
    Dec 13, 2023
    Posts:
    1
    Hi,I am interested in purchasing the MapMagic 2 Bundle. I noticed on the official website that it states, 'The asset comes with the full source code.' However, I observed that in the resource package, specifically under the /tools/plugins path, there is a file named NativePlugins.dll. Could you please explain the function of this file? Also, will I have access to the source code of these files after my purchase?
     
  31. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    Unity doesn't allow C++ files in a package - since they are not assets. But you can always pull the sources from gitlab or dropbox.
     
  32. Giantsmall

    Giantsmall

    Joined:
    Apr 28, 2019
    Posts:
    18
    Hi,
    I would like to create output node/generator that would accept multiple MatrixWorld inlets but not as layers.
    Is that possible?
     
  33. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    Sure, take Unity Curve node as a reference. It accepts two matrices - inlet and mask, but theoretically you can make as many inputs as you want.
     
  34. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146
    I really kind of wish there was a more complete edition of the map magic 2 api coding / reference pages...

    Sure there is some stuff out there, but for two years now every day i have been neck deep in making map magic do this or that, I have on several occasions been unknowingly and usually ineffectively trying to reinvent the wheel through coding only to stumble upon some built in function that does what i have been trying to achieve for x amount of time already existing buried and i happened to stumble upon it and translate it as loosely what i was trying to do... that there was no real upfront hint of existing... and man is that ever a gut punch of wasted time...

    Yes i have success, and yes, i have a slightly more difficult goal for what im doing with map magic in making a world over an infinite terrain, but i have more time than the average person, and i am stubborn AF about making things work when i believe they should... and without a reference for the code for your tools, my successes are lackluster in a final product, or infinitely worse.. took so much longer to implement because i didnt know blah...

    Now sure... Im not the best coder, but im far from the worst... but... two years.... and, as far as i know im the most knowledgeable person when it comes to the code that is map magic 2 and how to use it besides you... and still to this day, theres a whole chunk of the map magic 2 api im not even sure about how it really works, or how to leverage it effectively in my custom node logic or other surrounding events..or that it even exists still....
    And i say effectively, but that really reads "at all" for most people who havent spent as long with it as i have.

    Please.... give the community a more fully fleshed out coding reference of some kind so we can more effectively utilize the amazing tools you have created...
     
  35. deneubenjamin

    deneubenjamin

    Joined:
    Feb 4, 2018
    Posts:
    4
    Hello, I'm a new user of map magic and I'm trying to generate infinite worlds with multiple biomes. I have no problems with the graphs and everything work well for generation, but I need to have a sort of API output for the biomes in order to know the biome of a given coordinates. I stuck and I can't find a way to do that. Does someone knows ?
    A general feedback would be to add a basic and clear api to map magic for easy connections with everything else, it fells very stuck to the graph today. It's probably not a problem for definite worlds but for procedural random infinite worlds it's more an issue.
     
  36. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    I believe the main purpose of this is to find out what weather/effects/sounds to play in different locations of the world. Actually MapMagic doesn't keep this data. Once the tile is generated (and even during) all the procedural maps are flushed. The reason it's stuck to the graph is because it's generates the tile separately from anything in a in a separate thread.

    BUT there are special nodes for this use case: Direct Textures and Direct Matrices. You can store biome masks you are using in a texture or a short script called Matrix Holder. You can find the way you can use holder in a second link, speaking of API.

    What would be the best API reference? I mean, I always tend to leave sane comments on what classes or methods do what in code, and I can run it through doxygen to convert these to document format without code to make something like this:
    upload_2024-1-2_15-54-20.png

    But will it really help?

    If it's not what you mean or if you have ideas - please share.

    Hmm, probably I should think of ChatGPT help in writing detailed descriptions.
     

    Attached Files:

  37. deneubenjamin

    deneubenjamin

    Joined:
    Feb 4, 2018
    Posts:
    4
    Oh ! great !
    Thanks for the fast answer I will check that ;)
     
  38. deneubenjamin

    deneubenjamin

    Joined:
    Feb 4, 2018
    Posts:
    4
    I've tried to use your example and it seems to work at the begining but when I get few hundres blocks away the values returned are not consistant with the real biome on map.

    Here is my simple test Biome graph:
    Capture d'écran 2024-01-02 165550.png
    And here is the simple code I attached to the player object:
    Capture d'écran 2024-01-02 165803.png
    In this simple example I have two biomes plains and forest, I look the value for forest, and sometimes it goes to 0 inside the forest or 1 in the plains.
    There is probably something wrong with my code but I don't know what.
    Huge thanks for help !
     
  39. MrCream

    MrCream

    Joined:
    Oct 26, 2020
    Posts:
    7
    Has anyone gotten dynamic navmesh generation working to be able to spawn agents?
     
  40. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146
    THIS... do this, pass me the results on discord or here in a DM, and i will gladly give them a full english speaking overhaul pass, so all the words make sense to everyone etc and send that back to you.

    .....as for the content itself...
    hmmm...... theres alot of topics and options im sure, but the top 6 that grace my brain in no particular order are :

    -- explanations for how more mm specific but not quite concepts work like coordrects, which are rects that are not rects etc
    -- explanations for how the functions bagged with the asset can effect the world in a real use way, theres alot of those, and they are not all readily apparent in how they work or what they do..., and this - is probably the biggest thing in this list...
    --explanations of what can and cannot be serialized, and how to get around it maybe,
    --a short reference list of what is and is not passed into C++ by default (this matters when your trying to get more performance)
    --explanations or a map of sorts showing where the most common things are actually hiding at and how to get to them via code (i.e. TerrainTile, TileData,Stop etc)
    --explanations about the various ways tiles actually work - pinned, vs appearing from nowhere,.. contextual use cases, mixing with static terrains... idk about this, but theres a variety of approaches on how people decide to go about this specifically, and most dont know theres even alternative ways to deal with tiles or even how to get them on a grid through code etc...

    im sure if i sat here and thought on it i could scale that up by 3 - 5 x for content to consider including, but also im just me, and i only know the walls ive personally hit that i wish i knew about how to deal with sooner, or at all even still in some cases lol... most of my list is things that people have asked me in one way or another how to achieve on discord atleast once. Other people adding to what that content should be based on thier experiences and perspectives could potentially go a long way.

    The final result.. maybe a mapmagic wiki or howitworks style web reference, with a slimmed down pdf for quicker and offline reference included with the unityasset
     
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    Do you mean few hundred tiles? It's hundreds of kilometers, but theoretically it still should work, it's not affected with floating point precision. Will check why is it so.

    Are you talking about some specific asset, or you mean re-baking Unity's navmesh in realtime? I can't recommend the last one - it takes quite a long time and the last I've checked it could not be brought into a separate thread. So the game will lag for several seconds on each tile apply.

    Okay, will try to find the best way to do it.

    Now these are very interesting questions. Yes, now I see what exactly could be clarified. Thanks for this! I guess scripting FAQ will become too vast, so I guess I'll make a new section on wiki.
     
    Greviouss and MrCream like this.
  42. MrCream

    MrCream

    Joined:
    Oct 26, 2020
    Posts:
    7
    yeah so i can spawn enemies do you know of a good alternative or should i just stick with no endless world generation?
     
  43. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146

    look into floating point origin..


    @Wright - Does mm handle this? Far as i can tell, no.. and i see above you dont think mm is effected by it, and i agree so far as the scope is mm within itself...
    however...
    UNITY... definitely suffers from this... even if mapmagic does not...
     
    Last edited: Jan 5, 2024
  44. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146
    Give this a look
     
  45. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    MapMagic 2 has no integrated floating point solutions - but it doesn't mean it doesn't support them. It's a bit out of scope of terrain generator. MapMagic 1 had one - just because it could not work with other solutions. But MM2 has no such limitations, and theoretically might work with most of the solutions available (like this one: http://wiki.unity3d.com/index.php/Floating_Origin by Peter Stirling)

    This solution might fix shadows or collision issues, but has nothing to to with the way MM works internally. It doesn't depend on objects positions. MM maps work per-pixel, and pixel coordinates are integers. With the default pixel size you can travel 2 million kilometers in any direction. For comparison our Earth repeats itself after 40 thousand km.

    Wow, it looks like this dynamic pathfinding solution was made specifically for MapMagic. Cool! Adding this to FAQ!
     
    Last edited: Jan 5, 2024
  46. MrCream

    MrCream

    Joined:
    Oct 26, 2020
    Posts:
    7
    awesome ill look into it once i log back in tomarrow thank you
     
  47. Greviouss

    Greviouss

    Joined:
    May 27, 2016
    Posts:
    146
    It was i think...
     
  48. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,258
    I've tried to reproduce it, but it seems to generate proper matrices and read them at -2919000 units from origin. I have tried it with example scripts. Yours is an image, so I can't copy-paste it, but it looks like it's correct. Do you have a specific reproduction case? If so, could you please email it (just graph, scene and script files)?

    And in order to debug this all I've added these buttons to Matrix Holder script:
    upload_2024-1-7_10-27-6.png
    Pressing them opens the same preview window that is opened when clicking on node preview. This will be available with next update, but you can copy script directly to check it now.
     
    Greviouss likes this.
  49. deneubenjamin

    deneubenjamin

    Joined:
    Feb 4, 2018
    Posts:
    4
    Ok thanks for testing, it's probably my reading function that does not read the proper tile so !
    I will investigate on that !

    Edit: I will investigate a bit more on that to be more confident of what is the problem and when it occurs before sending you a potential email
     
  50. MrCream

    MrCream

    Joined:
    Oct 26, 2020
    Posts:
    7
    any tips or solution on running a lot of trees(Objects not terrain trees) in a large scene and still maintaining performance with map magic im looking into world streaming but if there is a solution already available that would be great