Search Unity

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. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Yes, but I plan to do it after the biomes implementation.
     
  2. terravires

    terravires

    Joined:
    Mar 27, 2013
    Posts:
    103
    @Wright
    Well I sent you an email but I haven't got a reply yet. However, I'm not even sure if it made it through because of the scene .zip attachment.

    No matter what I try I can't seem to recover my data even though it's clearly still there. I can copy the scene file from one project to another, and the nodes show back up in MM editor window. But then I get tons of other errors about Terrain (null references) no longer existing because of course that object doesn't/never existed on the file system.

    So I tried to export from another project to the main one, can't do it since your terrain data doesn't exist. I could export a heightmap but not get the splatmaps/detail maps. Also tried to copy between scenes in the same project with multi-scene edit, and MM complains about duplicate objects then disables one. Not a problem but then when I copy/paste component values MM fails because "object terrain" doesn't exist. I guess there is a direct reference to the terrain data in memory that again doesn't exist on disk.

    I then tried to make a prefab of the Map Magic object and that too failed, again since your terrains don't exist on disk. Without a way to export your MM node setup, it seems impossible to export/share MM terrains.

    After losing three node builds, I'm a bit hesitant to try again. I'm really hoping you can find a fix for all this soon as otherwise it is unusable for me. :(

    Again, a way to export node setup would really help resolve a lot of this. :D

    Edit/Update: So I also tried additive load scene of just different MM objects, that failed, emailed you the exceptions with that bug.

    I gave up trying anything with multi-scene and tried a basic single (4 pinned/non-infinte) noise terrain. Had that working with about 5 nodes, no textures or objects spanwers yet. I had the MM editor window docked and double clicked a single console warning in one of my scripts for a variable that was defined but never used. I changed the code in VS2015, then saved and alt-tabbed back to unity... Poof, MM again lost ALL nodes in the docked window. No errors or warnings in console, just MM window has no nodes. Closing the window and reopen via MM/Show editor still is empty.

    Unity 5.3.4f1, MM 1.2, VS2015 if that matters.
     
    Last edited: May 7, 2016
  3. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    terravires, I've got a email with a scene attached yesterday - I don't really know if it was you - and I wrote back now, so if you don't receive my mail please try storing the scene in dropbox, gdrive, etc and send me a link.

    If anyone else is expecting a similar problem please contact me as I still cannot reproduce this bug. Any information about it will help a lot. Thanks in advance!
     
  4. HolyFireGames

    HolyFireGames

    Joined:
    Apr 23, 2014
    Posts:
    134
    @Wright - Hey there just checking in to see if the endless terrain with multiple positions is stable enough to test out. If it is stable enough, could you send us a beta version to try out? Thanks!
     
    Last edited: May 10, 2016
  5. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    I plan a beta release in a next few days. It will include multi-camera support, node groups, and some internal changes internal changes like switching to data to scriptable asset.

    2All: If you'd like to participate in MM 1.3 beta please email me your order number or forum name. I'll be glad to send you a new version to try.
     
    HolyFireGames likes this.
  6. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I just picked this up today and so far it's great! I was wondering if you could add some things that would make it easier to make procedural islands without needing to first model an actual island and export to RAW. For example, Gaia includes a "Distance Mask" curve that uses the distance from the center of the terrain (so a linear 1-0 curve would make a circle that fades from white at the center to black at the edge, multiply with it to make a rough island). Even better would be a way to hook into the Voronoi generator with a mask that works at the cell level rather than the pixel level, so you could overlay a circle on a Voronoi diagram and get different random island outlines. I'll probably try to figure out how to do both of these things on my own (thank you for making a plugin interface!) but I'm sure a lot of other people are looking for similar effects. :)

    Edit: I went ahead and made a simple Distance Mask, for anyone who wants to use it (or Wright feel free to include it if you want):

    Code (csharp):
    1. [System.Serializable]
    2.     [GeneratorMenu(menu = "Custom", name = "DistanceMask", disengageable = true)]
    3.     public class DistanceMask : Generator
    4.     {
    5.         public Output output = new Output("Output", InoutType.Map);
    6.  
    7.         public override IEnumerable<Output> Outputs()
    8.         {
    9.             yield return output;
    10.         }
    11.  
    12.         public override void Generate(MapMagic.MapMagic.Chunk chunk)
    13.         {
    14.             var matrix = chunk.defaultMatrix;
    15.             if (!enabled)
    16.             {
    17.                 output.SetObject(chunk, matrix);
    18.                 return;
    19.             }
    20.  
    21.             var centerX = matrix.rect.Center.x;
    22.             var centerZ = matrix.rect.Center.z;
    23.  
    24.             var min = matrix.rect.Min;
    25.             var max = matrix.rect.Max;
    26.  
    27.             var radiusX = max.x/2f - 1;
    28.             var radiusZ = max.z/2f - 1;
    29.  
    30.             for (int x = min.x; x < max.x; x++)
    31.             {
    32.                 for (int z = min.z; z < max.z; z++)
    33.                 {
    34.                     var dx = (centerX - x)/radiusX;
    35.                     var dz = (centerZ - z)/radiusZ;
    36.                     var dist = Mathf.Sqrt(dx*dx + dz*dz);
    37.                     matrix[x, z] = Mathf.Clamp01(dist);
    38.                 }
    39.             }
    40.  
    41.             if (chunk.stop) return;
    42.             output.SetObject(chunk, matrix);
    43.         }
    44.  
    45.         public override void OnGUI(Layout layout)
    46.         {
    47.             layout.Par(20);
    48.             output.DrawIcon(layout);
    49.         }
    50.     }
     
    Last edited: May 12, 2016
  7. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Also wanted to say that like terravires, I have hit the bug where all the nodes are deleted several times now. It was just in the two demo scenes; at first they were there, then I closed that scene, made a new one with a new MapMagic object, then went back and loaded the demo scene again, and all the nodes had vanished. It happened multiple times; I had to reimport the demo scenes to get them to come back. Using Unity 5.3.4f1. I also agree with terravires that being able to save the graph as JSON or a Unity ScriptedObject would be very useful.
     
  8. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Here is a quick fix for loading all of the disappearing nodes: Serializer.cs

    Thanks for the code! I think about making a library of custom generators, where anyone can commit the generator he made. I have not contemplated the details - should it be wiki, or github, or any other way to store data - so if anyone got the thoughts about that feel free to share them.
     
    Last edited: May 12, 2016
    lazygunn and makeshiftwings like this.
  9. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    You could check out how PlayMaker handles it - they have (or at least had) a system where people could upload their own 'actions' and people could download them using a tool within Unity.

    Wiki is pretty easy though! I'd probably rather just download scripts and put them where they need to go. Otherwise you spend time on that tool instead of some other fun or useful feature in MM :)
     
  10. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    102
    I would prefer a public Repository like GitHub or Bitbucket which I've already in use, because you have the option to define a main development branch and different feature or bug-fix branches without influencing the main branch to hold it stable. Bitbucket also supports a simple tracking tool for feature requests and bug reports and a simple wiki solution. You also have the possibility to add any file and sources as download.

    Btw: I'm still developing the watershed generator. Actually I've finished a priority queue and a simple weighted a* pathfinding implementation. But summer has surprisingly break through, by this reason my spare time has been additionally limited and the implementation will be take much more time than expected ...
     
    ibyte likes this.
  11. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    it is called Ecosystem .. and i agree with Exbleative, it is really a great way to share and have access to plugins right from the unity editor.
     
  12. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Github would be cool. Wikis make me hesitant since they are often under murky licenses where it's not clear if the code can actually be used. Making a git repository and putting it under the MIT license or something similar would be more clear. A fancy Playmaker builtin thing would be nice but personally there are plenty of other things I'd prefer to see done before that. That sort of thing was a good idea for Playmaker since they have a huge base of people who don't know how to code and are looking for integrations with tons of assets, whereas Map Magic seems geared more towards people who are engineery enough to figure out how to get files from github. ;)
     
  13. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I love the idea of making a generator repository, especially what with the possibility of biomes meaning a lot of mixing and matching. Having recently been introduced to substance designer, some kind of option to use some of the more generative substances would be a bit of a dream
     
  14. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I tried the new Serializer.cs and it seems to work so far but it spams the console with a bunch of "Guard: object was already retrieved..." every time Unity recompiles.
     
  15. terravires

    terravires

    Joined:
    Mar 27, 2013
    Posts:
    103
    @Wright
    Sadly, I ran into some new nasty errors. It seems any textures for grass/etc. are broken once you build the project.

    Get 100+ of these errors in console and of course no grass is working.

    Code (CSharp):
    1. Texture is not accessible.
    2. UnityEngine.TerrainData:set_detailPrototypes(DetailPrototype[])
    3. MapMagic.<Apply>c__Iterator4B:MoveNext() (at \Assets\MapMagic\Main\OutputGenerators.cs:1081)
    4. MapMagic.<ApplyRoutine>c__Iterator59:MoveNext() (at \Assets\MapMagic\MapMagic.cs:655)
    5.  
    6. [C:/buildslave/unity/build/Runtime/Graphics/Texture2D.cpp line 348]
    7. (Filename: /Assets/MapMagic/Main/OutputGenerators.cs Line: 1081)
    8.  
    9. Failed to get pixels of splat texture
    10. (Filename: C:/buildslave/unity/build/Runtime/Terrain/SplatDatabase.cpp Line: 247)
    11.  
    12. Failed to get pixels of splat texture
    13. UnityEngine.TerrainData:set_splatPrototypes(SplatPrototype[])
    14. MapMagic.<Apply>c__Iterator43:MoveNext() (at \Assets\MapMagic\Main\OutputGenerators.cs:401)
    15. MapMagic.<ApplyRoutine>c__Iterator59:MoveNext() (at \MapMagic\MapMagic.cs:655)
    16.  
    17. [C:/buildslave/unity/build/Runtime/Terrain/SplatDatabase.cpp line 247]
    18. (Filename: /Assets/MapMagic/Main/OutputGenerators.cs Line: 401)
    Could this be because unity isn't including the textures in the build because there is no valid object with a reference to it in the scene? And if so, how would we fix that?
     
  16. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    If that's what's happening, you can usually fix it by moving the textures into a subfolder called "Resources". Anything in folders named "Resources" is automatically added to the build regardless of whether there are any references to it.
     
  17. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    I've never encountered this error in all of my Unity practice, looks like the grass prototype has no access to the grass texture. Here are two suggestions: to enable read/write and, as makeshiftwings said, expose the texture to resources. I don't really know if enabling read/write will help, while adding textures to the resources should do, but I don't like the elegance of this solution.

    Are you using the asset bundles? Could it be that you are using a scene in one bundle and the textures are in the other?

    Do you have any pinned terrains in scene? Maybe it's worth trying to pin one terrain in scene, and make a build with at least one pinned terrain - just to see where the problem is.

    @makeshiftwings, could you please send me your scene?
     
  18. frankcefalu

    frankcefalu

    Joined:
    Jun 28, 2013
    Posts:
    60
    We will be willing to pay someone to help imrpove our scene quality and generate a couple of landscapes for us. Anyone willing to help?
     
  19. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    You mean with the "Guard: object was already retrieved..." spam? It happens in the DemoScene. Upon opening the scene, it spams about 200 lines (once for each node in the graph I assume) and then when entering play mode it does 400 more lines (twice for each node). Maybe it's interacting with some editor script I have but I'm not sure how to narrow it down. I do have a script that auto-saves the scene whenever I enter play mode, which might explain the duplicate logging there, but that wouldn't explain why it also spams the log when I open a scene or recompile a script.

    For now I just commented out that Debug.Log call and everything seems to be working fine.
     
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    It's a guard clause that breaks serialization if an object is already loaded. But all the serialization functions clear objects before load in a release version. It could happen if you load a scene twice at the same time in the several threads. I don't really know how that can happen, maybe it's really some editor script. Do you have all of the generator connections remain after such a scene load?
     
  21. terravires

    terravires

    Joined:
    Mar 27, 2013
    Posts:
    103
    I have no pinned terrains because I'm using 100% procedural generation at runtime with changing seed. If I pinned one, it would be broken for the rest of the border terrains. It of course, works fine in the editor.

    I tried moving the textures to the Resources folder, no change. I then tried adding an object to the scene that has all the splat map and grass textures stored as public references and had that in scene... still no help.

    Oddly enough, the splat map terrain textures are working. It just the detail/grass that is giving me problems.

    As for enabling read/write, that will double the texture memory usage, clearly I don't want to do that on large 1024/2048 textures. (http://forum.unity3d.com/threads/does-unity-always-use-double-memory-for-texture-in-runtime.198270/)

    Putting it on for just the grass removed the grass problem, at the cost of of memory I'm sure. But the other errors about splat maps are still there even though it appears to be working in scene. But like I said, splat maps are 1024 and 2048 bit so double memory on that, plus normals I would guess, would be rather big hit.

    Edit: I also tried to pin a terrain very far (20+ chunks away) and it still gave me the splatmap errors on the standalone (PC win64) build only. Inside the editor it works flawless.
     
    Last edited: May 15, 2016
  22. stevenson

    stevenson

    Joined:
    Mar 16, 2014
    Posts:
    8
    Hi,
    is it with mm possible to rotate an object along the slope? Or do I have to create an own script?

    e: And what is the best way to let grass/objects only generate above a given height value? Currently im using shore+blend(substract) but i don't think thats the best way..

    e2: There seems to be a bug with adding detail meshes to a terrain. I choose mode 'Vertex lit' in the grass generator but the result is an added grass texture with missing texture as result. A quick (inofficial) fix would be very helpful.

    e3: And could u please give an example about how to use the stamp generator to create terrain textures around objects? I got it with height stamps, but I didn't get how to get the texture infos only..


    Thanks btw ;) I will write a review in a few days..
     
    Last edited: May 16, 2016
  23. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    To add, being able to orient an object based around a slope's direction would be very useful

    Ive been asking a bunch of stuff like this here and there lately but would it be possible to use procedural substances as generators (And possibly non-tiling textures too)?
     
  24. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    terravires, I could reproduce this bug, gonna find out why it happens.

    You can rotate an object around Y axis only, but yes, you can make a custom script that rotates objects on apply:
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. namespace MapMagic
    4. {
    5.     [ExecuteInEditMode]
    6.     public class AlignToNormal : MonoBehaviour
    7.     {
    8.         public void OnEnable ()
    9.         {
    10.             MapMagic.OnApply -= Align; //just in case it was not called on disable
    11.             MapMagic.OnApply += Align;
    12.         }
    13.  
    14.         public void OnDisable ()
    15.         {
    16.             MapMagic.OnApply -= Align;
    17.         }
    18.  
    19.         public void Align (Terrain terrain, object obj)
    20.         {
    21.             TransformPool.InstanceDraft[][] tfmTypeInstances = obj as TransformPool.InstanceDraft[][];
    22.             if (tfmTypeInstances == null) return; //in case it is height/splat/grass/forest apply
    23.  
    24.             for (int t=0; t<tfmTypeInstances.Length; t++)
    25.             {
    26.                 TransformPool.InstanceDraft[] tfmInstances = tfmTypeInstances[t];
    27.  
    28.                 //there could be a check if an object of this type should be rotated
    29.              
    30.                 for (int i=0; i<tfmInstances.Length; i++)
    31.                 {
    32.                     TransformPool.InstanceDraft tfmInstance = tfmInstances[i];
    33.                  
    34.                     Vector3 terrainNormal = terrain.terrainData.GetInterpolatedNormal(
    35.                         tfmInstance.pos.x/terrain.terrainData.size.x,
    36.                         tfmInstance.pos.z/terrain.terrainData.size.z);
    37.                     Vector3 sideVector = Vector3.Cross(terrainNormal, tfmInstance.rotation*Vector3.forward);
    38.                     Vector3 frontVector = Vector3.Cross(sideVector, terrainNormal);
    39.  
    40.                     tfmInstance.rotation = Quaternion.LookRotation(frontVector, terrainNormal);
    41.                     tfmInstances[i] = tfmInstance; //saving struct to array
    42.                 }
    43.             }
    44.         }
    45.     }
    46. }
    Untitled-1.jpg
    Add the script anywhere in scene - for instance, to Map Magic object. Actually you can do almost anything with such a scripts.

    Thanks for pointing that out: I was going to check it, but Unity crashed two times in wip v1.3, so it prevented a possible bug. I will fix it and see why the vertex mode does not work.

    Untitled-2.jpg Make sure that "Use Maximum height" parameter is turned on. In this case it will use the whole range from 0 to 1, regardless of the objects height.

    I'm going to make a Texture Input generator. It will have much in common with Raw Input, but will work with all the standard textures, including substances.
     

    Attached Files:

    makeshiftwings and stevenson like this.
  25. terravires

    terravires

    Joined:
    Mar 27, 2013
    Posts:
    103
    @Wright

    I was able to find a way to repo the previously reported grass bug. If you have your terrain size less than your heightmap resolution then grass will not be able to drawn by MM. However, you can manually pain using the terrain paint grass tool.

    IE heightmap 512 and terrain size 256 will repo the bug on my end. For a terrain of 200x200 the only options is to use 128 heightmap which gave very poor results. :(

    In my case, I wanted lots of detail on small terrain because of unity's every broken mixed + realtime mode lightmapping (since 5.0) and shadows not working. This was supposed to be fixed in 5.4 but who knows, how is that 5.4 support coming? :D
     
  26. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    terravires, this is the bug that was fixed for 1.3, you can find quick fix here:
    But the one with a "grass splatmap" is a real riddle. I've spent the whole day trying to figure out why that happens since I could reproduce it, but I'm still in darkness. IMHO even a error in the console is not actually related with a grass, obviously, grass texture is not a splatmap. I tried to re-create the basic terrain creation to find out where exactly the problem appears, but on some stage it appears randomly. It's demoralizing, but I'm trying to hold on :)

    BTW how did you know that enabling read/write doubles the size of the texture? As far as I can say it does not cause any change in profiler.
     
  27. terravires

    terravires

    Joined:
    Mar 27, 2013
    Posts:
    103
    Yes, sounds like the typical day with untiy to me. Random bugs appear that most likely are not even in your code. :mad:

    I've read it in a few places like here:
    http://forum.unity3d.com/threads/does-unity-always-use-double-memory-for-texture-in-runtime.198270/

    No idea if they fixed it or it's by design. However, I think it's always in read/write mode in editor and the final build is where the impact can be noticed.

    Sadly, I've found another crazy Untiy/MM bug. (am I the only one finding these things. :D) And it's a strange one, never seen anything like this...

    So for almost all my prefabs, any FBX models or anything with a 3D preview has my Map Magic terrain in the 3D preview window!

    Just because I'm sure you don't believe me, here is an FBX file, not even a prefab.



    I can see the terrain in almost all my prefabs or most things with a 3D preview. Maybe MM is writing to some unity memory space. Not sure, never seen anything like it. :eek:

    Note that when I open another scene without MM object, the terrain is gone from the preview window. And if I save unity saves the image you see in preview with the MM terrain in the thumbnail image.
     
    Last edited: May 20, 2016
  28. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    That is awesome. Which assets did you use to archieve that look? Sky on the night image looks awesome. How did you did that?
     
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    terravires, I found out an interesting thing. Two things, actually:
    1. You were right amount of texture memory used by a texture doubles when enabling read/write in a build - at least for a a usual objects.
    2. But terrain diffuse textures (both splatmap and grass textures) always take double amount of memory, no matter if read/write is enabled or not. This does not apply to the splat normal maps though.

    I guess there is an override parameter that makes terrain textures be readable on build. It's no surprise because Unity has to build a base map for terrain lod, so it has to read terrain splat diffuse textures. When there are no terrains in scene this override parameter works occasionally, seems that it depends on a previous build (?), so it was really hard to find out why in some cases the error appear, while in others everything is okay. Anyways when using no pinned terrains it's better to enable read/write manually. This should not increase the amount of memory used - it would be great if you could try checking it yourself, in case of my measurements were incorrect.

    I just wonder what why Unity has to read a grass texture? :)

    And speaking of displaying terrain in preview window - I've never seen anything like that too. MM does not deal with OnPreviewGUI or AssetPreview, so I don't even have a clue what is that. Just checked out all of the models and could not find any terrain in any prefab, model or mesh. Does this happen in an empty project? Do you still have any terrains pinned in unusual places (like 20+ chunks away)? Does it remains when you unpin them?
     
  30. terravires

    terravires

    Joined:
    Mar 27, 2013
    Posts:
    103
    I'll have to do some testing to see about the memory.

    As for the preview, it doesn't happen in all scenes. The scene where does happen has two pinned and locked terrains. 0,0 and -1,0 and no other terrains.

    Here are the MM settings:


    When I disable the MM object in scene, the terrain in the preview is gone. However, the prefab has extra lighting on still.

    When I try to repo this in a new scene or even existing others, there is no terrain or extra lighting in the preview. As with other bugs it seems, not easy to repo but does exist in one scene and always there. There are no other scripts or objects on the MM gameobject itself. It's not a prefab or anything special, just a scene object.

    Sorry to rehash this, but if you had that export nodes/settings feature this would be easy to at least try and repo. Please tell me that feature will allow export of older data? :D

    I've got several hours in different scenes with terrains now and don't want to lose that when 1.3/etc comes out.
     
  31. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Could you please send me the scene? Seems that it's something scene-related, since I cannot reproduce it too.

    V1.3 will load all of the nodes data saved in a previous versions.
     
  32. DesertRaven

    DesertRaven

    Joined:
    Jul 15, 2012
    Posts:
    137
    Hi, maybe someone else has asked this question before, is it possible to create a terrain and later use Easy Road to add roads, paths and rivers?
     
  33. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Hey, Really loving Map Magic. I have some questions/suggestions:

    1. Is there a way to add the random seed through code at runtime? So my players can repeat the same world or have a random world each game?

    2. My game consists largely of Islands, Do you have any suggestions how I could spawn the player only on a part of the terrain above the water? I was going to spawn the player using map magic but realised that I'd be spawning new players in each terrain?

    3. Is it possible to select a random object from a list? Say pickups, I only want 1 or 2 in each terrain square but chosen at random, the only thing I can do at the moment is scatter an object type to every terrain, unless i've missed something?

    4. Perhaps we could have a min and max count value to the scatter object, so it's a little more random?

    5. Is there a select height range node as I couldn't find it and used a curve instead? I used the curve to select the height range close to sea level, a simple select height node with a min and max height and fade option would be great for this.

    Thanks for the asset and keep up the great work!
     
  34. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    You can pin and lock a terrain - and then you can edit it in any way and with any plugin. This terrain will not be procedural any more and will be saved with a scene.

    You can use instance.seed value to set the seed, and ForceGenerate to make the terrain re-generated:
    Code (CSharp):
    1. MapMagic.MapMagic.instance.seed = 1234;
    2. MapMagic.MapMagic.instance.ForceGenerate();
    It depends on the size of the islands and a distance between them. If you have one island per terrain I'd like to recommend you:
    1. add a "Spawn Point" prefab in the objects output;
    2. make it spawn only above the sea level using scatter and probability map
    3. place camera at the ideal point where the player should be spawned to make terrains generate here;
    4. select the closest to the camera spawn point and spawn hero at it's position.

    Using the Split generator with a Match Type: Random will randomly distribute input objects to all of the layers outputs. The probability of each layer could be set with a layer's Chance parameter.
    Note Split can have one or more layers with no output connection to the the Object Output. This can help to change the count of the objects by throwing them into the void. I guess it could be an alternative to the random scatter count.

    It's okay to use curve here, but since many users find curve rather hard to understand I'm going to create it's alternative generators like Invert, Contrast, and maybe the generator you've mentioned. However, I'm not sure what is the better way to organize it, so
    @all: what would be a more convenient way to use an adjust generator(s):
    1. Create several generators like Curve, Invert, Contrast, etc.
    2. Use one Adjust generator, where you can select the adjust type, and toggle generator's fields: curve/brightness-contrast sliders, etc.

    Btw while testing an upcoming v1.3 I decided to make a badlands terrain, and that's what I've got:
    Badlands.jpg
    It still lacks objects, trees, and grass, but the most acute shortage is in triplanar shader imho )
     
    wcoastsands, Jaimi and Hellhound_01 like this.
  35. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Thanks for your replies.

    I think several generators would be better, it would be easier to see what happening in the graph and would make more sense. At least for me anyway :)
     
  36. Hellhound_01

    Hellhound_01

    Joined:
    Mar 5, 2016
    Posts:
    102
    I would also prefer several separated generators. I think this will result in more readable and maintainable code.
     
  37. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    853
  38. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
  39. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    Will it work with Unity 5.4 and Retina display?
     
  40. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Question before I buy this tool if some people can add and the developer for some questions.

    I have worked with terrains for years, I started using tools like World Machine and many others for years Then I bought Terrain Composer 1, which I love..Then I bought Gaia , which both I can use in other engines...Since you can export the height maps out. Can this be done with this tool?


    Also how well does this work for Android??? This is important to me, since I use Unity for Mobile mostly.. But for large terrains ...So I hear it has terrain streaming....So does it have it in runtime as well, so that tools like World Streamer would not be needed??? Or would it still..I have it, and my own tool but just wondering....

    Can users compare this tool to Gaia, and TC1, and even what you know about TC2...


    Lastly I hear the developer is bringing Voxel lands in side of this did I hear that right??? If you buy Map Magic, will you still need t buy Voxel Land, or will it come with Map Magic....This would make me buy it right now if I know that is the case.... Because we plan to use Voxel base tools for our future game ... But yet to find a good one that isn't thousands of dollars, we planned on making our own, but if that is the case, we would wait to see how good this one is...

    Thanks for any information I can get.


    One more last question, what concerns me is the I nearly bought Voxel Lands a year or so ago, but I didn't due to the tool no longer being updated...Which concerns me that you may do that to this tool as well, unless there is a reason why it the tool was stopped from getting updates.? I understand regardless, but we are a company and hate infesting in tools that the developers just disappear which has happen to us alot with Unity... So just wondering what the future holds for this tool.

    i'm a sucker for tools like this since I make alot of games with terrains and I get alot of terrain contract work... I spent 60% doing UI design, programming and Art, and about 20% making terrain height maps or making them period.
     
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Yeah! A chance to grab MapMagic on the cheap! :)

    Currently available version (1.2) does not work with Unity 5.4 Beta. But any of the MM owners can take a part in v1.3 beta test, it is compatible with the upcoming Unity version.
    MM uses the standard terrains with a standard shaders, so if standard terrains work with a display of a needed resolution than a MM will.

    MapMagic can generate terrains in playmode. When a player comes to the new non-generated land, MM generates a new terrain chunks, when the player leaves some area terrain chunks are removed (moved, actually, because of use of terrain pool). I'm not sure if that could be called a streaming because MM does not keep any terrain information data, and just generates a terrain area for local use.
    It can work on mobile devices, at least I've checked it working on my Android smartphone.

    Bad news that you will still have to buy Voxeland. Good news that it will have a discount for MM owners and vice versa. However it is too early to say what would be the final price of Voxeland+MM package.

    Are you talking about Voxeland? A year ago it was extremely vibrant, a new version (v4.0) with all of the code rewritten was released that time. And it is still far from being abandoned, I plan to release a bugfix version before integrating it with MM.
    I try to support, update and maintain all of my assets for at least several years, but I don't know if and how that could be guaranteed. So take a look at the asset at this moment, regardless of my plans and pledges, and take it only if if you like it now. You can always buy it later if you'll see the features you want are implemented - hope it will not be the last sale :)
     
    Last edited: May 24, 2016
  42. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Thank for the fast reply! Glad to hear Voxel Land is not abandon , I just have not seen updates in a bit. But anyways glad to hear that your working hard on them all. Map Magic sounds like World Streamer then since it disabled , and enables sections as the player moves.... Do you have a video of the chunks being removed with the player in runtime??

    Making a game with large terrains its important to stream the terrain or remove a chunk during run time so you do not have the whole terrain active at once... Also does it do other objects on those chunks .? For example I have a building system like Rust that people can make modular style buildings in run time, so I have them disabled and enabled when that terrain area is no longer seen by the camera, I have my own system for this. anyways, but was wondering if this can add objects like that or not?? This would include, trees , rocks, etc...
     
  43. coffeefery

    coffeefery

    Joined:
    Apr 10, 2014
    Posts:
    21
    The pictures looks amazing, and the atmosphere is spot on! May I ask what weather system and/or image effects you might have used to achieve the look, especially your 4th and 6th images?
     
  44. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    I was inclined to the one universal adjust generator, but now I'm going to change my mind. Thanks!

    Here is a short video demonstrating the main features. On the 20th second you can see the terrains appear before the camera and disappear after it.

    MapMagic can place trees and rocks dynamically, so they will be generated (placed) and vanished along with the terrain. Speaking about some complex systems - it depends on a system itself. If it can produce something just being placed on the terrain (like some decal scripts) than it could be used with MM just out of the box. In other cases some scripting might be needed (for example, to start system building using MM's OnApply event).

    Yeah, really atmospheric screens, I like them to, especially the mist on the last one. GJ, secondsight_!
     
  45. Eyehawk

    Eyehawk

    Joined:
    Dec 24, 2012
    Posts:
    288
    Hi there! This asset looks great :) I see some mention of biomes in future - what would that look like? For procedural terrains, I imagine there would be some means of configuring the transitions between the biomes?
     
  46. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    OK, I bought asset. Nice work, Denis :) I own Gaia - sometimes it is too heavy for simple terrain generation.
    How it is possible to get v1.3 beta?
     
    Last edited: May 25, 2016
  47. SecondSight

    SecondSight

    Joined:
    Oct 13, 2015
    Posts:
    3
    Thanks a bunch !
    I have not used a weather system because I have not found a good one yet. Most of them are not flexible enough and / or I constantly struggle to get the colors and the look I want from such a system.

    In the demo I have used custom environment zones. These are volumes in which you can define: sun color and intensity, fog and volume fog color and density and ambient values. So these values fade on entering the volume. Besides that I have not used a lot of post fx (a little glow and color correction).
     
  48. NoobTaco

    NoobTaco

    Joined:
    Mar 24, 2015
    Posts:
    18
    @Wright I picked up MM yesterday and I am loving it. I am using it in 5.4 and have a few issues. I just saw you post about the beta. Is there a link or a way to get the 1.3 beta?

    Thank you for the great asset!
     
  49. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    I just bought this awesome asset yesterday. It looks extremely promising. I can't wait to get a chance to play with it but it'll have to wait until after I come back from vacation. This is one of those times I would rather stay home for vacation. :)
     
  50. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401
    I bought the full version, copied it over the evaluation version and got this error

    Assets/MapMagic/Demo/Scripts/CameraController.cs(76,66): error CS0121: The call is ambiguous between the following methods or properties: `MapMagic.Extensions.Angle(this UnityEngine.Vector3)' and `MapMagic.Extensions.Angle(this UnityEngine.Vector3)'

    floatdelta=Mathf.DeltaAngle(rotationY,moveRotationY); //line 76
    but I don't get this in a clean project of mapmagic_full, I just need to get my evaluation scene out of the evaluation
    into the full one, or fix this error in the evaluation project, whichever's easier.

    Also, what's the procedure for importing real world terrain into Map Magic? I was able to stick together
    2 DEM type heightmaps in Gaia following this tutorial, but the swapping in and out of Map Magic would
    enable a much larger terrain I think.


    Import Real World Terrain into Unity 3D
    Adam Goodrich
    Adam Goodrich