Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Map Magic World Generator - a node based procedural and infinite game map tool

Discussion in 'Assets and Asset Store' started by Wright, Mar 10, 2016.

  1. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    332
    I have another question now though. How can I know if my changes to the map graph have been saved or not?
    I am not really sure what each of the buttons are for either, Reset, Release and Save as Copy. I believe I understand Save as Copy, been using that. What is release and reset though? I didn't find them in the documents (probably was looking too late at them or something).
     
  2. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    332
    Yeah, that was a great explanation. I didn't even think of the raw image, that would probably make a gradient like I want much easier. Your system is incredibly flexible with many ways to do something, I love it!
    I rewatched the biome merging you did to see how you blend them using the normalization using layers. I will give that a shot. I'll still need 6 biomes surrounding the central biome to get my desired effect but I can see the light at the end of the tunnel now, very exciting!
    I asked another question about saving though. If you could look at that and maybe explain how the graphs get saved a little that would go a long way towards helping me understand how to create my biomes correctly.

    Thanks again for the help and wonderful product!

    PS I just submitted a long overdue review. This is definitely one of my favorite assets to work with!
     
    Last edited: Dec 24, 2017
    camta005 likes this.
  3. Aress28

    Aress28

    Joined:
    Dec 12, 2015
    Posts:
    58
    Hi. I im created my islands and im happy with this asset.ATM just need pull down terrain under water cuz my underwater should have lets say 200m deep...now its at 50..how i make my terrain go down and make smooth deep from island shore line?i tried manual painting but its not gona work...cuz of terains slices...
    sorry for my english...
     
  4. LucianBlack

    LucianBlack

    Joined:
    Sep 28, 2017
    Posts:
    45
    Hello. I just purchased Voxeland 5 today. I have an active project that I am trying to implement this into. When I added Voxeland, I have an all black terrain. I have ensured that the shader is set to just Land and not the Land Array. If I try opening the demo scene (whilst in my active project), same result. If I try to integrate this into another project, same result. If I create a brand new project, I can run the demo scene just fine, as long as there are not any other assets integrated.

    I am using Ultimate Survival and the closest I can get to using this terrain is seeing an all pink terrain. I have been trying to sort this for sometime, any input is really appreciated.
     
  5. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    By the default the graph you are creating is stored in the scene where MapMagic object is saved. You can assign a saved data in Data slot - this will replace your current graph with an assigned one. Re-selecting a MapMagic object is required for changes to take effect.
    - Reset button will clear current graph and replace it with a blank one;
    - Store to Assets will export current graph as an .asset file and assigns the stored scene in a data slot. All the further graph changes will cause changing of the stored asset.
    - Save as Copy will duplicate current graph and save it as an .asset file. Changing the graph will not affect the stored asset.
    - Release (visible if data is saved) will unwire current data from saved asset and will keep the data in scene (like it was in the default).
    (here)

    The moment the data is saved in file is the same as any other Unity asset (here). It's either "Save Project" or "Save Scene" clicks.

    Thanks for your review! I really appreciate it!

    You've got to start with increasing the maximum terrain height. This will stretch all of the terrains up, so you've got to reduce the above-water terrain height (for example, using Curve).

    LucianBlack, take a look at Voxeland thread
     
    Shawn67 and boysenberry like this.
  6. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    29
    Hi,

    I've been following the video tutorial and I have three questions:
    1) I can't find the LOD tree models, only the normal ones.
    2) Why are the distant trees darker? This also happens in play mode.
    3) Why am I getting the warning "The tree PineMed1 must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly."

    I'm using the latest version of MM and Unity 2017.3
    MM.PNG
     
  7. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    29
    One more thing, when I added my Birch trees, they are all white. mm2.PNG
     
  8. Candac59

    Candac59

    Joined:
    Sep 18, 2015
    Posts:
    100
    I'm not sur but try too "generate" all trees
     
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    It's all is caused by the way Unity tree billboards work. Unfortunately I can do nothing about it. The trees should have a special shader (and a special folder name). The bad thing is that this shader looks ugly: trees do not receive shadows and the light is lit uniformly. I don't know if it is okay for mobile devices (but I doubt that for the modern ones), but using unlit shader for the trees nowadays is kinda mauvais ton. Trying to use the other shader results in the warnings you've noticed. It will also render billboards with the tree shader anyways, so they will be slightly different from their original models (in this case - darker). There's nothing I can do about it: either use graphics from the early 2000's or endure warnings and slightly visible billboard-model transition.
    BTW billboard trees do not support "composite" objects like LODs, so I had to abandon using them too.

    And speaking about the birch - I don't really know why this happens. Could you please try adding the birch tree model to the new terrain without using MapMagic - will it's billboard look white too?
     
  10. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    147
    @Nitrox32 Do your trees have the same issues in the demo scenes?
     
  11. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    29
    No the demo scene looks great. The pine trees in the distance look normal. I also tested the birch trees in a new project and they look normal at distance and close up. I've created the tutorial scene before and everything looked great. Now the birch trees are white (or dark grey) and the pine trees at a distance look black. Here is an example of the birch trees on a simple unity terrain not using MM. mm3.PNG mm4.PNG
     
  12. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    29
    Here is a picture of my tree generators. I used the legacy generators so I could more accurately follow the tutorial. mm5.PNG
     
  13. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    29
    Anyone? I have started the tutorial over again. Periodically checking trees up close and at distance by individually placing both birch and pine trees. Everything was fine until I added the tree generator. Then I started getting white trees in the distance. Funny thing is that I can place an individual tree in the distance and it looks fine. Problem with the tree generator? Also my prefabs for both the stones and trees are starting out unchecked and not visible. Right now MM is useless to me.
     
    Last edited: Dec 31, 2017
  14. Matt-Roper

    Matt-Roper

    <Of The Graphics> Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    105
    @Wright

    Hey, still really loving the product :D

    I was wondering, is it posssible to trigger a re-texture/foliage placement only? I've done a lot of manual sculpting in the world and don't want to lose any hand-painted data, but would like the automated texturing/foliage placement. I plan to be able to expand my world at a later date and mix biomes

    Cheers!
     
    Lars-Steenhoff likes this.
  15. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    Nitrox32, I could not reproduce the issue with the white trees. I admit that trees look a bit different when enabling billboard LOD, but nothing that different.
    You can place trees as prefabs by using Objects output instead of the Trees output. Demo trees do not have LODs, so it could be not optimal to use them this way for the performance reasons, but I guess you are going to use your own tree models anyways, so making LODs and placing trees as objects rather then terrain trees.

    Make sure that you have gameobject/renderer enabled in your prefab. Similarly to manual prefab placing, MapMagic will instantiate the prefab as it is, without additionally changing any enable state.

    Thanks! It's a feature I'm implementing for v2.0. It will have a new lock system, allowing locking of some particular Output node. This way you will be able to use MapMagic to automate texturing or grass painting of a manually created terrains.
     
  16. Matt-Roper

    Matt-Roper

    <Of The Graphics> Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    105
    @Wright any eta on v2.0?

    Also, is it possible to uniform scale the resolution? I wnna up the terrain reso but it stretches the current nodes rather than a repeat approach, any way around this?
     
    Last edited: Jan 3, 2018
  17. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    131
    Curious if any progress has been made on rivers/roads as mentioned in the past. Do you have a current roadmap?
     
    camta005 likes this.
  18. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    If everything goes well it will be released in a couple of months. There's already a beta version on GitLab (email me if you'd like to have an access), but the advanced lock feature is not yet implemented.

    Stretches the nodes? I don't quite get it what you are trying to achieve, but I'd like to mention that changing resolution will add more detail, but will preserve the overall terrain look. It will not make the fractal noise pattern (for example) smaller, but will add levels to make it more detailed.
    If you are going to reduce all of the patterns at once:
    - scale down the MapMagic object
    - increase the chunk size
    - and finally lower the resolution - i you'd like to prevent the same detail level

    Probably you will see the first spline generators in v2.0. It will be more like a beta, though, just to find out spline possibilities and user demands to move further.
     
  19. shedworksdigital

    shedworksdigital

    Joined:
    Nov 7, 2016
    Posts:
    13
    Hi @Wright I was wondering if you could explain what OnPrepareStarted, OnGenerateCompleted and OnApplyCompleted are for? It seems OnPrepareStarted happens much more frequently than the other two, but I'm still not sure what they each mean.
     
  20. Aress28

    Aress28

    Joined:
    Dec 12, 2015
    Posts:
    58
    i cant figure out how and if its even posible to change height only above water level?where i should put curve to do it if its posible?

    Ok ifindwayout likealways when u tried like allways and nothings works ...u post in forum and then 5min and u sort problem out :D i find how to set Curve magic to change only height above water level
     
    Last edited: Jan 4, 2018
  21. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    170
    I actually dropped by to say that MM desparately needs road support....and yes! I can't wait for 0.2
     
    camta005 likes this.
  22. Matt-Roper

    Matt-Roper

    <Of The Graphics> Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    105
    @Wright

    There was some funny issue where changing the resolution would result in the terrain deforming differently, upping the res caused my mountain ranges to become shorter for example... think it is a bug though as changing the resolution afterwards yielded the expected results
     
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    Code (CSharp):
    1. OnPrepareStarted
    called in main thread before the generate started. To load RAWs, textures, etc. In MapMagic < 2.0 it's called once for each generator for each terrain chunk. In > 2.0 it's called once for each terrain chunk.

    Code (CSharp):
    1. OnGenerateCompleted
    called in a generate thread after all of the generate work is done and terrain apply is queued. Called once for each chunk.

    Code (CSharp):
    1. OnGenerateFailed
    (v2.0 only) called in a generate thread after MapMagic has encountered an error during generate and could not create chunk. Called once for each chunk in case of error only.

    Code (CSharp):
    1. OnApplyCompleted
    called in main thread after the chunk is generated and generate results were applied. At the moment of OnApplyCompleted the chunk is ready and will not be changed by MapMagic until next generate. Called once for each chunk.

    So you got the different result (small and big mountains) while you were generating the second time? That should not happen, please let me know if you encounter this again or find way to reproduce it.
     
  24. sekever-n00b

    sekever-n00b

    Joined:
    Nov 4, 2017
    Posts:
    9
    Hello!
    I didnt try biomes yet but do the different setting in General Settings follow different biomes or i need to prepare one setting for all biomes ?
     
  25. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    856
    @sekever A biome is generated within a MapMagic instance and uses its settings. They don't each have their own settings.
     
    Wright likes this.
  26. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    23
  27. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    147
    In the settings there is the floating point origin solution that you can use:
     
  28. Aress28

    Aress28

    Joined:
    Dec 12, 2015
    Posts:
    58
    have problem in Play Mode
    is there any fix and why its like that?
     

    Attached Files:

  29. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    147
    Are you using Aquas water? I had the exact issue caused by the reflection probe attached to the Aquas waterplane. You can fix it by changing the pinned terrain reflection probes setting to 'blend probes and skybox'. In the next update Denis is going to expose the terrain reflection probes settings in the MapMagic settings so you can set it for all terrians.
     
    Last edited: Jan 8, 2018
    malkere likes this.
  30. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    70
    Hello, Is it possible to determine biome off a image, similiar to Heightmap? So Color detection?
     
  31. pigglet

    pigglet

    Joined:
    Aug 13, 2014
    Posts:
    39
    Hey! I haven't visited this topic for more than a year, so I'm willing to make a quick check before reading all the new discussion pages: does MapMagic already have a road\river generator?
     
  32. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    856
    The built in solution as suggested by camta005 is not a solution and will still break the physics as it only moves the mapmagic parent object offsetting the terrains, which does not fix the math. I have brought this up for over a year now and it is still not implemented, there is a version 2.0 supposed to come out in a few months, though the features aren't really clear.

    In the meantime I have a makeshift solution that you can find if you search for my name posted a page or 2 or 3 back. It's working for me so far, but it's definitely not a long-term solution. Having said that, everytime I try to leave MapMagic and do things myself so that I can design my game world as infinite from the ground up, things only work at about 10% the quality that MapMagic gets them going >_< it's a great tool, I just REALLY wish is would provide a real floating point error correction system. /fingerscrossed
     
    camta005 likes this.
  33. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    That's right.

    MapMagic has a built-in in solution to overcome this issue. It offsets all of the world when player (or camera) object position exceeds some range. As malkere said it's not ideal, but at least worth trying. I'm testing each version by running 20 km in random direction. It does not seem to be THAT much, but actually it's bigger than most of the open world games (Skyrim is 6*8km, GTA V and The Witcher 3 are 15*15 km).

    Thanks for the hint, didn't know about Aquas reflection probe. Yep, it's in my to-do list.

    You can use those heightmaps to mask biomes too. There is no difference between the biome mask and height map.

    No.
     
    boysenberry likes this.
  34. Aress28

    Aress28

    Joined:
    Dec 12, 2015
    Posts:
    58
    yes i have Aquas Water.Will check
     
  35. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    70
    Thanks for the response, I actually have a picture that has a single color for each biome, and there are over 40 biomes.
    The picture is identical to the heightmap just with color instead. My question was is there a feature in map magic that can detect these pixel colors and place a biome at that location? Or have i misunderstood your answer?
     
  36. famu82

    famu82

    Joined:
    Aug 14, 2017
    Posts:
    2
    Hello, I'd like to ask if and how can I achieve a blocky effect on mapmagic, a bit like this:

    Or perhaps with an external script. I did try one on the asset store, called Voxels for Unity: Rasterizer, but it didn't work. I tried also to export the mesh from MapMagic with "Terrain to obj", and then convert into blocks with an external software, but of course all of the textures made in MapMagic were lost in the process.
    Thank you.
     
    Last edited: Jan 9, 2018
  37. shedworksdigital

    shedworksdigital

    Joined:
    Nov 7, 2016
    Posts:
    13
    Could you explain a bit about how this queue works? I presume the application must be done on the main thread. Is the queue there to spread the process out over several frames so as not to lock up the main thread?

    Thanks for the info!
     
  38. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    258
    @famu82 use the terrace tool and play with the adjustments. On one extreme everything is buttery smooth, and on the other the terrain has very pronounced steps. I'm not sure if it will actually make the terrain as squares though, you might need to use MM with Voxeland to get that effect.
     
  39. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    For each of the biomes it's own grayscale map should be used. And that's the reason why:
    I assume you are using mixed colors like yellow or cyan to display all of the 40 biomes at one map, but the texture has only 4 channels. From the machine's point of view yellow is just a mix of red and green. It cannot distinguish between gray biome and blending of red, green and blue biomes - at least without complex analysis of nearby pixels and "clear" biome areas - and anyways it will not give 100% correct result. Don't you want to get snow between the desert and the tropical biomes?

    As far as I can say it's not a terrain engine - or at least not 2.5D terrain engine. Terrain cannot create absolutely vertical walls - it cannot place one vertex right above the other, no matter how steep the terrace generator is. Voxeland might help, it's a voxel terrain engine, but it was not designed do display individual blocks. The terrain generated will be "smoothed" a bit.

    After calling generate or enabling the new chunk it's performing the following actions:
    - texture and RAW inputs load assigned textures in main thread - this stage is called prepare. OnPrepareStarted called when it's starting.
    - chunk starts a new thread and performs all the calculations in it. It writes float[,] for height output, float[,,] for textures output (and other objects for other outputs) to the chunk "results" array. It's the longest stage, it's called "generate". OnGenerateCompleted is called in the generate thread after all of the nodes have been generated.
    - after all the nodes generated MM starts a coroutine called "Apply". It applies the generated objects (float[,], float[,,], etc) to terrain as heightmap, splatmap (alphamap) and so on. It's done in main thread. When everything is applied OnApplyCompleted is called.
     
    protopop likes this.
  40. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    70
    Hmm, was hoping I could do it with RGB data, as I know the RGB data of each color. Thanks for the quick reply.
     
  41. famu82

    famu82

    Joined:
    Aug 14, 2017
    Posts:
    2
    @Wright and @trilobyteme thanks for your answers. I decided to switch to a different workflow, involving different programs. If anyone is interested PM me because I don't feel I should talk about competitor softwares here.
     
  42. shedworksdigital

    shedworksdigital

    Joined:
    Nov 7, 2016
    Posts:
    13
    @Wright would it be possible to add a callback that fires when MapMagic is about to destroy a terrain? I'm streaming in scenes containing gameplay objects over the top of MapMagic and I would like to know when I can unload them.
     
  43. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    428
    @Wright Would it be possible that you provide various files which we can import as templates? I really don't want to do everything from scratch and they would be helpful for learning. Thank you!
     
  44. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    3,918
    Getting several runtime errors under 2017.3:

    Code (CSharp):
    1. Error generating chunk: MapMagic.Coord x:-1 z:-4: System.InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
    2.   at (wrapper managed-to-native) UnityEngine.Object:EnsureRunningOnMainThread ()
    3.   at UnityEngine.Object.GetInstanceID () [0x00002] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.cs:31
    4.   at UnityEngine.Object.IsNativeObjectAlive (UnityEngine.Object o) [0x0003b] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.cs:134
    5.   at UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) [0x00025] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.cs:98
    6.   at UnityEngine.Object.op_Equality (UnityEngine.Object x, UnityEngine.Object y) [0x00003] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.cs:253
    7.   at MapMagic.ObjectOutput.Process (CoordRect rect, MapMagic.Results results, MapMagic.GeneratorsAsset gens, Size terrainSize, System.Func`2 stop) [0x0019b] in C:\Unity\DG\Assets\MapMagic\Generators\OutputGenerators.cs:773
    8.   at (wrapper delegate-invoke) MapMagic.Action`5<MapMagic.CoordRect, MapMagic.Chunk/Results, MapMagic.GeneratorsAsset, MapMagic.Chunk/Size, System.Func`2<single, bool>>:invoke_void__this___CoordRect_Chunk/Results_GeneratorsAsset_Chunk/Size_Func`2<single, bool> (MapMagic.CoordRect,MapMagic.Chunk/Results,MapMagic.GeneratorsAsset,MapMagic.Chunk/Size,System.Func`2<single, bool>)
    9.   at MapMagic.GeneratorsAsset.Process (CoordRect rect, MapMagic.Results results, MapMagic.GeneratorsAsset gens, Size terrainSize, System.Collections.Generic.HashSet`1 changedTypes, System.Func`2 stop) [0x0022b] in C:\Unity\DG\Assets\MapMagic\Main\GeneratorsAsset.cs:479
    10.   at MapMagic.GeneratorsAsset.Calculate (CoordRect rect, MapMagic.Results results, Size terrainSize, Int32 seed, System.Func`2 stop) [0x0001e] in C:\Unity\DG\Assets\MapMagic\Main\GeneratorsAsset.cs:231
    11.   at MapMagic.Chunk.ThreadFn () [0x0005b] in C:\Unity\DG\Assets\MapMagic\Main\Chunk.cs:219
    12. UnityEngine.Debug:LogError(Object)
    13. MapMagic.Chunk:ThreadFn() (at Assets/MapMagic/Main/Chunk.cs:222)
    14. MapMagic.ThreadWorker:ThreadFn() (at Assets/MapMagic/Main/ThreadWorker.cs:533)
    15.  
    This cascades down to several other errors trying to log information from the error in the thread:

    Code (CSharp):
    1. get_name can only be called from the main thread.
    2. Constructors and field initializers will be executed from the loading thread when loading a scene.
    3. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
    4. UnityEngine.Object:get_name()
    5. TerrainEvents:MapMagic_OnGenerateFailed(Terrain) (at Assets/Scripts/TerrainEvents.cs:46)
    6. MapMagic.MapMagic:CallOnGenerateFailed(Terrain) (at Assets/MapMagic/MapMagic.cs:48)
    7. MapMagic.Chunk:ThreadFn() (at Assets/MapMagic/Main/Chunk.cs:223)
    8. MapMagic.ThreadWorker:ThreadFn() (at Assets/MapMagic/Main/ThreadWorker.cs:533)
    9.  
    Code (CSharp):
    1. Thread Error: UnityEngine.UnityException: get_name can only be called from the main thread.
    2. Constructors and field initializers will be executed from the loading thread when loading a scene.
    3. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
    4.  at (wrapper managed-to-native) UnityEngine.Object:get_name ()
    5.  at TerrainEvents.MapMagic_OnGenerateFailed (UnityEngine.Terrain terrain) [0x00007] in C:\Unity\DG\Assets\Scripts\TerrainEvents.cs:46
    6.  at MapMagic.MapMagic.CallOnGenerateFailed (UnityEngine.Terrain terrain) [0x00011] in C:\Unity\DG\Assets\MapMagic\MapMagic.cs:48
    7.  at MapMagic.Chunk.ThreadFn () [0x000a0] in C:\Unity\DG\Assets\MapMagic\Main\Chunk.cs:223
    8.  at MapMagic.ThreadWorker.ThreadFn () [0x00020] in C:\Unity\DG\Assets\MapMagic\Main\ThreadWorker.cs:533
    9. UnityEngine.Debug:LogError(Object)
    10. MapMagic.ThreadWorker:ThreadFn() (at Assets/MapMagic/Main/ThreadWorker.cs:557)
    11.  
    As well, the following runtime error is thrown when cleaning up materials in chunk.cs:

    Code (CSharp):
    1. Destroying assets is not permitted to avoid data loss.
    2. If you really want to remove an asset use DestroyImmediate (theObject, true);
    3. UnityEngine.Object:Destroy(Object)
    4. MapMagic.Chunk:OnRemove() (at Assets/MapMagic/Main/Chunk.cs:147)
    5. MapMagic.ChunkGrid`1:Deploy(CoordRect[], CoordRect[], Object, Boolean) (at Assets/MapMagic/Main/ChunkGrid.cs:380)
    6. MapMagic.MapMagic:Update() (at Assets/MapMagic/MapMagic.cs:227)
    Strangely enough, I changed the Destroy to DestroyImmediate, and it threw the same error!

    Code (CSharp):
    1. Destroying assets is not permitted to avoid data loss.
    2. If you really want to remove an asset use DestroyImmediate (theObject, true);
    3. UnityEngine.Object:DestroyImmediate(Object)
    4. MapMagic.Chunk:OnRemove() (at Assets/MapMagic/Main/Chunk.cs:147)
    5. MapMagic.ChunkGrid`1:Deploy(CoordRect[], CoordRect[], Object, Boolean) (at Assets/MapMagic/Main/ChunkGrid.cs:380)
    6. MapMagic.MapMagic:Update() (at Assets/MapMagic/MapMagic.cs:227)
    Not sure what is happening there, because I've used DestroyImmediate quite a bit in other code, and it doesn't throw the error...
     
    boysenberry likes this.
  45. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    147
    In the wiki there is the Badlands and Snow Plains:

    https://gitlab.com/denispahunov/mapmagic/wikis/community_graphs


    I found it simplest to just use the .nodes files (right click to import a .nodes file into the map magic editor).
    Also the textures have not been included so you need to assign your own in the textures generator.
     
    Last edited: Jan 14, 2018
    boysenberry, protopop and Rowlan like this.
  46. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    MapMagic uses a terrain pool to "create" and "destroy" terrains. Instead of destroying, it just disables it and enables back when it's moved to the other chunk position with height, splat and everything applied. OnApplyComplete event means that all that stuff is applied, this way the chunk has moved to the new coordinate successfully. Consider it "destroyed at the old position".

    I'm thinking about adding some of the graphs I've made to explain the way to do this or that here on forum to the page camta005 mentioned. Guess it would be handy to have these "advice graphs" gathered in one place.

    Fixed. Thanks!

    Do these error occur in demo scene? Are you changing the generated land with scripts? When does the first error occur (probably it's scene load, but I'm asking to be sure)?
     
    boysenberry and Rowlan like this.
  47. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    147
    That would be great, the more example graphs to play with the better.

    Edit: fixed.
     
    Last edited: Jan 14, 2018
  48. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,312
    Oops, that's a wrong page, I will remove it.
    Here is the right one. I've added exported nodes data links here.
     
    camta005 likes this.
  49. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    147
    Thanks, just keeping you on your toes :)
     
  50. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    514
    Hi, denis
    I've got a strange problem when using MM to stream infinite terrain.
    upload_2018-1-14_21-38-55.png
    As you can see in the picture, the 0,0 terrain tile is marked as terrain 1,-1 and the 0,0 terrain gameobject was used as terrain 1,-1. Since I'm using vegetation studio and microsplat which will add component on the terrain tile and contents under the the terrain tile's transform, this can cause extra unneeded components or vegetation system gameobjects appear:
    upload_2018-1-14_21-48-8.png
    This sometimes causes a terrain tile completely without vegetation, any ideas how this bug appears and how can I fix it?

    PS: The 0,0 terrain tile is not pinned and I'm not using world shifting.