Search Unity

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

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

Thread Status:
Not open for further replies.
  1. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Ok, I just figured this one out- Something is wrong with the terrain collection when you download it as a single package. If you delete the Texture Clusters module and install it from the single package version, it will compile fine. Luckily I recently added upgrades so that every person who owns the terrain collection also owns the individual modules via a free upgrade, so if you do not see them in the package manager you can go to the store and add them for free.
     
    protopop and chrisabranch like this.
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Ok, so package-apocolypse fixes:

    - If you are a very new version of Unity 2020.3LTS, an enum was removed and must be removed from the terrain painter. Replace SelectionMode.OnlyUserModifiable with SelectionMode.Editable in TerrainPainterWindow (line 48)
    - If you are installing from the Terrain Collection, for an unknown reason the texture clusters module will cause a compile error. I suspect the file on the store is corrupted. However, owning the terrain collection now gives you the rights to the individual modules as well. So if you remove it and install it from the single asset on the store instead of the terrain collection, it will compile fine.
    - If you are using substance, you have to add select the assembly definition files in Core/Scripts/Jbooth.MicroSplat.Core and Core/Scripts/Editor/JBooth.MicroSplat.Core Editor and add the substance game dll as a reference.

    A fix for these should be available once approved by the asset store, likely on monday.
     
    Squize, protopop, byCDW and 1 other person like this.
  3. Foulcloud

    Foulcloud

    Joined:
    Mar 23, 2014
    Posts:
    19
    Please forgive but could you please elaborate on "add a reference to MicroSplat's asmdef's".
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    So assuming your not having one of the problems described above and your trying to write code that interacts with MicroSplat, and you have your code in it's own assembly, then you have to add a reference to MicroSplat's core or editor code from your assembly definition file. (Click on you asmdef file and go to assembly definition references and add one, select the microsplat core assembly). However, from your message I can't tell if this is what your trying to do or if your just running into the issues described above.
     
  5. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620
    Has anyone else experienced Substance integration issues with Unity 2020.3.8f1?

    Failed to extract Substance.Editor.SubstanceImporter class of base type UnityEditor.Experimental.AssetImporters.ScriptedImporter when inspecting Assets/Allegorithmic/Plugins/Substance/Substance Engine/Editor/Substance.Editor.dll
    UnityEditor.AssemblyHelper:ExtractAllClassesThatAreUserExtendedScripts (string,string[]&,string[]&,string[]&)

    This leads to Microsplat failing to compile when using the Substance namespace. Tried it on a fresh project. I just need confirmation that it is a known issue and Allegorithmic aka Adobe is responsible.
     
  6. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    74
    Hello, got it updated and everything working without any errors.
    Except Digger, it says i am missing the assembly references, tried to find in Digger folder the asmdf file to insert Microsplat assembly references. The only one there, is in the Native Collections folder, but adding the references in that file does not make the errors go away, all the files are imported with the digger integration package also imported.
    Any advice ?

    The errors:
    Code (CSharp):
    1. Assets\Digger\Sources\Digger\EditorUtils.cs(26,41): error CS0246: The type or namespace name 'MicroSplatTerrain' could not be found (are you missing a using directive or an assembly reference?)
    2.  
    3. Assets\Digger\Sources\Digger\MicroSplatSync.cs(66,58): error CS0246: The type or namespace name 'MicroSplatTerrain' could not be found (are you missing a using directive or an assembly reference?)
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    not sure, I let everyone know about the asmdef update a few weeks ago. I’ll ping them all again and hopefully patches can be made relatively quickly
     
    homemacai likes this.
  8. kevhayes

    kevhayes

    Joined:
    Nov 8, 2015
    Posts:
    10
    I'm trying to get Microsplat procedural texturing to work in conjunction with Vegetation Studio Pro biome masks and their respective splat-maps. The splat-map that VSP generates always seems to completely override the output of the Microsplat procedural texturing even though I have "combine with splat" enabled in the Microsplat shader.
    What I'm trying to achieve is a base established by procedural texturing that blends nicely with masked biomes that have their own associated textures. Is this possible? Can anyone point me in the right direction for reference? Thanks!
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    In combine with splat mode, one texture effectively means "This is where procedural texturing is used", and any other means "use this texture". So you'd need to get VSP to paint the procedural splat index texture where ever you want the MicroSplat procedural texturing to happen.
     
  10. kevhayes

    kevhayes

    Joined:
    Nov 8, 2015
    Posts:
    10
    Ah I think I understand now. What I'm looking for though is kind of the opposite I think - I want procedural texturing to be everywhere apart from within the area that the biome mask generates...
    I have a large terrain that has a nice layer setup using Microsplat procedural texturing creating my base layer of grass, stones, rock, etc, and I want to add a VSP biome in a specific area of the map to place one or more forests. I have the biome placing trees and ideally want the ground under the trees to be unique to the biome which means I have to use a splat-map in that area. I can get the splat-map to work but then it just seems to always nuke my procedural setup, or I can get the procedural texture layers to work correctly but then the biome splat texturing is lost. A visual breakdown of how to set this up would be really useful!
     
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    How to setup VSP to do something is not a MicroSplat support issue, but as long as VSP sets every else to your splat index texture then MicroSplat's procedural texturing would show through.
     
  12. kevhayes

    kevhayes

    Joined:
    Nov 8, 2015
    Posts:
    10
    I completely appreciate that. I'm just simply trying to figure out how the two systems integrate with one another.
     
  13. Sisay

    Sisay

    Joined:
    Dec 6, 2012
    Posts:
    57
    I think I found a problem.
    Unity 2021.3.3, HDRP when another scene loads a terrain scene, the view range is about 50 units.
    If a scene is loaded from the terrain as the main level (and not read by another scene), the view range of the structures is for the whole area.
    I noticed that the tessellation setting max distance always overrides the base map distance terrain setting when save. Is this a bug?
    https://imgur.com/NGQ5z8X
    https://imgur.com/JQxz9IS
     

    Attached Files:

    Last edited: May 24, 2021
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, it's by design- the base map shader is used to turn off tessellation in the distance.
     
  15. Sisay

    Sisay

    Joined:
    Dec 6, 2012
    Posts:
    57
    ok, but this distance also turn off all materials except id1

    this is tesselation max distanse 45(when i save scene, microsplat automatic override base map distance terrain)
    https://imgur.com/a/Qx34dFL
    when tesselation is 500
    https://imgur.com/undefined
     
  16. Foulcloud

    Foulcloud

    Joined:
    Mar 23, 2014
    Posts:
    19
    I am trying to access from plain script in assets folder. Old Microsplat version cleared out and latest installed to Packages. This worked before: Terrain2D terrainEffectsTexture = terrainGO.GetComponent<MicroSplatTerrain>().streamTexture; Now getting error: Type or namespace name "MicroSplatTerrrain" could not be found. I am not able to add any usings like JBooth or MicroSplat. I can see Micrssplat and modules folders in Packages.
     
  17. jeanpaul84

    jeanpaul84

    Joined:
    Jan 23, 2017
    Posts:
    4
    I'm getting the same issue, and our scripts also don't use asmdef.

    EDIT - It's because "Auto Referenced" is false on the MicroSplat asmdef files.
     
    Last edited: May 25, 2021
    jbooth likes this.
  18. Foulcloud

    Foulcloud

    Joined:
    Mar 23, 2014
    Posts:
    19
    Same fix found here.
     
  19. hepphep

    hepphep

    Joined:
    Feb 1, 2013
    Posts:
    24
    Hi,

    I'm running into some issues when trying to use existing MicroSplat material for new scene in new terrain. This used to work for me in the past, but it go broken in some update (not sure in which, as there was a while that I didn't create new scenes but was instead working on the existing ones).

    In my case, I create a new scene and new terrain. Then I have my own component where I have setup microsplat in place with following code:


    Code (CSharp):
    1.  
    2. var microsplat = GetComponent<MicroSplatTerrain>();
    3. if (microsplat == null)
    4. {
    5.       _microsplatTerrain = gameObject.AddComponent<MicroSplatTerrain>();
    6.       _microsplatTerrain.templateMaterial = _globalTerrainConfiguration.MicroSplatTemplateMaterial;
    7.       _microsplatTerrain.Sync();
    8. }
    However, now that I use the same way, I run into IndexOutOfRangeException in MicroSplatTerrain.cs:207
    In practice it is in the code line
    Code (CSharp):
    1.  
    2. if (controls == null || controls[0] == null)
    3.  
    So, apparently there is something that changed on splat map texture generation that I just don't get that likely changed at some point.

    Any suggestions what I'm doing wrong here and should be changed for newer versions?

    Unity version: 2020.3.4 (HDRP)
    Microsplat version: 3.793

    Microsplat add-ons in project:
    Anti-tiling module 3.8.0 (installed but not currently used)
    Dynamic Snow 3.77
    HDRP 2019 support 3.611
    Runtime Procedural Texturing 3.7 (installed but not currently used)
    Terrain Blending 3.76
    Tesselation and Parallax 3.77
    Texture Clusters 3.7
    Wind and Glitter 3.74 (installed but not currently used)

    As a sidenote, while looking the things I also noticed that there is also HDRP 2020 available now and I started to wonder if it something I should move to now as well?
     
  20. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    192
    Hello sir. usually, I create a game world with 3D objects, not with terrain, but your tools look so interesting.

    - Can I use a custom shader such as "toon shade" or some kind of shader graph to paint on the terrain with your tool?
    - Do this shade work well with a mobile device? (using URP to create)

    Thank you.
     
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    First, you can't mix 3.8 and 3.7 modules. You'd need to be entirely on a 3.8 line or the 3.7 line, otherwise I don't think things will even compile.

    Unity creates the actual splat maps for a terrain, not MicroSplat, so I suspect what is happening is that when you create your terrain it doesn't have any splat maps, and then MicroSplat can't read the splat maps from it. Perhaps Unity changed when/where they create them in some way at some point.
     
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, it's not a painting system, it's a shader system.
     
  23. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    206
    Hello, I am having trouble with this issue as well:

    Assets\MicroSplat\Core\Scripts\MicroSplatObject.cs(41,14): error CS0246: The type or namespace name 'MicroSplatProceduralTextureConfig' could not be found (are you missing a using directive or an assembly reference?)

    These are my defines, can you please clarify which ones I can safely remove?
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    if you are downloading the 3.8 version you need to delete the version of MicroSplat in the assets folder; it’s installed into packages now.
     
  25. Victoralm

    Victoralm

    Joined:
    Dec 31, 2015
    Posts:
    30
    Hi all!
    Is there a step by step to use the packages with URP (Unity 2020.3.10), please!?
    For now, I just got my terrain all pink...

    PS:
    I have the Microsplat Terrain Collection asset. Do I need/have to buy the Microsplat URP !?
     
    Last edited: May 30, 2021
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yes, you need to have the URP adapter for the correct version of the URP to run in URP.
     
  27. drbatuira

    drbatuira

    Joined:
    May 4, 2020
    Posts:
    23
    Hi, I bought all the packages, now I decided to go to URP.
    Will there be a URP 2021 package or can I buy 2020 that will be valid for 2021?
    If you're going to have a 2021, would there be an estimated date?
    (I'm interested in traxx, the others, whatever)
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    SRP adapters ship shortly after LTS versions of Unity ship, as I only support LTS versions officially.
     
  29. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    Hi Jason,

    I upgraded a project to 2019.4.24f1 and have also upgrade microSplat to the latest version.
    All is working as before except that changing the per texture properties no longer has any effect.
    Changing any other property on the microSplat material does have an effect. It is just the per texture properties seem to have no effect. I have recompiler the shader and am getting no errors.
    Anything obvious that you can think of?

    Thanks!!!!
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This usually happens when something has been renamed in the MicroSplatData directory, since the material looks up the propData based on material name. Most likely you have two of them in your data directory, and the one assigned to the terrain is not the one the material finds.
     
    PiAnkh likes this.
  31. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    That's it. THANKS!!!!!!!!!!!
     
  32. EveFreeman

    EveFreeman

    Joined:
    Jul 15, 2013
    Posts:
    5
    Hi Jason,

    I bought MicroSplat, Procedural Texturing, Mesh Terrain Blending, Decals and Support for URP yesterday, and I started encountering many weird bugs when creating terrains (I am using unity version 2020.2.7f1 URP Render).
    Reading the answers here I realized its always related to new unity or URP versions braking everything.

    So instead of asking you for help fixing this particular problem, I want to go the other way around.
    1_ Should I be using URP or the build in system? (I know the differences but at this point I don't care, I only care for Microsplat stability)
    2_ What is the most stable unity version that works with MicroSplat based on you previous answer?

    Thanks again, your work on this is amazing.
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    2019,4LTS with Built in. That said, I believe unify has finally fixed all the bugs in 2020.3LTS with terrains, and URP should work fine there (though in general Built In is always going to be more stable than any SRP because if the fragile way SRPs are made).
     
  34. EveFreeman

    EveFreeman

    Joined:
    Jul 15, 2013
    Posts:
    5
    Excelent, 2019,4LTS hasn't given me a single error so far, I have also bought the triplanar package to improve the blending as you recommended in the tutorial video and it works fantastic, and all this is exactly what I wanted.

    With that said, I have found that a lot of files are being created in the MicroSplatData folder, and i'm starting to realize that the creation of multiple terrains and scenes is going to generate a huge volume MicroSplat Files, that I will need to sort through when trying to change anything in the future.

    I think I have read in some previous response that changing the name of those files was a big no-no.
    Is moving the files also a problem, can I move them as soon as they are created?
    What kind of File organization do you recommend when using MicroSplat?
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Depends - in most cases, people have one MicroSplatData directory for all of the terrains they have in the scene, then just let MicroSplat manage the files in there. However, if you need each terrain to have different materials/textures, then I recommend having a folder with the terrain data in it, with the MicroSplatData directory inside that. You can move the MicroSplatData directory to wherever you want, but renaming things inside of it can cause issues if you don't know what your doing.
     
  36. EveFreeman

    EveFreeman

    Joined:
    Jul 15, 2013
    Posts:
    5
    Perfect that did the trick.
    The MicrosplatData folder is created where you have your terrain data, fantastic.

    Thanks man, I really appreciate you taking the time to answer me.
     
  37. mm_hohu

    mm_hohu

    Joined:
    Jun 4, 2021
    Posts:
    41
    Hello,

    Could you enable UniversalFragmentBlinnPhong (_SIMPLELIT) and Unlit in Microsplat URP?
    SimleLit saves at least 2ms in my mid range mobile. That would be great.

    Thanks.
     
  38. fusion242

    fusion242

    Joined:
    May 16, 2014
    Posts:
    17
    Hi. Small thing I found while weight balancing splat maps using the MicroSplat Weight Limiter;
    In the file MicroSplatTerrainEditor_WeightLimiting.cs in the function WeightLimitTerrain [line 77 on my version] is the buffer allocation for reading the splat map layer values before sorting. It is hard coded to 16. I changed to:
    float[] data = new float[l];

    Using the l variable which is the number of alphamaps. I have 32 textures and it was crashing with index overflow.

    Thanks, Ben.
     
    jbooth likes this.
  39. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Unlit is already there (look in debug mode), Simple Lit will come in the next patch.
     
    mm_hohu likes this.
  40. 30035172

    30035172

    Joined:
    Jun 25, 2016
    Posts:
    17
    Hello! I am using URP module with Unity 2019.4.16f1 but I receive error when following the instructions (I think):



    I thought Microsplat will generate for me? Or is something else?
     
  41. 30035172

    30035172

    Joined:
    Jun 25, 2016
    Posts:
    17
    The shader recompiled to remove warning but Terrain is still pink =\

    upload_2021-6-8_15-33-8.png
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Switch the render pipeline on the material to UrP2019.
     
  43. 30035172

    30035172

    Joined:
    Jun 25, 2016
    Posts:
    17
    Hmm do I miss prerequisite maybe? I import both free and URP packages

    upload_2021-6-8_20-23-50.png

     
    Last edited: Jun 8, 2021
  44. 30035172

    30035172

    Joined:
    Jun 25, 2016
    Posts:
    17
    There is no URP2019. I import the assets and receive error (purchased 2)... How to resolve shader error?
     
  45. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    105
    Hi @jbooth ,just quick question:
    Seriously considering purchase of MicroSplat Mesh Workflow + URP Support (urgently need to paint more than four blending textures to a terrain-like mesh).
    Does the current version work for URP 11 (Uni 2021.1)?

    I am aware it would be unofficial, as your most current release claims to support URP 7...
     
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    there’s the 2020 adapter for URP10, I make no guarantees of comparability with other versions.
     
  47. 30035172

    30035172

    Joined:
    Jun 25, 2016
    Posts:
    17
    URP working
     
    Last edited: Jun 12, 2021
  48. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    In your screenshot you have URP version 7, which is the version for Unity 2019, but have the URP adapter for 2020 installed.
     
  49. 30035172

    30035172

    Joined:
    Jun 25, 2016
    Posts:
    17
    what is "urp adapter" and how to install it?

    documentation have even different:

    upload_2021-6-11_23-20-19.png
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    30035172 likes this.
Thread Status:
Not open for further replies.