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

    Chimiboy

    Joined:
    May 1, 2016
    Posts:
    3
    Interesting, how would I make it so that the heightmap isn't completely off? Like, usually you use noise to generate a somewhat random heightmap etc. How would this work if I was painting stuff? I could probably draw many layers of different gray gradients, but I have no idea how they confer.
     
  2. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    Map magic can handle that stuff for you all you have to do is get the general terrain elevation
     
  3. Chimiboy

    Chimiboy

    Joined:
    May 1, 2016
    Posts:
    3
    GREAT! So I just make a white, grey and black layer and then just throw it into map magic right?
     
  4. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    You might have already seen this video, but I'd like to highlight that I'm using a heightmap as a base for terrain generate. It has a relatively low resolution (256 for 100 sq km land), it's too smooth being applied to terrain, so I'm using noise, voronoi, terrace, erosion plus something I don't even remember to add some detail to it.
     
    Chimiboy likes this.
  5. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    I'm going to be doing the same to make the world of my game.
     
  6. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    This reminds me, I want to generate a world sized map that cuts off at the edges. Does anyone know the settings for that?
     
  7. Arther12

    Arther12

    Joined:
    Sep 20, 2017
    Posts:
    7
    How can I lower the light intensity in the example scene?
     
  8. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    @Wright it seems that with my fix it kinda works now, (just added the register shaders and controllers again every time a new tile chunk is generated). The only problem that I think is @AdamGoodrich s territory is that now if the new chunk loads and the weather manager snow amount doesn't move, it doesn't sometimes load the snow texture in the new chunk, in practice that means that if you are at 1 (maximum snow) and after that a new tile is generated, its a problem. Will contact him directly if I don't find a solution.
     
    Last edited: Oct 2, 2017
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    The standard way the light intensity could be changed. MapMagic has nothing to do with the lights. Are you experiencing any problem with that?

    You can mask some area on the infinite terrain using pyramid or cone simple form with a contrast adjusted by curve. This will create a rectangular/circular spot that could be extended to the whole terrain with simple form's size value.
     
  10. Dorian-Dowse

    Dorian-Dowse

    Joined:
    Jun 2, 2016
    Posts:
    95
    "Assets/MapMagic/Generators/LegacyOutputs.cs(264,8): error CS0122: `CTS.CompleteTerrainShader.UpdateShader()' is inaccessible due to its protection level"

    I'm getting this with the latest MM 1.8.4 and CTS 1.5
     
  11. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    @Wright is there a way to make sure all tiles have all of the same textures associated with them? I'm using Awesome's Vegetation Studio. One of the ways it determines where to put trees is based on texture index. I noticed that on terrains that do not have a texture in use have it removed from the terrain. This messes up any rules that are texture index based.
     
  12. belkovandrew

    belkovandrew

    Joined:
    Nov 19, 2014
    Posts:
    22
    Hello
    I have a very huge map and I have a road system and the terrain parts with the roads are losing their changes when I start the game, I guess I have to use the "lock" button? My map is very big and I have to lock almost all the terrain parts, since this my map size is 700mb, is there any chance to reduce the scene size?
     
  13. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    there's a way to make locked sections still hide but I don't remember it
     
  14. Arther12

    Arther12

    Joined:
    Sep 20, 2017
    Posts:
    7
    I've tried deleting the lights but nothing happened, i want them to be less intense.
     
  15. Vortavasail

    Vortavasail

    Joined:
    Apr 22, 2016
    Posts:
    44
    dose anyone have a single point generator
     
  16. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    @Wright is having full map pinned with hide-out-of-range viable? lets say for 48 1k tiles? What is the drawback? I m thinking this approach for easier navigation bake and editing, and then let mapmagic enable/disable terrains in distance.
     
  17. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Might be Adam made UpdateShader method private. I'll check it out.

    Ok, I'll make the texture optimization switchable in the next version. Right now you can disable it by using this texture output generator instead (it has texture count optimization commended out).

    Yes, in this you need to use locked terrains. Locked terrains will not be generated procedurally, it literally makes them out of the scope of MapMagic generation, it has northing to do with them except hiding/enabling. On the one side they require a saved data that increases the scene size, on the other - again, they use a saved data that makes it possible to change them the way you like.
    Since the locked terrains are not generated with MM you can try treat them as a huge custom made land. You can disable (or completely remove) MM component, using it only for initial terrain generate, save terrain data to asset files, and then stream you terrains with some streaming asset (guess WorldStreamer should do the trick).

    Yep, but it will not reduce the scene size - they still have to be saved somewhere. And since MM does not use streaming (using generating instead) you will have to load all of these terrains at once.

    Try reducing ambient, fog, skybox reflection maybe... There's nothing special MM-related stuff in the demo scene lighting.
     
  18. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    Will you be supporting Microsplat soon? I think the water\lava add-ons look amazing and I'd love to use those in Map Magic.
     
    Sovogal likes this.
  19. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    Screenshot_92.png

    I still have the Problem i use lineare color setting cts needed maybe Come the Problem from this? Still cant use mm much money for nothing i hope of a fast fix :(
     
  20. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    Hi, first of all, I love this asset, I've bought it yesterday and haven't regretted it a tiny bit. I've always wanted to create a beautiful nature/adventure game but never managed to create a believable map, until I bought map magic.

    The only weird thing I noticed is that sometimes, right after I open Unity, of after I did some changes to the map, unity's default first person character controller falls through the map, to fix it I usually have to unpin the terrain and pin it again or do some other changes that will trigger the generation. I'm not sure the problem isn't on my side but I had the same issue on two different projects on two differente machines (one win and one mac).
     
  21. NAiLz

    NAiLz

    Joined:
    Apr 17, 2013
    Posts:
    88
    @Wright Hello! I'm going to be purchasing this package very soon and I wondered when splines are planned to be implemented. Making rivers and roads (for large cities in the game) are an important feature for me. Thanks for your time!
     
    StevenPicard and SSL7 like this.
  22. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    Last edited: Oct 6, 2017
    StevenPicard likes this.
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Salja, the problem is in the seam, right? Does it happens when using the linear lighting only? What are your splat weld margins? Are you using a legacy CTS output or CSO?

    I plan to make a poll shortly for the next asset to integrate with MM. I'm pretty sure Microsplat is a pretty good candidate to win this poll.

    joni-giuro, let me clarify: you've got a character on the pinned terrain, you change the graph in the editor mode, wait until it has been generated (green ok mark in top left corner), then start the playmode and the character falls through the terrain, right?
    Or are you changing the graph in playmode? In this case the character can really fall through the terrain while it is generating.

    I still don't have an ETA for that, so if splines is a key feature you are going to purchase MM I'd like to advice you to postpone at least untile I'll have the estimated time.
    I know the value of that feature, but it requires a lot to be made. I don't want to rely on third party road generator since I will integrate it very closely with MM, with spline connection type, generators group, mesh outputs and that stuff. The Spline will be fully-fledged in/out and connection type along with the Map and Objects. I have my own developments in this area, and if I get lucky I will add spline beta support to v.2.0, I'm going to release it within two months.
     
    NAiLz likes this.
  24. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    How can I create Global map for each of my terrains after you changed RTP support method?
     
    Last edited: Oct 7, 2017
  25. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    I have the Same Problem in clean project only mm installed no cts no lineare
     
  26. RandomDevil

    RandomDevil

    Joined:
    Dec 15, 2016
    Posts:
    11
    Hello again, @Wright , it's been a while. I've been stacking up question that, I hope, either have already been answered and I cannot find, or someone can answer them.

    To start, my team is all updated to the latest version. We have a graph that has 300+ nodes.

    First question, we're having issues with the graph being slow to edit. We type a value into a field and it can take 10-20 seconds to see each numeral (instant generate is off). Is it the size of the graph or the content in the graph (content = size of RAW inputs, textures, objects, etc.)? I've tried turning off instant generate and a few other things to improve this, but even our new i9 10-core shows the same slow-down. I haven't looked at the code, but is it saving the biome file after each keystroke (again, instant generate off); could that be it?

    Second, we are using large RAW inputs to denote specific areas. The current biome has 25 or so RAW inputs and each referenced RAW file is very large (250mb - 1.5gb @ 5k x 5k up to 25k x 25k resolution) so we can preserve detail. Can you recommend anything that might help with shrinking these as we believe they may be slowing the graph down (see previous question). My software team wants to try to get this to accept PNGs, but haven't started working on it, yet. BTW, they say thanks for putting some of their requests.

    Third. Is there any disadvantage to having multiple Object and Tree outputs? Is the performance (time to generate after pinning a tile) affected by having more than 1?

    Thanks in advance. Hopefully we can show this off some time after December 1st.
     
  27. PatrickKirk

    PatrickKirk

    Joined:
    Oct 15, 2012
    Posts:
    3
    Hello @Wright . I am experiencing an issue with MapMagic, and i can't seem to find a solution anywhere on the internet.
    The issue occurs every time i try to create a map consisting of multiple terrains.
    Between each there's either A. Dramatic changes in height at the border of each terrain, B. Dark lines in the terrain texture, or C. No match in the height between the terrains whatsoever. (As seen in the attached picture).
    I'm using a height map in 16bit IBM PC format, which is being stretched out on 16 terrain planes.
    I figured you might be able to explain the issue(s) i'm experiencing.
     

    Attached Files:

  28. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    MM does currently support png I think, via texture input (works the same as raw input). Also, on the raw inputs there's a couple of options, to reload/etc the raw file on every generate.

    Another option to look at is save intermediate results, toggle that and see if that helps?

    As for the size of the raw inputs, that's probably contributing something, try adding a twin next to the current ones but feeding them much lower res raw inputs when building and developing, then plugging the hires ones back in to double check quality.
     
  29. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    Assets/MapMagic/Generators/LegacyOutputs.cs(264,8): error CS0122: `CTS.CompleteTerrainShader.UpdateShader()' is inaccessible due to its protection level

    after CTS Update to 1.5, any quick fix for this? Made the updateshader of CTS public instead of private, but I don't know if this will break other stuff
     
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Maybe I'm missing something, but how you were making it before? Actually, you can still use the Legacy RTP Generator that has no change.

    RandomDevil, RAW Input generators can really affect the graph display performance if the imported files are not stored as assets. Make sure that for all of the inputs "Imported" data is assigned, and store the data using "Save Imported RAW" button if it does not.

    PatrickKirk, what are your Height Weld Margins and Splat Weld Margins in General Settings?

    Let me make it clear: you've got the seams in a demo scene in a clear project, with no CTS installed? Could you provide the coordinates of this seam so I could look into it? Or isn't it a demo scene?

    dlevel, Dorian-Dowse, UpdateShader is really private - at least in the last CTS version. But anyways, I've made a quick fix using CSO method for that.
     
    Last edited: Oct 8, 2017
  31. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    @Wright this doesnt solves it for me, I get the same error.


    Assets/MapMagic/Generators/LegacyOutputs.cs(264,8): error CS0122: `CTS.CompleteTerrainShader.UpdateShader()' is inaccessible due to its protection level
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Oops, wrong file. Fixed.
     
  33. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    yeap! thanx.
     
  34. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    hello,
    just tested your map generator demo, and got this bug:
     
  35. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    whoa flying trees
     
  36. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    I let it generate and don't change the terrain at runtime. Sometimes I open the editor, see my old created terrain, jump straight into play mode and the character falls through (I'm 100% sure it is ABOVE the terrain when it starts). Unpinning and pinning again fixes it and isn't a big problem, I'm only concerned about the fact that it might happen in the final build as well.
     
  37. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    blackant, I've just tried the demo scene, and everything seems to be okay at the first glance, both in editor and in playmode. What exactly you did, what should be my steps to reproduce this bug?i.e.:
    - open the demo scene,
    - start the playmode,
    - place main camera at the coordinate x,z
    - see the vertical seam appeared
    actually I've just tried it but everything seems to be okay

    joni-giuro, could you please email me the scene - and the data asset if it is stored separately (no textures, prefabs or any unnecessary objects within the scene are needed)?
     
  38. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    i did nothing special, just walking around the terrain, but it seems to be placed on a seem between 2 terrains
     
  39. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Yep, it's surely a seam between the terrains. Didn't you pay attention to the coordinates where it happened?
     
  40. Goffa-Games

    Goffa-Games

    Joined:
    Mar 14, 2015
    Posts:
    1
    Hi! I just wanted to share something I did with this asset.

    First of all, this is the best asset ever :)

    I have long been waiting for the spline feature in order to make Roads. (Still not there yet I guess?)
    Last week I decided I can't wait anymore, I sat down and started my own little generator for a road network.
    It is currently a crude and slow process that takes a lot of trial and error, but after a while, my little wandering script generated the following points for settlements and roads in between them.
    Note that the roads naturally avoids passing mountains or over too high slopes!
    However there is lot of room for improvements since e.g. the roads cross each other, making some paths redundant, the curves still seem artificial et.c.

    RoadNetworkGeneration.png

    In the current setup I press a button to serialize the points of Settlements and Roads, then save them to disk.
    In another Scene with the same terrain (the one from the demo scene) I have used nodes similar to the "Make-a-Village" tutorial on the wiki, and load the generated points form disk to spawn houses and faint paths, see picture below. (The idea I have is to perhaps make some sort of shared online-map with these points, that then can be explored and expanded by different players)

    RoadNetworkLoaded.png

    The house in the picture is generated from modules in another fine asset, the next step I want to do is probably to generate individual houses, and make villages instead of only single houses :)
     
  41. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    nop sorry...
     
  42. MoribitoMT

    MoribitoMT

    Joined:
    Jun 1, 2013
    Posts:
    301
    Hi,

    I recently moved from TerrainComposer to MapMagic since I always like the node based creation systems. I am exploring the plugin and I have one question.

    In my games I have always 200-300 spawn points for random chest creation ( player collide the chest and gets rewards ). TerrainComposer has this ability to place objects ( empty spawn points ) on terrain in a good scatter way, each spawn point far away from each other, evenly placed, and on a reachable axis-Y ( not top of the hills on mountains, etc.. ), it gave me all the settings I can use.

    My question is, MapMagic has this ability to place objects evenly scattered on reachable points ? Or do I need to buy third party plugins such as Mega Scatter etc.. ?

    Regards
     
  43. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
    Mapmagic should let you do roughly the same thing.

    Check out the demo, you'll see the rocks scattered around. The rock is just a gameobject/prefab, you assign it within MM.

    From there there's masks you can apply around each object, with adjustable falloffs, you can use that to remove the chests that are too close.

    You have access to height throughout, which you can then mask with a curve to remove all chests at the top of mountains.

    Another thing you can do is use the slope node output to remove all chests on the side of a mountain.

    the readme pdf should show you all the nodes you'll need for this.
     
    MoribitoMT likes this.
  44. belkovandrew

    belkovandrew

    Joined:
    Nov 19, 2014
    Posts:
    22
    That means I have to save all the terrains? I have around 300 of them... is there any chance to save all the terrain in one click?
     
  45. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    belkovandrew, you can iterate and save all of the chunks with a script:
    Code (CSharp):
    1.  
    2. for (int t=0; t<mapMagicObject.transform.childCount; t++)
    3. {
    4.                 Terrain terrain = mapMagicObject.transform.GetChild(t).GetComponent<Terrain>();
    5.  
    6.                 float[,,] splats = terrain.terrainData.GetAlphamaps(0,0,terrain.terrainData.alphamapResolution, terrain.terrainData.alphamapResolution); //there was a Unity bug saving splats, so setting them again them after export
    7.                 UnityEditor.AssetDatabase.CreateAsset(terrain.terrainData, path + "_" + t);
    8.                 terrain.terrainData.SetAlphamaps(0,0,splats);
    9.                 UnityEditor.AssetDatabase.SaveAssets();
    10. }
    11.  

    MoribitoMT, you can use a Scatter Generator to scatter objects. In a pure random mode it will try to spawn objects as far from already scattered as possible. It has a Probability Mask, you can use it to define your accessibility - it could be a height, or a Slope, or both, or anything you'll make with your graph.
     
    MoribitoMT likes this.
  46. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Any ideas why cts looks different with map magick?
    (same profile)
     

    Attached Files:

  47. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    can give you the coordonate for the main cam !
    position: 991.0247,229.4521,111.7438
    rotation: -10.1,-170.151,0

    and i fund another artefact elsewhere:

    position: -1919.682, 340.7368, 82.91058
    rotation: 21.05, -52.651, 0
     
    Last edited: Oct 17, 2017
  48. ispol30

    ispol30

    Joined:
    Oct 17, 2017
    Posts:
    1
    hi i have started to use Unity

    i have my autocad Surface (image nº1) and im trying to create a terrain in Unity wiht Map Magic , but as you can see the result is a little bit different,(image nº2), i did a DEM surface and with this DEM, i made a RAW archieve , i imported it into unity using Map magic but i dont know how to make it more realistic like in the first image can you help me ?
    Thanks
     

    Attached Files:

  49. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    MarkusGod, blackant, thanks for your bug reports, I'll take a look into it during the next bug fix. I've opened the issues (seams, CTS colors) so you could track down the progress. Please not that I'll post feedback or additional questions in those issue tickets rather than on forums.

    ispol30, it seems that you've reached the bits for channel limitation. This could happen if you convert the heightmap to the standard 8 bits per channel format (non 16 bit RAW) on some stage between backing in CAD and adding to RAW.
     
    ispol30 and MarkusGod like this.
  50. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi @Wright !
    I'm wondering how can I get the chunk ID from a terrain tile?
    Is there a function that I can use in MapMagic?