Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] MapMagic 2 - infinite procedural land generator

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

  1. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,782
    It might really be the reason why Objects Outputs are not cleared. Thanks for pointing that out!
     
    malditonuke likes this.
  2. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    Hola @Wright, I am having a persistent problem with VSP output in HDPR. Errors are listed below. I'm going to delete Object support and the object part of my graph and rebuild it as this graph was imported from a non-SRP build (which shouldn't matter, but ?)

    (BTW: sometimes I report through idea informer but I never hear the follow-up on those so I post here first in case it's a known issue and/or has a workaround)

    ERROR A (all three usually occur together): In this case index is in the thousands and the array is less than a hundred (can get detailed stats if you like)
    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <fb001e01371b4adca20013e0ac763896>:0)
    System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <fb001e01371b4adca20013e0ac763896>:0)
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <fb001e01371b4adca20013e0ac763896>:0)
    MapMagic.VegetationStudio.VegetationStudioTile.FlushObjects (UnityEngine.Rect terrainRect, System.Boolean clearCache) (at Assets/MapMagic/Compatibility/VegetationStudio/VegetationStudioTile.cs:226)
    MapMagic.VegetationStudio.VegetationStudioTile.OnDisable () (at Assets/MapMagic/Compatibility/VegetationStudio/VegetationStudioTile.cs:83)


    ERROR B
    Exception: Routine error: System.NullReferenceException: Object reference not set to an instance of an object
    at UnityEditor.AssetDatabase.Contains (UnityEngine.Object obj) [0x00001] in <2cbbf8f8c622459ca9fa64194b7b6e6e>:0
    at MapMagic.Nodes.MatrixGenerators.CustomShaderOutput200+ApplyData.Apply (UnityEngine.Terrain terrain) [0x000d4] in F:\Unity\rkhd19\Assets\MapMagic\Generators\Matrix\Runtime\TexturesOut.cs:402
    at MapMagic.Nodes.MatrixGenerators.MicroSplatOutput200+ApplyData.Apply (UnityEngine.Terrain terrain) [0x00105] in F:\Unity\rkhd19\Assets\MapMagic\Compatibility\Runtime\MicroSplatOutput.cs:115
    at MapMagic.Terrains.TerrainTile.ApplyNow (MapMagic.Terrains.TerrainTile+DetailLevel det, MapMagic.Products.StopToken stop) [0x0003c] in F:\Unity\rkhd19\Assets\MapMagic\Terrains\TerrainTile.cs:735
    at MapMagic.Terrains.TerrainTile+<>c__DisplayClass39_0.<Generate>b__0 () [0x00000] in F:\Unity\rkhd19\Assets\MapMagic\Terrains\TerrainTile.cs:709
    at Den.Tools.Tasks.CoroutineManager.Update () [0x000f0] in F:\Unity\rkhd19\Assets\MapMagic\Tools\ThreadManager\CoroutineManager.cs:136
    Den.Tools.Tasks.CoroutineManager.Update () (at Assets/MapMagic/Tools/ThreadManager/CoroutineManager.cs:137)
    MapMagic.Core.MapMagicObject.Update () (at Assets/MapMagic/Core/MapMagicObject.cs:144)

    ERROR C
    NullReferenceException: Object reference not set to an instance of an object
    MapMagic.VegetationStudio.VegetationStudioTile.FlushObjects (UnityEngine.Rect terrainRect, System.Boolean clearCache) (at Assets/MapMagic/Compatibility/VegetationStudio/VegetationStudioTile.cs:212)
    MapMagic.VegetationStudio.VegetationStudioTile.OnDisable () (at Assets/MapMagic/Compatibility/VegetationStudio/VegetationStudioTile.cs:83)
    UnityEngine.GameObject:SetActive(Boolean)
    MapMagic.Terrains.TerrainTile:set_ActiveTerrain(Terrain) (at Assets/MapMagic/Terrains/TerrainTile.cs:97)
    MapMagic.Terrains.TerrainTile:SwitchLod() (at Assets/MapMagic/Terrains/TerrainTile.cs:196)
    MapMagic.Terrains.TerrainTile:StartGenerate(Graph, Boolean, Boolean) (at Assets/MapMagic/Terrains/TerrainTile.cs:588)
    MapMagic.Core.MapMagicObject:StartGenerateNonReady() (at Assets/MapMagic/Core/MapMagicObject.cs:314)
    MapMagic.Core.MapMagicObject:OnEnable() (at Assets/MapMagic/Core/MapMagicObject.cs:122)
     
  3. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,782
    Thanks for reporting this! I can see your ticket on ideainformer - is it the same issue? Could you please send me the scene and the graph along with the instructions so I could reproduce it?

    Sorry for the silence on ideainformer - I usually review tickets when it comes for bugfixes.
     
  4. sammi32

    sammi32

    Joined:
    Feb 19, 2014
    Posts:
    16
    Hi,
    @Wright have you an release Date for the next Update?
    and then, which Bugfixes and/or Functions are planed for the next Update.

    Best regards
     
  5. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,782
    I'm currently working on big Splines module update, so all of the changes will be related mainly with splines + the most critical bug fixes. Is there any particular issue your are interested in being resolved? I can release a quick fix if it won't require changing more than one file.
     
    mmaclaurin likes this.
  6. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
    Hi,

    This is my first post here, so I'd like to thank you for a great tool.
    Unfortunately I am having some serious issue with the Splines module - it makes very nasty artifacts on tile edges. It would be great if you could fix it in the new update.

    Thanks,
    De JET
    upload_2020-7-7_19-3-30.png
     
  7. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
    Another example
    upload_2020-7-7_19-48-4.png
     
  8. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
    It seems that this problem might be related not to Splines module specifically, but to the main generator. This area was generated with FLATTEN function and it also shows this nasty artifact on tile edge.
     
  9. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
  10. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
    Also it doesn't matter how big margins I set in the "Tile Settings".
     
  11. SenseEater

    SenseEater

    Joined:
    Nov 28, 2014
    Posts:
    69
    Unity 2019.4.0 LTS | MapMagic 2.0.5 | MicroSplat 3.303

    Getting following error in console on adding MicroSplat out node to graph as well as loading the demo MicroSplat graph

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.AssetDatabase.Contains (UnityEngine.Object obj) (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
    3. MapMagic.Nodes.MatrixGenerators.CustomShaderOutput200+ApplyData.Apply (UnityEngine.Terrain terrain) (at Assets/MapMagic/Generators/Matrix/Runtime/TexturesOut.cs:402)
    4. MapMagic.Nodes.MatrixGenerators.MicroSplatOutput200+ApplyData.Apply (UnityEngine.Terrain terrain) (at Assets/MapMagic/Compatibility/Runtime/MicroSplatOutput.cs:115)
    5. MapMagic.Terrains.TerrainTile+<ApplyRoutine>d__41.MoveNext () (at Assets/MapMagic/Terrains/TerrainTile.cs:787)
    6. Den.Tools.Tasks.CoroutineManager.Update () (at Assets/MapMagic/Tools/ThreadManager/CoroutineManager.cs:147)
    7. MapMagic.Core.MapMagicObject.Update () (at Assets/MapMagic/Core/MapMagicObject.cs:144)
    8. MapMagic.Core.MapMagicObject.EditorUpdate () (at Assets/MapMagic/Core/MapMagicObject.cs:136)
    9. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    10. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    11. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    12. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
    13. System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    14. System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    15. System.Delegate.DynamicInvoke (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    16. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
    17.  
    Code (CSharp):
    1. Exception: Routine error: System.NullReferenceException: Object reference not set to an instance of an object
    2.   at UnityEditor.AssetDatabase.Contains (UnityEngine.Object obj) [0x00001] in <af78ad00a40d4f61b82afc6cafb0a416>:0
    3.   at MapMagic.Nodes.MatrixGenerators.CustomShaderOutput200+ApplyData.Apply (UnityEngine.Terrain terrain) [0x000d4] in E:\WORK2\Black\BLACK_Prototype_01\Assets\MapMagic\Generators\Matrix\Runtime\TexturesOut.cs:402
    4.   at MapMagic.Nodes.MatrixGenerators.MicroSplatOutput200+ApplyData.Apply (UnityEngine.Terrain terrain) [0x00105] in E:\WORK2\Black\BLACK_Prototype_01\Assets\MapMagic\Compatibility\Runtime\MicroSplatOutput.cs:115
    5.   at MapMagic.Terrains.TerrainTile.ApplyNow (MapMagic.Terrains.TerrainTile+DetailLevel det, MapMagic.Products.StopToken stop) [0x0003c] in E:\WORK2\Black\BLACK_Prototype_01\Assets\MapMagic\Terrains\TerrainTile.cs:735
    6.   at MapMagic.Terrains.TerrainTile+<>c__DisplayClass39_0.<Generate>b__0 () [0x00000] in E:\WORK2\Black\BLACK_Prototype_01\Assets\MapMagic\Terrains\TerrainTile.cs:709
    7.   at Den.Tools.Tasks.CoroutineManager.Update () [0x000f0] in E:\WORK2\Black\BLACK_Prototype_01\Assets\MapMagic\Tools\ThreadManager\CoroutineManager.cs:136
    8. Den.Tools.Tasks.CoroutineManager.Update () (at Assets/MapMagic/Tools/ThreadManager/CoroutineManager.cs:137)
    9. MapMagic.Core.MapMagicObject.Update () (at Assets/MapMagic/Core/MapMagicObject.cs:144)
    10. MapMagic.Core.MapMagicObject.EditorUpdate () (at Assets/MapMagic/Core/MapMagicObject.cs:136)
    11. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    12. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    13. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
    14. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
    15. System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    16. System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    17. System.Delegate.DynamicInvoke (System.Object[] args) (at <437ba245d8404784b9fbab9b439ac908>:0)
    18. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <af78ad00a40d4f61b82afc6cafb0a416>:0)
    19.  
     
  12. sammi32

    sammi32

    Joined:
    Feb 19, 2014
    Posts:
    16
    hi,
    @Wright ok, i looking forward

    :)
    best regrads
     
  13. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,379
    Go back into your graph or graph and make sure that in the microsplat node the custom shader is in the slot. Sometimes when I upgrade the project or in some other cases the shader in that node gets removed and putting it back in will fix the null reference exception.
     
  14. SenseEater

    SenseEater

    Joined:
    Nov 28, 2014
    Posts:
    69
    Do you mean the Material and not the shader ? Anyways i double checked and its there. Its happening in clean graph as well.
     
  15. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
    Same here on Unity 2019.2.6f1. MicroSplat integration not working :(
     
  16. eholding007

    eholding007

    Joined:
    Nov 4, 2014
    Posts:
    1
    Not sure if I missed this or not, but is there a way to export mm2 terrains as unity terrains? I remember in MM1 this was an option by just saving the terrain.
     
  17. malditonuke

    malditonuke

    Joined:
    Apr 15, 2017
    Posts:
    16
    Wright likes this.
  18. mrnas

    mrnas

    Joined:
    Jan 13, 2018
    Posts:
    10
    Hi,

    how can i pin or generate Terrain Tiles via Script in Editor Mode?

    I tried to use the following

    Code (CSharp):
    1. public void PinCoordinate(MapMagicObject mapMagic,Den.Tools.Coord coord)
    2.     {
    3.         mapMagic.tiles.Pin(coord, true);
    4.     }
    but there is a Nullpointer Exception when i use that


    NullReferenceException: Object reference not set to an instance of an object
    MapMagic.Terrains.TerrainTile.Construct (MapMagic.Core.MapMagicObject mapMagic) (at Assets/MapMagic/Terrains/TerrainTile.cs:242)


    Also i am totally unable to manually pin Tiles.

    The blue "Tile Border Rectangles" don't appear under the Mouse Cursor when i click on the "Pin New Tile" Button. I tried it with Unity 2019.4.3f1, 2019.4.0f1 and i also made a new Project.
     
  19. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
    malditonuke likes this.
  20. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
    Another problem with Splines - misalignments on tile edges.
    upload_2020-7-9_23-31-16.png
     
  21. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,782
    It's hard to say why it happens without even seeing a graph, and the scale of these artifacts is not clear. But in some cases - when the flatten radius is so high that it is comparable to the tile size. The thing is that each tile is generated independently, and is not aware of objects on neighbor tiles (except the ones within margins), so one tile can flatter he object located on it, while the other one has this object out of range and no flatten will be performed here.

    There's no such a feature out of the box. You can create your script that calls AssetDatabase.CreateAsset, or vote for implementing it on ideainformer.

    Could you please check if you have gizmos enabled in a scene view (Gizmos button at the top right corner of the scene view window)? Tiles and tile frames are the gizmos and work similarly to camera frustum or light cone. They are not editable when gizmos toggle is disabled.

    Yes, spline nodes still have some rough edges - I'm going to implement main spline functionality first, and then polish such issues.
     
  22. mrnas

    mrnas

    Joined:
    Jan 13, 2018
    Posts:
    10
    Thanks for the fast answer! Yes, Gizmos are enabled :/
    Could you please reply to the first part of my question? ;)

     
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,782
    Just wonder why you need to do it via script, but anyways - here is a the way to pin tile:
    Code (CSharp):
    1. TerrainTileManager.Pin(Coord coord, bool asDraft, MonoBehaviour holder=null)
    Calling ```mapMagic.tiles.Pin(new Coord(x,z), false, mapMagic)``` will pin a tile at x and z tile coordinates (not units, coordinates are measured in tiles), mapMagic here is a Map Magic monobehaviour.
     
    mrnas likes this.
  24. mrnas

    mrnas

    Joined:
    Jan 13, 2018
    Posts:
    10
    I want to create larger Terrains with lots of Tiles and i want to experiment on different Tile Sizes for Performance, would be very painfull to do that manually :D

    Perfect! Thanks a lot!

    I was using the Megasplat Compatibility Scene and got a Nullpointer Exception in TexturesOut.cs line: 402 when i pinned a Tile. I could solve that by changing the line from

    Code (CSharp):
    1. if (!UnityEditor.AssetDatabase.Contains(tex))
    to

    Code (CSharp):
    1. if (tex!=null &&!UnityEditor.AssetDatabase.Contains(tex))
    (not sure if this is the best solution, but it works in my case)
     
  25. dejet

    dejet

    Joined:
    Aug 26, 2012
    Posts:
    9
    Another strange behaviour: spikes on tile corners. Seems that at this moment infinite terrain generaion isn't quite ready.
    upload_2020-7-12_0-31-59.png
     
  26. jimmygladfelter

    jimmygladfelter

    Joined:
    May 3, 2020
    Posts:
    25
  27. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,782
    Thanks for reporting this, fixed for the next version!

    This one should be improved in the next version too, but unfortunately I can't guarantee the ideal placement of the object on terrain triangle because of terrain triangulation (for bended terrain quad the diagonal edge could noticeably vary in height) and conversion to 16 bit on some height apply types. But inaccuracy will be hundredths of unit instead tenth or full units in case of high terrains.

    Is there any way I could reproduce this issue?
     
    jimmygladfelter likes this.
  28. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    900
    I'm looking into combining Map Magic 2 with River Auto Material. I see on the Asset Store an extension for Map Magic 2 called "Spline Tools for Map Magic & Map Magic 2", and one of it's features is integration with River Auto Material.

    However, I am weary about using a third party add on, since you could make changes that break its functionality. I know that you have MapMagic 2 Splines for sale on the Asset Store, however I am not sure if this has or you will add integration with River Auto Material?

    Have you used the third party add on I mentioned? What do you recommend?
     
  29. jimmygladfelter

    jimmygladfelter

    Joined:
    May 3, 2020
    Posts:
    25
    Is there an easy way, in code, to know when you are purely in a certain biome (aka...100% in snow forest for example)? I was looking into trying to turn on a snow/wind particle effect to the main camera when you are in a certain biome for example.
     
  30. Penhoat

    Penhoat

    Joined:
    Mar 2, 2020
    Posts:
    88
    @Wright the script you gave me via email (emailreviewvr) fixes the issue, and all works well, until I save, close unity, open again, then it crashes unity when I go into playmode.
     
  31. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    53
    Hi, how does this asset work with custom shaders for the terrain and objects?
     
  32. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,078
    @Wright , I've just purchased Map Magic 2 plus 2 of the 3 add-ons, and some Microsplat stuff.

    Is the idea with Splines to one day have actual river (Water) implementations?

    In the meantime, I see MM2 is compatible with Enviro (which I own) but what about Weather Maker?

    What are the best water asset solution(s) at the mo?
     
  33. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,782
    I plan to implement R.A.M. support, however don't know ETA yet. Speaking of this plugin - I was not aware that it was updated to MM2. I have not used it, so can't recommend anything here.

    Nope. But I can see your use case, and admit that there really should be a way to determine the biome. You can use the Custom output, and write biome masks to textures, then store these textures in some per-terrain component, and read biome ratio by sampling textures from script. Not very convnient, and looks more like a hack. I will think about the easier way to get biome factors somehow.

    It might be that it requires more change than a single file. I plan to submit new version this week (plus some days for Unity to review), probably it will work fine here. Do you need me to look this ASAP or it can wait for next version to be released?

    It works fine with custom shaders as long as they don't have any additional scripts on terrain - just material and shader file itself. And as long as these shaders use the simple control maps (1 channel = 1 texture mask). Use Custom node to output the control maps.
    Note that MM2 has CTS, MicroSplat and MegaSplat compatibility build-in.
    MM don't have to do anything with objects materials, so they should work fine out of the box.

    Yes, I've got river nodes planned (special pathfinding, interconnecting, river banks, probably bridges).

    I'm not aware of this asset, however it doesn't mean it can't work with MM2. Even if it wasn't made compatible by his author, most features should not intersect or depend on MM2 in any way - unless there should be some puddles or anything related with terrains.

    Personally I've used Aquas a couple of years ago and was pretty happy with it. It worked fine with MM1.
     
  34. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    108
    +1 on this. Knowing the biome composition at certain coordinates would be a useful addition. Maybe something that would work similarly to Unity's Terrain Layers?
     
  35. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,078
    @Wright , thanks v much for the comprehensive response. I have purchased the Spline asset and REALLY looking forward to seeing what you can do with Rivers (and Bridges!) and paths with that one, I wonder if they can be done with infinite terrain too - that would be amazing.
     
  36. Penhoat

    Penhoat

    Joined:
    Mar 2, 2020
    Posts:
    88
    @Wright Appreciate the response! No it can definitely wait until your update. Better for everyone to enjoy the update than you spending time on me alone haha.
     
  37. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,078
    @Wright , I'm only really just starting to get in to Map Magic 2 and the add-ons. However, I was wondering about four things in particular before really testing them to destruction:-

    1. Locks. I was wondering if you could instead do square (ish) lock shapes or perhaps other basic shapes? I'm thinking about say many settlements being more square than round or perhaps quite linear and long (along a road). Also, what about rivers etc? I suppose I could achieve that with a shed load of locks, but just wondering about what would be easier or whether different forms of lock might be a feature you may look at?

    2. Objects (well, buildings and structures). I am not really up to speed with all the map nodes yet. However, wondering if there is any canny way of getting some variation but some symmetry such that the nodes can place nice looking settlements on the map magic terrain.

    3. Objects (well, buildings and structures) effecting (back) the height of the terrain. It would be neat if you could place your objects and these (or these as a group) could flatten or flatten to an extent the terrain around these groups of objects. So, say, you create a settlement, procedurally, as a 'clump' and there is some node way to play this back in to the height output such that the terrain automatically flattens out under and, to an extent, around the objects (flattens or does something else or flattens to an extent). You are probably going to say there is already a way to do this.

    4. Looking forward to a demo vid of the splines nodes... ;)
     
  38. jimmygladfelter

    jimmygladfelter

    Joined:
    May 3, 2020
    Posts:
    25
    Is there a way select an inner area of a certain selection (think of it like the current selection's x/z with some margins, basically it wouldnt be a height calculation)?
    Im trying to create some mountains in the inner areas of the mild green area.
    This 'light green' area is from a Whittaker node's 'mild forest' area multiply blended with a height selector (which would be the land (minus shoreline) to create the following effect:
    upload_2020-7-16_21-35-28.png

    But if I try to do this I always end up selecting the entire light green area and it ends up making the shoreline edge very sharp. I know I can adjust the selector's min/max transition settings but I dont really want to do that because I want a quick transition from beach to a given biome.
    upload_2020-7-16_21-30-4.png

    Any ideas on how or if selecting an inner area in this case is possible?
    I may try to play around with writing my first custom generator to do it if not.

    EDIT: I figured out a solution for myself that will work. I was able to add a height selector with a higher transition inward towards the center of the land. By doing this, I am able to add mountains with a nice transition in the inner land now.
     
    Last edited: Jul 17, 2020
  39. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,540
    You can use the texture output of the light grass. Adjust it with a curve maybe.
     
  40. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    59
    hi Denis,
    A great tool, just started using it seeing your tutorials. But with the Microsplat node I'm not able to use the custom splat maps, the terrain turns black. If I just disable the custom splat maps then the textures appear back.
    Also, I use all the maps for the textures (diffuse, normal, height, smoothening, ao) in the Microsplat Config file.
    Also is the erosion tool a redundant functionality over MM2? or does it offer anything extra than what I can achieve with the erosion node. Also, I assume the noise brush is a subset of the erosion tool. Great set of tools btw, just a suggestion will be great to have integration for nature renderer and the vegetation engine if possible.
     

    Attached Files:

    • MM1.png
      MM1.png
      File size:
      406.2 KB
      Views:
      14
    Last edited: Jul 21, 2020
    Duffer123 likes this.
  41. jimmygladfelter

    jimmygladfelter

    Joined:
    May 3, 2020
    Posts:
    25
    When using the microsplat node, I seem to be getting an issue where the textures/materials dont line up properly at the seams:
    upload_2020-7-19_1-41-53.png

    I tried repinning the draft tiles but the issue still happens on seams. It also happens in play mode.

    Im using:
    - linear color space
    - the built-in/standard unity rendering pipeline
    - unity version: 2019.3.13f1
    - mapmagic version: 2.0.5
    - microsplat version: 3.462

    Any ideas?
     
    Last edited: Jul 19, 2020
    Duffer123 likes this.
  42. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,078
    I think @Wright is aiming to fix most/all Microsplat bugs in next release.... more strength to his arm!
     
    jimmygladfelter likes this.
  43. Penhoat

    Penhoat

    Joined:
    Mar 2, 2020
    Posts:
    88
    So just picked up Splines. Know it's still in beta, but is there anyway to actually combine stroke and stamp? Seems essential to be able to use both really
     
  44. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    183
    I have a feature request.

    A new modifier based on normals, used for directional effects. This will enable trees that grow on sun-facing hillsides or glaciers on the shaded side of mountain ranges. My proposed use is to combine a normals modifier with a shore modifier to create ocean currents that change direction depending on west coast or east coast.

    I have posted this on Idea Informer for anyone who would like to vote on it.


    *A heightmap converted to a normal map has the red channel running east-west and the green channel running north-south. Mixing the two channels creates arbitrary degrees.

    height.jpg normals.jpg
    red.jpg green.jpg
     
  45. jimmygladfelter

    jimmygladfelter

    Joined:
    May 3, 2020
    Posts:
    25
    I noticed that trying to add more than 16 textures in a 24-texture packed microsplat material would cause index out of bounds exceptions.

    It seems that in TexturesOut.cs when it tries to get a texture name for the iterated texturecolors, the indicies of these arrays do not match up (textuure names array was shorter), resulting in texName being equal to null, then when it tries to get the texture it blows up.

    I dug into the code a bit and it seems that this fixed the issue:

    In MicroSplatOutput.cs, in the Finalize function where you declare the ApplyData, I changed the textureNames array to include 8 instead of 4 texture names:

    Code (CSharp):
    1. // microsplat allows packing 32 textures into a single material/shader (aka: max texture count property on the microsplat material).
    2.                 textureNames = new string[] {"_CustomControl0", "_CustomControl1", "_CustomControl2", "_CustomControl3",
    3.                     "_CustomControl4", "_CustomControl5", "_CustomControl6", "_CustomControl7" },
    I havent done enough testing or know enough about this code to know if there any reprecussions by changing this though. @Wright would have to make sure.

    just an FYI: I know that Unity terrains can only support upto 16 textures (I believe) on a single terrain but in my use case, only certain terrains (different biomes) would have a small subset of these. So I'm not trying to put 16 textures on a given terrain, I just want to place like 4 here and 4 there, etc.. but I have a 24 texture packed microsplat material...hope that makes sense..
     
    Last edited: Jul 21, 2020
  46. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    183
    I tried to use the Biomes Function node today but the input/output is missing. Is it incomplete?

    This is from the docs:
    Function.png

    This is from my graph:
    function2.jpg
     
  47. jimmygladfelter

    jimmygladfelter

    Joined:
    May 3, 2020
    Posts:
    25
    @JohnnyFactor, in your Biomes graph, did you add a Map->Function->Enter node (this is an input and adding several will add several input blue tag things in the editor) and a Map->Function->Exit node (this is the ouput and adding several will add several output blue tag things in the editor)?
     
    JohnnyFactor likes this.
  48. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    183
    Thank you, that was it. I thought those were unrelated to the Biome Function and didn't even try them.
     
    jimmygladfelter likes this.
  49. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    53
    Hi, I'm using this asset ( https://assetstore.unity.com/packages/tools/utilities/the-vegetation-engine-159647 ) for all vegetation. The way it works is that it converts your objects to a custom prefab that has all the shader settings.
    Now placing trees that have been converted works fine, but not grass. Nothing is placed at all.

    The grass is the same type of prefab as trees, in my case a collection of grass models, just with a different shader.

    What can I do to get this working?
     
  50. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,782
    Hi folks, just an announcement that I have to take about a week (maybe a bit more) off - I've got to hospital on Friday. I'm getting well, but still have to pass some time on a thick leave here. Sorry for that!
     
    Diego_Graphics and Duffer123 like this.
unityunity