Search Unity

[FREE]MicroSplat, a modular terrain shading system for Unity Terrains

Discussion in 'Assets and Asset Store' started by jbooth, Aug 9, 2017.

  1. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    Found/fixed, thanks!
     
  2. okrongly

    okrongly

    Joined:
    Dec 23, 2019
    Posts:
    65
    Which module should I update? main? I don't want to mess much with project at this stage. Thanks :)
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    I have to release it on the asset store first, and then the store has to approve it, but it will be in the core module after that.
     
  4. okrongly

    okrongly

    Joined:
    Dec 23, 2019
    Posts:
    65
    Ah ok (palmface)
     
  5. zhn17

    zhn17

    Joined:
    Jul 30, 2019
    Posts:
    52
    Just tried to change the contrast of a texture in my scene and noticed that the shader (for whatever reason) also changes the contrast of the texture below it, here's a YouTube video of it.
    Only solution I found to it was by adding empty textures after each and every texture in the array
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    this is fixed in the patch waiting for the asset store to release it.
     
  7. m506

    m506

    Joined:
    Dec 21, 2015
    Posts:
    93
    hello, I have a question in regards to runtime texture paint, and I would appreciate any inputs.
    I would need to paint the terrain under a house/building when player destroys it (during runtime), but without persisting the data. Is it possible with core Microsplat?
    If not, can you please point me out the asset that would allow me do such effect (runtime procedural, decal, scatter etc)?

    Thanks in advance
     
  8. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    42
    Hey there, recently bought the Mesh Terrains tool, but when converting, I get pink meshes and some errors, or if I generate a new shader, the terrain is invisible, but no errors. Using the URP package also.
    Thanks!
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    You could paint it via the terrain system, but then you'd be responsible for restoring it, etc. The MicroSplat decal system can be used to project new textures onto the terrain, or change the splat maps under it, so might be what you want. I'd suggest reading the docs on it first to see if it suits your needs.
     
  10. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    Make sure the resulting material has the render pipeline set correctly.
     
    homemacai likes this.
  11. m506

    m506

    Joined:
    Dec 21, 2015
    Posts:
    93
    Hello,

    I recently updated Microsplat to the last version (3.9.0) (from 3.8.7) and I started having some issues, which I presume has to do with some internal changes in either Microsplat or Unity.

    Some terrain areas are loosing their properties such as (tessalation / trax). See pics below:
    Microsplat3.9 issue.jpg
    When I restart the editor I can see them correctly, but as soon as I enter playmode or a "reload script assembly" action is executed, then the problem happens again. Apparently this is only affecting a patch of the terrain around the start and not all of it. I also tried to clean the shadercache and it didnt fix it.

    After I rolled back to 3.8.7 everything went back to normal, so I'm ok for now, but wanted to bring it to your attention.

    Do you have any idea what this might be? I'm using Unity 2020.3.16f1 (win64) / legacy pipeline.

    Thanks in advance
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    There was an update this morning that addressed a few bugs introduced in 3.9, and modified an aspects of trax's initialization on HDRP, but I don't think there was anything that should have affected it's behavior on BiRP. The difference in your screenshot looks like the height map blending is turned off? Most of the changes around 3.9 were around internal sampler usage (basically sharing them more), which wouldn't affect something like that. But if you can create any repro's for these issues I'd take a look at them and see if something was missed.
     
  13. m506

    m506

    Joined:
    Dec 21, 2015
    Posts:
    93
    Hi jbooth,

    Unfortunately providing a repro is not something easy for me due to the size of my project, so I will wait for more updates before committing to that, since I can live with 3.8.7 for the moment. I will get back to you at some point with my feedback on this if the issue persisted.

    As you suggested, I recently acquired the decal asset and it has indeed fulfilled my expectations. It is actually much better than I expected because I can modify tessellation with it, which adds a lot more details than just a flat picture. However, I was not being able to see any decals until I disabled and re-enabled them, so after I patched the "MicroSplatDecal.cs" with the following code I fixed the issue, so you might want to double check:

    Code (CSharp):
    1. private void InitDecal()
    2.     {
    3.         oldMtx = transform.localToWorldMatrix;
    4.  
    5.         if (targetObject != null)
    6.         {
    7.     #if UNITY_EDITOR
    8.             registeredAsDynamic =
    9.     #endif
    10.         targetObject.RegisterDecal(this);
    11.         }
    12.     }
    13.  
    14.     private void Start()
    15.     {
    16.         InitDecal();
    17.     }
    18.  
    19.     private void OnEnable()
    20.     {
    21.         InitDecal();
    22.     }
    Thanks
     
  14. tony001gaming

    tony001gaming

    Joined:
    Mar 10, 2019
    Posts:
    2
    Hey,

    Does anybody know if MicroSplat terrain blending tool work in any way with the grass on the terrain? I want to blend the grass texture with the texture of the ground underneath it.

    Thanks.
     
  15. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,133
    Question about MicroSplat. I've tried the free module to get a feel and it seems with 2-3 other modules I'll get all I need (anti-tiling, wetness, etc.)

    However, I noticed that MicroSplat generates a 120 MB texture for my terrain. I have more than a dozen levels in my game, each with its own terrain, and I'm worried I'll blow up the game's size by over a GB. Is that how MicroSplat is supposed to work, basically generate a huge terrain texture, or did I play with some settings I shouldn't have touched?
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    MicroSplat generates a texture array for all of your terrain textures in a tightly packed format. The pixel size of that array is set on the config, and should be the same or less memory than all your separate textures would have been combined anyway. MicroSplat can automatically reduce your source textures size so you don't duplicate memory as well (it doesn't do this by default in case you are using them elsewhere). Multiple terrains can share the same array data. See the docs or faq for info on working with multiple terrains.
     
  17. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,133
    Now THAT would help a lot. Most of my levels could be done with 2, maybe 3 shared texture arrays. Brilliant.

    One question before I go to experiment more: For an RTS-style game (i.e. camera mostly flying at least 10m above ground, often higher), would you recommend the Anti-Tiling plugin or the Texture Clusters as an anti-tiling feature?
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    That's more about performance- if you can afford stochastic or texture clusters, it's always the best looking option.
     
    Tom163 likes this.
  19. xVortexXz

    xVortexXz

    Joined:
    Feb 16, 2017
    Posts:
    1
    Any plans on adding support for later URP versions such as URP 12?
     
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    yes, as I've answered hundreds of times in the past, I generally release adapters around the time that SRPs go into LTS release cycles, because they break way too much and take too much work to upkeep before that.
     
    Willbkool_FPCS likes this.
  21. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,133
    How do I re-use a microsplat layer? There seems to be no way to assign it in the config.

    I have a bunch of scenes each with their own terrain object, but I want to re-use the same textures over a set of them. It doesn't make sense to me that each would need its own layer as they would be identical. Do I have to re-use the entire microsplat material and config? Or can I somehow assign a layer, instead of textures, in the config?
     
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    MicroSplat doesn't use terrain layers, really - they are a vestige of Unity's system which aren't extensible.

    You can have completely different MicroSplat materials use the same textures (just assign the same texture arrays), or have multiple terrains share the entire setup (assign the same material), either will work. As the documentation notes, once you switch to MicroSplat you don't use terrain layers anymore.
     
  23. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,133
    Yes. I didn't mean terrain layers, but the microsplat_layer_* files that MicroSplat generates when I assign textures to the Config.

    So I get the thing to do is to re-use the entire config among terrains, Config, MicroSplat Material and all.
     
  24. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,282
    You only use the Unity terrain system to paint, right?
     
  25. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    To paint terrains textures, yes, though MS contains other painters for effects or meshes.
     
    PolyMad likes this.
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    You don't have to use the whole thing. For instance, most of the MicroSplat samples use the texture arrays from the core module, so you're not downloading the same textures over and over. The only ones that don't are ones that needed unique textures or terrain to show off the features.
     
  27. Ratslayer

    Ratslayer

    Joined:
    Feb 6, 2014
    Posts:
    36
    Hey. I upgraded to the new Unity Tech Stream, 2021.2.1f1. Tried out deferred rendering but microsplat does not seem to work (terrain just disappears). Am I doing something wrong or is deferred rendering not supported yet?
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    the URP adapter lists which versions of URP it supports.
     
  29. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,133
    I'm using deferred rendering just fine, with 2021.2.0b16 - but I have noticed that the terrain sometimes goes pink or disappears. I toggle it off (the whole terrain object, set to inactive in the inspector) and on again and there it is with everything fine. Something that needs to init, I suppose.
     
  30. scottylewin

    scottylewin

    Joined:
    Apr 25, 2014
    Posts:
    1
    Hi Jason,
    I’ve taking a deep dive into your products and am loving the results thus far. Great job!!
    Just a quick one.
    Is it possible to link or instance the terrain Matt with the mesh workflow material?
    I’m trying to match the mesh with the terrain and would like a way to link all material properties between both materials.
    Thanks
     
  31. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    There's not really any kind of automatic way to do that.
     
  32. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    104
    Looks like there is something wrong when I turn on volumetrics light on Terrain Blending.
    Please check this out:
    QQ截图20211115113905.jpg QQ截图20211115113855.jpg

    The second picture got some shadow when volumetrics turn on.

    Could you please help?
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    Which volumetric lighting system, render pipeline, unity version, etc, etc?
     
  34. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    469
    The more I play with this system the more I'm impressed. Jason you are a courageous man, the bug hunt must be horrible at times in such a complex system. I have no Idea how you manage it.

    Mandatory praises aside ;P I wanted your feedback on something. When changing a texture on my project it takes a long time to "update" the changes. Would it be possible to update a single layer or even texture at a time instead of the entire thing? Seems like it could save a lot of time.

    At the moment, It takes over a minute. Not a big deal, but we haven't started painting our terrain yet. I was just testing different normal maps on a 4 layer terrain (with all the texture maps filled in) and I fear the moment we will start adding layers for real.

    We do use 4k textures, we could reduce the quality but we want them large.

    This is the cpu usage while updating, seems to only really load 4 cores. Not sure you have any control over it.
    upload_2021-11-16_14-7-45.png
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    Doing individual texture updates would be a massive complexity increase in the texture packing system, as well as potentially introduce all kinds of statefull bugs where things get out of sync and cause support requests, so I have no plans to do that.

    With that said, Unity has speed up texture compression/import times considerably in newer versions of unity, and may have moved some of it to the GPU, though I'm not sure about that. Note that formats such as ATSC and ETC2 are much slower to compress than DXT/BCN. Also consider reducing your texture resolution while iterating and bumping them up either in the build step or when you want to see them larger.
     
  36. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    42
    Hello Jason, so again with the MeshTerarin feature, I am using low poly mesh terrains for distant areas. They are loaded from the resources folder as prefabs, it works while in play mode, but in the build the mesh terrains are pink. Normal terrains with Microsplat work normally.
    I tried putting the shaders on Alwaysincluded and the Resources folder, but no luck.
    Is there an extra step for doing this? thanks
     
    Last edited: Nov 17, 2021
  37. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    469
    Excellent suggestions. Thank you!
     
  38. chris73it

    chris73it

    Joined:
    Oct 15, 2013
    Posts:
    12
    New user here. A gentle suggestion: add this explanation to the description of "MicroSplat - URP 2020 Support" on the asset store. Frankly, I imagined that you might only support LTS releases, but - being super new to the MicroSplat ecosystem - I wasn't sure and came here to ask that exact question.
     
  39. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    This question is answered in the FAQ, along with the hundreds of other questions people might suggest I put on the asset store description, which has limited space and isn't really designed to be a FAQ. And in my experience, it really doesn't matter if I littered it in blinking flashing text all over the asset description, I'd still get the question, which is why the FAQ is half things that could be answered by reading the asset description or included documentation.
     
  40. Taratus

    Taratus

    Joined:
    Sep 8, 2020
    Posts:
    8
    Hello,
    I am using the MicroSplat Vertex Painting Mesh Workflow and my new self modeled mesh has distortion on the vertical polygons. On an other mesh there is no such distortion although using the same microsplat material. How to get the material distortionfree? UV coordinates should be not important as I understood. Has this something to do with the normals of the mesh?
     
  41. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    Don't stretch your UVs? By default, it's going to use whatever UVs your mesh has, unless you enable triplanar with the triplanar module.
     
  42. Taratus

    Taratus

    Joined:
    Sep 8, 2020
    Posts:
    8
    I just understood what went wrong. By modeling the mesh itself gets distorted in its transform. In blender I applied all transforms and now the material also lost it's distortion. Thanks ^^
     
  43. RvtL

    RvtL

    Joined:
    Oct 20, 2018
    Posts:
    3
    Hi, When I enable SSS while also having the day-night cycle enabled (OverCloud) the bright part of the terrain flickers. I think I've narrowed it down to the reflection probe refreshing every frame. Is this something fixable or is that combination not possible?
     
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    microSplat doesn’t render reflection probes. Most likely it’s to do with whatever is rendering them.
     
  45. RvtL

    RvtL

    Joined:
    Oct 20, 2018
    Posts:
    3
    Good to know, that gives me an idea in what direction I should be looking. Thanks!
     
  46. Quittern

    Quittern

    Joined:
    Oct 9, 2018
    Posts:
    17
    Hi, I'm testing out the terrain to mesh tool, but it doesn't keep the trees and grass in the conversion. Would I have to use another tool to paint trees on the mesh-version of my terrain to use this?
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    Yes, it only handles the terrain itself. You can use VSP on meshes, or what some people do is keep the original terrain and turn off it's draw so it's only used for trees (especially if you have the terrain loaded for close ups anyway)
     
  48. Quittern

    Quittern

    Joined:
    Oct 9, 2018
    Posts:
    17
    Alright, thanks for the quick reply!
     
  49. SetDev

    SetDev

    Joined:
    Apr 4, 2017
    Posts:
    4
    Heya all, MicroSplat have discord channel ? ty..
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    It's listed on every asset store description for every MicroSplat asset, as well as in the documentation.
     
    dsilverthorn likes this.
unityunity