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

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    Too many tree colliders will cause problems when you have a lot of terrains in your scene. Specifically, objects (like my player) fall through the terrain. I think the physics engine gets overloaded and the terrain collider stops working. In the past I've used custom code to dynamically enable/disable only the tree colliders near the player/camera and now I'm using Vegetation Studio to do the same. I noticed that MM was re-enabling them. I think MM definitely should have a way to disable terrain tree colliders.
     
    camta005 likes this.
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Crossway, could you try moving your character to 4000 or more units and returning it back manually, without using world shift?

    wwg, have you reported this issue to Unity? Theoretically there's no need in turning colliders on and off because this optimization is supposed to work internally using object's AABB. But if you get collider issues with this then something definitely isn't working properly
     
  3. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    507
    Yes when I returning it back manually everything is good again but weird world shift can't get same result!
     
  4. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    No, but I've seen this issue for the last three years. Note: I'm on version 5.6.4f.
     
  5. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Yes, that's odd. I'll look into it, but can't promise it soon - if I'll make a patch it will be included with MM2.

    Maybe they have fixed it. I've never fall through the terrain in MM's demo/test scenes both in 5.6 and 2017.3, but probably I don't have enough trees for that.
     
  6. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi All, Is there any generic biome data available to help create specific styles. I've seen badlands, forest, jungle etc in tutorial vids are they available anywhere?

    I'm looking for rainforest, mountain, and grassland if anyone has links. I know I can create them myself and I will but I was just looking for some guidance/inspiration as I get to grips with the tool. :).
     
  7. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    You can get the graphs for the badlands and snow plains here:
    https://gitlab.com/denispahunov/mapmagic/wikis/community_graphs
     
    AndyNeoman likes this.
  8. wwg

    wwg

    Joined:
    Apr 2, 2014
    Posts:
    130
    Not fixed in 5.6x and yes, you need a lot of a trees in your scene, and tree colliders enabled. Performance gets bad and the terrain collider stops working. With the colliders disabled you can have a massive amount of trees without problems and good performance even on my low-end machine. You just need code to enable the colliders around the player.

    @Wright (or anyone else): I'm building levels with pinned terrains (e.g. 5x5) and I want to use the seed value to change the map when the level loads. I want to manually place my player and other objects like vehicles and a home base in a non changing section, flat section of the map. It's OK if that location is the same each time, but the height of the terrain can't change in the area around the player.

    I'm having some success with blending/subtracting a mountain RAW file to create a flat-bottomed valley and then placing my character in the bottom (but then my character is always in the bottom of a valley/hole).

    Is there a better way to blend-in a fixed location to a changing map?

    Maybe some way to create a kind of fixed starting location, where the map would build around that location in a natural looking way.

    Thanks!
     
    Last edited: May 25, 2018
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    The simplest way to do this is to make your custom generator that will just check if pixel coordinate is within some range from the starting point and set matrix (map) value to the specified height (note that height range is 0-1). Once it's done you can add lerp blending to blend-in starting location to terrain.

    However if you've got significant terrain changes in your map I don't recommend you doing so. You starting location could be inside of the high mountain - and so the player will start inside of the well, or at the column if it's in the lowlands.

    I'd like to recommend you creating a prefab from all the starting things (including the player character) and placing it using MM's object output, the way you instantiate trees or other objects. And you can make that land flat in the starting location using the Flatten node.
     
  10. riffnatic

    riffnatic

    Joined:
    Feb 2, 2013
    Posts:
    15
    Hi,
    I'm learning map magic right now, it's pretty fun. ;D

    I found an issue i don't understand, maybe you could help.

    I have a 2x2 Terrain setup and i try to get a heightmap with the "preview in window" feature, but the window only shows me the map of the first terrain not for all 4. So when i save the file, it's also only the first terrain.
    Any Ideas?







    Thanks a lot, great tool!!

    EDIT:
    My Input "HeightMap" is a Raw Input with Scale 2.
     
  11. Funkeys

    Funkeys

    Joined:
    Apr 16, 2017
    Posts:
    64
    I am trying it out right now. As far as I understand it so far, the MapMagic integration is, that you can attach the TerrainWrapper component to the MapMagic gameobject, and if "copy components" is chacked, it will be copied to each of the terrain tiles ;).
    With the TerrainWraper component on each terrain, you now can capture the terrain data at any point into an .asset file.
    This asset then contains the heightmap, splatmap, detailmap, trees, persistent VS storage and objects. When you now crate a second layer in the TerrainWrapper for some manual height or splat painting, and capture it after, it will createn a stencil representing the difference between the first layer.

    I am not sure about the finished workflow yet for my usecase, but currently I am working with locked tiles in my prototype.
    MadMapsDemo.PNG
     
    camta005 likes this.
  12. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi, I've met an issue using MapMagic with Vegetation Studio:
    A(S%VDS@X](@6UZ[PK]4021.jpg
    Newly generated terrain tiles in run-time reused an existed transform. As the Terrain 2,1 used Terrain 0,0; and I found it occurs very often.
    Then with vegetation studio, I use mapmagic's vegetation studio output to assign vegetation info into VS' persistent database. Seems the database is not cleared properly and terrain 0,0's vegetation is now rendered on terrain 2,1. causing objects floating in air, not attached to ground.
    Any work around to prevent this to happen? It's very essential to my game.
     
  13. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    MapMagic shows only one chunk for the preview, and it is the closest chunk to the camera at the moment you select Preview - In Window. Just move to another chunk (or unpin all other chunks) and re-open preview.

    Hmm... This could be related with the chunks pool. Try setting allowMove:false on chunks deploy (MapMagic.cs, line 234):
    Code (CSharp):
    1. if (chunksChange) chunks.Deploy(deployRects, removeRects, parent:this, allowMove:false);
    If it will do the trick in further versions I will expose this parameter in settings.
     
  14. truefx001

    truefx001

    Joined:
    Jan 30, 2013
    Posts:
    132
    I was searching and could not find the answer as well my PM got unanswered.
    So here it goes,
    how can I specify game objects (like the grass or rocks ) to spawn only on specific textures?
    For example I would like to have different rocks at the beach and other rocks up in the mountain.

    Second question, how do I smooth out the terrain, especially hills are to spike and I get vertex spikes on the beach that
    look like pyramids with the sandy texture :)

    Last question, when is MapMagic 2.0 coming out?
     
  15. smoluck

    smoluck

    Joined:
    Mar 8, 2016
    Posts:
    25
    Hi @Wright

    We are trying to use MapMaghic under Universal Windows Platform project (instead of PC,Mac,Linux Stanalone) and Mapmagic can't be used. Did you will compile it to get compatibility withthat platform ?

    Code (CSharp):
    1. i can't build project, just i'm build set
    2. - platform : universal windows platform
    3. - player setting : XR Settings -> checked Virtual Reality Supported.
    4. just testing DemoScene, unity editor is nomally work, but can't build UWP.
    5.  
    6. <here is 35 errors in the error log>
    7. Assets\MapMagic\Main\ChunkGrid.cs(47,18): error CS1061: 'Type' does not contain a definition for 'BaseType' and no extension method 'BaseType' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    8.  
    9. Assets\MapMagic\Main\CustomSerialization.cs(66,21): error CS1061: 'Type' does not contain a definition for 'IsPrimitive' and no extension method 'IsPrimitive' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    10. Assets\MapMagic\Main\CustomSerialization.cs(78,21): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    11.  
    12. Assets\MapMagic\Main\Generator.cs(281,56): error CS0117: 'Attribute' does not contain a definition for 'GetCustomAttribute'
    13.  
    14. Assets\MapMagic\Main\GeneratorsAsset.cs(480,16): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    15.  
    16. Assets\MapMagic\Main\Serializer.cs(209,15): error CS1061: 'FieldInfo' does not contain a definition for 'IsNotSerialized' and no extension method 'IsNotSerialized' accepting a first argument of type 'FieldInfo' could be found (are you missing a using directive or an assembly reference?)
    17.  
    18. Assets\MapMagic\Main\Serializer.cs(264,15): error CS1061: 'FieldInfo' does not contain a definition for 'IsNotSerialized' and no extension method 'IsNotSerialized' accepting a first argument of type 'FieldInfo' could be found (are you missing a using directive or an assembly reference?)
    19.  
    20. Assets\MapMagic\Main\CustomSerialization.cs(124,18): error CS1061: 'Type' does not contain a definition for 'IsPrimitive' and no extension method 'IsPrimitive' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    21.  
    22. Assets\MapMagic\Main\CustomSerialization.cs(160,45): error CS1061: 'Type' does not contain a definition for 'IsPrimitive' and no extension method 'IsPrimitive' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    23.  
    24. Assets\MapMagic\Main\CustomSerialization.cs(190,23): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    25.  
    26. Assets\MapMagic\Main\CustomSerialization.cs(202,23): error CS1061: 'Type' does not contain a definition for 'IsClass' and no extension method 'IsClass' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    27.  
    28. Assets\MapMagic\Main\CustomSerialization.cs(202,44): error CS1061: 'Type' does not contain a definition for 'IsValueType' and no extension method 'IsValueType' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    29. Assets\MapMagic\Main\CustomSerialization.cs(254,23): error CS1061: 'Type' does not contain a definition for 'IsEnum' and no extension method 'IsEnum' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    30.  
    31. Assets\MapMagic\Main\CustomSerialization.cs(273,11): error CS1061: 'StringWriter' does not contain a definition for 'Close' and no extension method 'Close' accepting a first argument of type 'StringWriter' could be found (are you missing a using directive or an assembly reference?)
    32. Assets\MapMagic\Main\Serializer.cs(56,19): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    33.  
    34. Assets\MapMagic\Main\Serializer.cs(108,18): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    35. Assets\MapMagic\Main\CustomSerialization.cs(388,24): error CS1061: 'Type' does not contain a definition for 'IsPrimitive' and no extension method 'IsPrimitive' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    36.  
    37. Assets\MapMagic\Main\CustomSerialization.cs(392,24): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    38. Assets\MapMagic\Main\CustomSerialization.cs(451,24): error CS1061: 'Type' does not contain a definition for 'IsEnum' and no extension method 'IsEnum' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    39. Assets\MapMagic\Main\Matrix.cs(434,12): error CS1061: 'FileStream' does not contain a definition for 'Close' and no extension method 'Close' accepting a first argument of type 'FileStream' could be found (are you missing a using directive or an assembly reference?)
    40.  
    41. Assets\MapMagic\Main\Serializer.cs(139,25): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    42. Assets\MapMagic\Main\CustomSerialization.cs(530,11): error CS1061: 'StringWriter' does not contain a definition for 'Close' and no extension method 'Close' accepting a first argument of type 'StringWriter' could be found (are you missing a using directive or an assembly reference?)
    43. Assets\MapMagic\Main\ThreadWorker.cs(299,38): error CS1729: 'Thread' does not contain a constructor that takes 1 arguments
    44. Assets\MapMagic\Main\ThreadWorker.cs(301,32): error CS1061: 'Thread' does not contain a definition for 'IsBackground' and no extension method 'IsBackground' accepting a first argument of type 'Thread' could be found (are you missing a using directive or an assembly reference?)
    45. Assets\MapMagic\Main\ThreadWorker.cs(304,32): error CS1061: 'Thread' does not contain a definition for 'Start' and no extension method 'Start' accepting a first argument of type 'Thread' could be found (are you missing a using directive or an assembly reference?)
    46. Assets\MapMagic\Main\Extensions.cs(554,31): error CS1503: Argument 1: cannot convert from 'string' to 'System.Reflection.AssemblyName'
    47.  
    48. Assets\MapMagic\Main\Extensions.cs(561,117): error CS0117: 'BindingFlags' does not contain a definition for 'GetProperty'
    49.  
    50. Assets\MapMagic\Main\Extensions.cs(562,117): error CS0117: 'BindingFlags' does not contain a definition for 'SetProperty'
    51.  
    52. Assets\MapMagic\Main\Extensions.cs(585,15): error CS1061: 'FieldInfo' does not contain a definition for 'IsNotSerialized' and no extension method 'IsNotSerialized' accepting a first argument of type 'FieldInfo' could be found (are you missing a using directive or an assembly reference?)
    53.  
    54. Assets\MapMagic\Main\Extensions.cs(620,15): error CS1061: 'FieldInfo' does not contain a definition for 'IsNotSerialized' and no extension method 'IsNotSerialized' accepting a first argument of type 'FieldInfo' could be found (are you missing a using directive or an assembly reference?)
    55.  
    56. Assets\MapMagic\Main\Extensions.cs(668,33): error CS0117: 'Assembly' does not contain a definition for 'GetAssembly'
    57.  
    58. Assets\MapMagic\Main\Extensions.cs(673,14): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    59.  
    60. Assets\MapMagic\Main\Extensions.cs(673,44): error CS1061: 'Type' does not contain a definition for 'IsInterface' and no extension method 'IsInterface' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    61.  
    62. Assets\MapMagic\Main\Extensions.cs(673,65): error CS1061: 'Type' does not contain a definition for 'IsAbstract' and no extension method 'IsAbstract' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
    63. Assets\MapMagic\Main\ThreadWorker.cs(536,28): error CS0117: 'Thread' does not contain a definition for 'Sleep'
    64.  
    65.  
    66.  
    67.  
    68.  
    69.  
    70.  
    71.  
    72.  
    73.  
    74.  
    75.  
    76.  
    77.  
     
  16. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Good morning all,

    I'm just getting to grips with map magic and I'm hoping to have different texture sets on each of my 3/4 biomes using RTP is this possible or are we still limited to the 4/8 you assign in RTP?

    This will be in a setup where each biome has one pinned terrain and then the rest are procedural.

    Thanks in advance for any tips for this setup.

    Andy
     
    Last edited: May 29, 2018
  17. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    You can mask the stones scatter generator with the textures like this:
    MaskScatter.jpg

    Or use a Clean Up node if you are using more complex scatter algorithms:
    MaskCleanUp.jpg

    Try increasing the Scale value in Height Output node.

    It's already in beta (should I say alpha) on GitLab, but it's far from being finished. Can't say the exact release time yet. I'm working on it daily and I'm doing my best, but still there are much things to do.

    I could just build a UWP project with MM scene without any issues using MapMagic 1.9.1 and Unity 2018.1 running on Windows 10 using these settings:
    UWPBuildSettings.png

    Unfortunately it's not possible to have a different RTP setup for each of the terrain tiles, so the total number of textures is limited with a single RTP setup textures number.
     
    Last edited: May 29, 2018
    AndyNeoman likes this.
  18. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    I did get this working with OnApplyCompleted, but it was a little harder than I thought...it looks (maybe) like OnApplyCompleted is called repeatedly for the same terrain - each time a chunk finished generating, I would get an event for *every* existing chunk that it had finished Apply. Could this be correct? I had to keep track of which chunks had already had their ocean allocated - a bit of extra work. Mentioning in case it's a bug...
     
  19. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    my infinite world....
     

    Attached Files:

    camta005 likes this.
  20. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    100
    Hey there. I was wondering whether you could describe a strategy for creating low-poly terrain with Map Magic. Liberal use of the cellular type voronoi node seems like it's on the right track, but I might be missing something obvious.

    Thanks for your time!
     
  21. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    I think it's more the matter of shader rather than terrain shape. Using voronoi will not create real low-poly terrain, it will just flatten polygons on flat surfaces. And you will never achieve sharp edges with this approach. So try searching for some low-poly shader.

    Ok, thanks for reporting this issue, I will look into it.
     
  22. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Thanks for the reply @Wright, i'm following you biomes tutorial but i'm not sure whether I should have the VS and RTP nodes on each biome data set or on the overall mixing biome dataset. Could you expand on that process a little?

    I can manage with the 8 textures on RTP for all biomes but I would like the background or base texture for each biome to be different (from the 8 selection) can this be done through code or nodes?
     
  23. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    100
    Yeah, I haven't been able to get nice hard surfaces with it, as you mention. Is there a way I can avoid the gentle blending of textures that happens on the texture output node? Like in this image (forgetting the faceted style, which is totally the result of a shader), where the mountains and river shore is a hard texture edge with no gentle blending. Can I accomplish this with Map Magic texturing?

     
  24. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Yes, it's better to have custom shader output (VS or RTP) node in each of the biomes, just like the standard Texture Output. But it's just the matter of convenience, MM is flexible enough to work both ways and you can use a single CSO for all of the biomes.
    CSO is the part of the graph that is applied to all chunks, there's no way to have a different setup for each chunk. The only way I see to do this is to assign an RTP per-chunk with a code using OnApplyCompleted event.

    You can increase the contrast of each map with a curve:
    CurveContrast.png
    However, it will just make the texture blending not noticeable, but will not speed up anything or will not apply textures per-face.
     
    Sovogal likes this.
  25. Ronald_McScotland

    Ronald_McScotland

    Joined:
    Jul 30, 2014
    Posts:
    174
    Is there any simple way of getting MapMagic to write output to an image file? What I have in mind is an output generator with a field to specify a texture from your project, and input nodes for r,g,b and a values. On generate it would write to the texture. In my case I'm trying to get a soil fertility map for an rts game, and would like to be able to blend several factors of the terrain together in mapmagic, and then write the result to an image file.
     
  26. smoluck

    smoluck

    Joined:
    Mar 8, 2016
    Posts:
    25
    Thanks for you reply @Wright

    Does that mean that it can't be used under Unity 2017.3.1 for example ?

    we are using a Samsung HMD Odyssey model on our test. have you been able to test that MM project under HTC Vive for example ?

    Maybe there is a way to convert a MapMagic terrain to a Legacy Unity Terrain ?
     
    Last edited: Jun 4, 2018
  27. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Yes, you can open up the node's preview window by right-clicking on output blue circle and selecting Preview - In Window. Then you can click Export Texture button in the bottom right of the preview window.

    I didn't say that. My Windows 10 laptop has Unity 2018 installed, so I've tried UWP build using the first test platform I could reach. I haven't tried older Unity versions, but it does not mean that UWP build couldn't be used.

    Yes. MapMagic works fine with HTC Vive.

    Actually MM uses the standard Unity terrain internally. You can remove or disable MM component and have all of the pinned terrains unchanged and using the pure legacy terrain.
     
  28. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    Hey @Wright , any news on the new VS output? thank you.
     
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    What do you mean by "new"? I've got some fixes planned, but none of them requires re-making this node. Do you mean some of them?
     
  30. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    I meant (VS) Vegetation Studio output :) I remember you mentioned you ll create a new output for this node, that we would be able to have a prefab of VS
     
  31. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Anyone had any success integrating VS and map magic with multiple biomes?

    My normal vegetation package seems to be duplicated and the framerate has gone to single digits. I have a VS node on each of the three biomes and it appears as if they are multiplying the effect and coverage of foliage. This then cause huge drawcalls etc....
     
  32. LucianBlack

    LucianBlack

    Joined:
    Sep 28, 2017
    Posts:
    48
    Do you have a projected release date for MapMagic Version 2?
     
  33. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Hi @Wright -- thanks for Map Magic, I purchased a while back and am just starting to use it, seems great so far and your videos really help. I understand the basics of how to create maps and pin terrains etc., however I have a few questions.
    • I'm building terrains that have road and train networks.They run both above ground and underground too. At the moment I'm using Unity terrains and meshes for the tunnel entrances etc. What's the best way to approach something like this with Map Magic?
    • I noticed you have another asset (Voxeland) that allows cave creation and was wondering if that could be a good option for creating the train tunnels, in conjunction with Map Magic, Mega Splat and Vegetation Studio?
    • However I'm running in VR and so am not sure of the performance implications of using something like Voxeland vs. standard terrains and meshes?
    Any pointers appreciated, thanks!
     
  34. Kaen_SG

    Kaen_SG

    Joined:
    Apr 7, 2017
    Posts:
    206
    I'll be trying this out very soon.... I seem to have read similar issues on this thread a few pages ago regarding VS integration.
     
    AndyNeoman likes this.
  35. ajaxlex

    ajaxlex

    Joined:
    Jul 15, 2016
    Posts:
    38
    @Wright , thanks for making this great tool - the workflow is much better for me.

    I have created some generators that people might find useful. They include an edge detector and a height filter. @secondsight_ , I think you and some others were asking about the height one.

    I made the edge detector because I found the curves adjustment too tricky for very narrow targets, and I thought it might make things easier for people.

    Let me know if they can be improved.

    https://github.com/ajaxlex/Map_Magic_Generators

    EdgeDetectorExample.png HeightFilterExample.png
     
    Harekelas, tapawafo, Wright and 6 others like this.
  36. smoluck

    smoluck

    Joined:
    Mar 8, 2016
    Posts:
    25
    tried to test that script from here. It seems to work as expected. i will test that with the build of the HMD release under unity 2017.1.3. glad to get this solved by looking into your documentation @Wright

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

    Is there any way to export terrain as model?

    Actually it's a subject for a whole new plugin, like this one: Terrain To Mesh (https://www.assetstore.unity3d.com/en/#!/content/47276).
    However, there is a way to export terrain into 3D editor without a plugin - since MM generates the standard terrains their heightmap could be exported using the "Export Raw" button in the terrain's settings tab. This heightmap could be could be applied to the plane with displace modifier.
    But terrain data could be exported as a standard Unity terrain using this script: https://www.dropbox.com/s/tnb3v1s6r5h1ss0/ExportTerrainData.cs?dl=0
    Place it anywhere inside Assets folder, assign it to terrain and check "Export" (it works like a button).
     
    Last edited: Jun 5, 2018
  37. ajaxlex

    ajaxlex

    Joined:
    Jul 15, 2016
    Posts:
    38
    I have been experiencing the dreaded Black Terrain of Doom when integrating CTS. Finally seem to have vanquished it when I exported my graph and reimported into a new project, but I worry that other users will trip over it.

    I will continue to investigate and report back if I find anything useful. In the meantime, one thing I discovered is that the 'fix' selection for the missing material required by a newly created Custom Shader Output was failing. It seems that the CTS shader in my setup is now under a subsection - "CTS/CTS Terrain Shader Basic"

    adding a defensive check in CustomShaderOutput.cs Line #616 fixed that issue, if not the greater black Terrain.

    Code (CSharp):
    1.                         case Mode.CTS:
    2.                             shader = Shader.Find("CTS Terrain Shader Basic");
    3.                             if (shader == null) { shader = Shader.Find("CTS/CTS Terrain Shader Basic"); }
    4.                             MapMagic.instance.customTerrainMaterial = new Material(shader);
    5.                             #if CTS_PRESENT
    6.                             if (ctsProfile != null) UpdateCustomShaderMaterials(); //CTS_ProfileToMaterial(ctsProfile, MapMagic.instance.customTerrainMaterial);
    7.                             #endif
    8.                             break;
     
    Wright and camta005 like this.
  38. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    It's just the way it will create VS component, it does not require re-making VS node :) I'm still busy with MM2, have not looked into it yet.

    Do you have VS components assigned three times on all of the terrain chunks?

    Not yet. You can take a look at MM2 at GitLab (email me your order number to get access) if you'd like to. Yesterday I've completed the function node - consider it as a biome node with inputs, outputs and values exposed - I will make a video shortly. But, in general, still there is a lot of work to do.

    Thanks or sharing your nodes! If you've got a GitLab access feel free to append the Custom Generators list!

    CTS shaders were renamed in the latest CTS version. Thanks for the hint!
     
  39. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    I have seen a few more instances of my "root" terrain (0,0, which is pinned) disappearing on play start.

    Last time you suggested checking whether I had moved the pinned node - I hadn't.

    Perhaps a hint: the last thing I remember doing before this latest was changing the reflection probe blending on an ocean object which was a child of the root (0,0) chunk. Then when I hit play 0,0 was auto-disabled (and repeatedly disables itself if I manually enable it.)

    Not a solid repro - but I've lost a few edit session to this bug, hit it about twice in the last 3 weeks.

    Otherwise things go smoothly - infinite procedural landscape running great on an iPhone.
     
  40. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    @Wright I'm trying to build the MM2 beta from gitlab but it seems like I am missing something. It can't find the Plugins namespace and I couldn't find definitions for PosTab, MatrixWorld, and a few others. Is there another repo I need to pull for the gitlab to build?
     
  41. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    Wright likes this.
  42. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    mmaclaurin, next time you run into this issue could you please disable MM and try enabling terrain - just to check if the bug is called by MM.

    YolanOTHER, you'll have to use two repositories if you'd like to use MapMagic 2 from GitLab:
    - MM repository itself
    - tools shared between MM, Voxeland, Erosion Brush and other assets. Plugins namespace is defined in some scripts from here, as well as PosTab and MatrixWorld.
     
  43. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @Wright ,

    Im getting errors when following your biomes tutorial.

    Error generating chunk: MapMagic.Coord x:2 z:0: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

    This error seems to be stopping the blending of biomes.

    The preview option to is greyed out too so I cannot preview if the blends are happening.
     
  44. YolanOTHER

    YolanOTHER

    Joined:
    Oct 23, 2016
    Posts:
    47
    Ah, I remember something about the tools repo now. I'll give that a shot tonight. Thanks.
     
  45. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    AndyNeoman, could you please email me the full error text and the graph to reproduce it?
     
  46. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    No problem, It will be in the morning though as it is late here now. I love the tool and I know some of my issues is just me getting used to it but these errors are slowing down the process. I will email you first thing (UK time).
     
  47. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
  48. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    Ok understandable :) @LennartJohansen also said he ll help you with that, so if you guys have a beta or something of the reworked node let us know, it can't really be used as it is right now :) Thanks.
     
  49. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Can't find any way to close or delete the thread - the only thing I can do is to rename it. I've removed all the links and posted warnings everywhere I could. Hope it helps.

    Not yet. It has all of the main functions, but still lacks reliability.

    You can try using it outside of biomes. Or if you could email me the issue detailed description with a project to reproduce it I'll try to do a quick fix.
     
    malkere likes this.
  50. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    @Aress28 even without objects the terrain has a collider. Depending on the size/resolution of your heightmap that can cause a very clear pause, and would do so with any tool. That's part of the Unity engine.