Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

[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:
    4,818
    The package manager is broken - it will give you old versions of the asset and say you have the latest installed. So you need to clear the package manager cache before any download.

    Unity has chosen to hide this fact from users instead of letting them know, and push this all on asset dev's like myself to inform users of, and would rather frustrate it's users that be open about it's bugs.
     
    matiasges likes this.
  2. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    15
    Ok. I was about to edit my message to tell that I fixed it.
    I just imported the files again and then closed unity and opened it again. Then it showed me no compile errors or warnings.

    Thanks for your response!
     
  3. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    15
    I have one more question:
    I don't know if this has to do with microsplat or unity itself though.

    Sometimes when I save my project or load something, the texture of the terrain changes and it looks like this (only the texture changes for some reason):



    This is how it should look like:



    So I actually have to close Unity and open it again to fix it and go back to normal.
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    You're in 2020.3? This is a bug they introduced sometime late in the 2020.2 cycle, along with a compression error as well.

    It's here:
    https://issuetracker.unity3d.com/issues/all-the-textures-are-cleared-when-creating-texture-array

    They fixed the compression error in 2020.3.3 but not this bug- but I have a workaround which should be out in the next few days. (Hopefully that workaround doesn't break something else, but right now it's only running in 2020.3 and up).
     
    matiasges likes this.
  5. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    15
    Thanks, I'll check it out!

    I'm with the 2020.2.1. Didn't want to update it because of the fear that something could get broken...
     
  6. wolfy22

    wolfy22

    Joined:
    Jul 3, 2017
    Posts:
    3
    Actually its not ... Im getting this result on both linear and normal linear mode..
     
  7. IvanMelnikov

    IvanMelnikov

    Joined:
    Aug 10, 2018
    Posts:
    2
  8. rosor

    rosor

    Joined:
    Nov 15, 2009
    Posts:
    3,874
    Hello Jason,
    Quick question:
    I'm interested in your pack currently on sale: the micro splat terrain collection. However I'm a little lost here. Do I need to buy the micro splat base or is it included? and does this work in URP or do I need to purchase one of the SRP compatible one??? looking to use this in a 2020 URP project. Thanks for letting me know.
    Best,
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    The core module is included in the Terrain collection, and you'd need to buy the appropriate SRP adapter if you want to run in SRPs.
     
    rosor likes this.
  10. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    15
    So I finally upgraded my project to 2020.3.3 and got the latest microsplat update. The bug is not happening anymore - for now -

    However I get this warning:



    Any idea what this is? Or sort of the same thing as before?


    Edit: the bug happened today.
     
    Last edited: Apr 14, 2021
  11. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    593
    Quick question, and I don't care. and understand costs , so that is not my reason for this question. I have pretty much everything you ever made. So I see a new version HDRP 2020.. I have HDRP 2019. so I assume, this is for what is says 2020.3 +

    Just making sure so I don't buy this, if I don't want/need. I assume that was why we see another HDRP version ? I'm not on Discord anymore, so I don't keep up as much so sorry for the question i'm pretty much out of the loop now a days.

    Thanks Jason.
     
  12. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    34
    Hey Jbooth, just wanted to say thanks for all the hard work you put into these shaders and tools. I literally am able to make my project because of it. Its so essential it should be a default part of Unity. Keep it up man, you are keeping unity alive for me.
     
  13. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    Yeah, the SRPs change quite drastically over the year. The 2019 versions are for the 7.x HDRP/URP, while 2020 is for 10.x series. I limit myself to only officially supporting the LTS versions of Unity on SRPs to keep my sanity, otherwise chasing their changes would likely consume all of my development time, as they have a large team making constant changes to multiple pipelines with little regard for anyone having to reverse engineer it all (no documentation, etc).
     
    Recon03 likes this.
  14. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    86
    Hey JBooth

    Quick question on the snow module ahead of potential purchase

    Does it add per texture snow controls? Ie it would be possible to carve paths through a snowy terrain ?

    or is the snow a global coverage which covers all textures ?

    i would like to make paths in the snow which use a non-snowy texture..

    thanks for clarifying
     
  15. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    593

    Nope I understand, we where working with HDRP a bit during development and we put it on hold, since it was a nightmare. but I still tend to test it and play around, hoping to use one day. ( if I ever go back to that game that was made in Unity.

    No worries from me, Jason I completely can relate and understand you won't get me bitching about you charging... me lunch money for this. ( as I said to you many times, this should cost way more. in my opinion, Unity users get off easy. SO I don't mind at all, paying, supporting you at all.

    I just wanted to make sure I wasn't buying twice for some reason, or something I didn't need.

    ( I don't buy many asset these days. besides a few of you guys, that I support and like.

    Ya Unity don't make games, so they don't care, or have a clue, on what we really want, or need. Nor do they listen to those that do, so I tend to stay away from Unity these days, since I retired..... I had enough of there nonsense.. I mainly use Unity to teach the kids, these days...

    going to let the kids play around with Micro splats and some terrains. ! I bought Trax and HDRP 2020 for them to have some fun then.

    I only use LTS versions, and mention to many asset devs that I wouldn't be supporting any other versions, that is to crazy......

    Thanks Jason for your work.
     
    Last edited: Apr 14, 2021
  16. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    406
    @jbooth I was looking at the Decal system well, the whole bundle actually, and noticed you mentioned any MicroSplat object can be a decal receiver. Can other gameobjects be MicroSplat objects? Walls, cars, etc. Not too sure how the system works.
     
  17. kopanz

    kopanz

    Joined:
    Dec 6, 2016
    Posts:
    13
    I recently bought Microsplat Ultimate Bundle. I'm trying to have a brief overview of the system by trying it in an empty project. I downloaded and imported all modules and core module from the package manager. First errors arised from Mesh Terrains module as such.

    Assets\MicroSplat\MeshTerrain\Script\MicroSplatMeshTerrain.cs(50,20): error CS0246: The type or namespace name 'TerrainDescriptor' could not be found (are you missing a using directive or an assembly reference?)
    Assets\MicroSplat\MeshTerrain\Script\MicroSplatMeshTerrain.cs(50,38): error CS0115: 'MicroSplatMeshTerrain.GetTerrainDescriptor()': no suitable method found to override
    Assets\MicroSplat\MeshTerrain\Script\MicroSplatMeshTerrain.cs(32,11): error CS0246: The type or namespace name 'TerrainDescriptor' could not be found (are you missing a using directive or an assembly reference?)

    I removed Mesh Terrains module and wanted to use rest of the system but i got a huge list errors you can see in the attached image. I didn't continue to remove more modules. Just waiting for a solution.
    I'm using Unity 2020.1.17f1.

    Additional note: I'm getting a lot of errors from missing GetTerrainDescriptor function in MicroSplatObject
     

    Attached Files:

    Last edited: Apr 14, 2021
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    I think you had some part of MicroSplat previously installed. The package manager is completely broken in most versions of Unity, and if you don't delete it's cache folder, it will give you the old version of an asset and say you have latest. Unity is being very quiet about this, and basically it's creating havoc on asset store developers and giving users a terrible experience.
     
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    Using the mesh workflows you can texture lots of things with MicroSplat, and decals can work on those objects. However, if your looking for a more general decal solution that can run on everything, and you can afford deferred rendering, then a deferred based approach might make more sense for general object usage. The big advantage of MicroSplat decals is that they don't require any specific rendering mode, work across SRPs, and can do things like effect which textures are chosen by the shader, or effect things like wetness, etc. But since they run in the shader instead of being projected into the GBuffer, they have specific shader requirements and unique tradeoff's between static and dynamic decals.
     
    jnbbender likes this.
  20. kopanz

    kopanz

    Joined:
    Dec 6, 2016
    Posts:
    13
    Looks like i got and downloaded Microsplat Core Module which is freely available last year. I removed it from Asset Store cache and all errors are gone after downloading Microsplat again. Thank you :)
     
  21. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    124
    Jason,
    I have upgraded a project to Unity 2020.3.2f1 (HDRP 10.4.0) hand one of the MicroSplat shaders is throwing a strange error "Shader error in 'Hidden/MicroSplat/MicroSplat_HD_Base-193729650': invalid subscript 'positionCS' at line 17550 (on d3d11)"
    This results in the terrain becoming transparent

    I have updated MicroSplat to the latest versions, emptying the assets cache first and downloading the latest version of the asset. I have tried everything, including deleting all MicroSplat files in the project and reinstalling but it makes no difference.
    However if I install MicroSplat the same shader does not give an error. Have you any idea what might be causing this error?
    I don't want to start with a new project as it will take a couple of days to recreate the project so any suggestions for solving this error are appreciated

    upload_2021-4-14_18-29-22.png
     
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    What do you mean by if you install MicroSplat the same shader does not give an error? MicroSplat would need to be installed for, well, MicroSplat to work, right?

    I take it you've tried toggling an option on the shader to get it to regenerate? Can you show me the section of code throwing the errors (Line numbers are not consistent). It may be that there is some issue that requires certain lighting or rendering settings to be thrown, which can be unique to the scene or project..
     
  23. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    Yes, there's a per texture exclusion for snow.
     
  24. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    86
    If you could indicate whilst the bundle is on offer it may well bag another sale ;)
     
  25. FrozenEmpire

    FrozenEmpire

    Joined:
    Sep 10, 2016
    Posts:
    86
    Damn i was slightly too quick! Thanks for the right answer i hoped for :)
     
  26. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    124
    Sorry, part of my message got lost. I meant to write if I install MicroSplat in a fresh project (and load the demo project) that same shader does not show an error. Yes, I have regenerated the shader and also tried copying the shader from the fresh project where it did not show an error to the old project.
    So something in the old project configuration is the problem

    The code it is pointing to is the line beginning with depthColor

    #ifdef WRITE_NORMAL_BUFFER
    EncodeIntoNormalBuffer(ConvertSurfaceDataToNormalData(surfaceData), posInput.positionSS, outNormalBuffer);
    #ifdef WRITE_MSAA_DEPTH
    // In case we are rendering in MSAA, reading the an MSAA depth buffer is way too expensive. To avoid that, we export the depth to a color buffer
    depthColor = packedInput.vmesh.positionCS.z;
    #endif
     
  27. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    Ok, fixed. If you want to fix it locally, search for vmesh.positionCS in the fragment files in the HDRP module and change it to vmesh.pos instead.. (Then change an option to regenerate the shader)
     
  28. duminju1990

    duminju1990

    Joined:
    Jul 26, 2019
    Posts:
    30
    Can I know how to know which Microsplat version I'm using in a project without looking at the package manager? I have some backups on a project before updating to newest version but now I'm confused..
     
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    You certainly can't tell from the package manager- it's broken in most versions of Unity, and will tell you that you have the latest version, but keep installing an older version from it's cache, so you have to delete it's cache folder whenever you upgrade. Unity doesn't tell you this because they'd rather piss off every user and publisher that admit they have an issue, I guess.

    From looking at the UI, only major versions of MicroSplat are notated (3.6, 3.7), as this is used for version locking- minor versions (3.61, etc) are not notated via the code in any way.
     
  30. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,321
    anyone knows what´s the performance of this on Mobile?
     
    fox40phil likes this.
  31. zabos13

    zabos13

    Joined:
    Jan 28, 2017
    Posts:
    5
    is there support for Unity 2020.3.4f1? i im getting pink terrain
     
  32. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    Pink terrain means you either have a shader error, which would appear in the console, or you are in an SRP and haven't set the render pipeline correctly on the material as described in the docs.
     
  33. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    593

    pretty vague question.......

    MS performs fine for mobile....if set up properly optimized scene.
     
  34. cpmullen

    cpmullen

    Joined:
    Apr 4, 2020
    Posts:
    13
    I have a problem. When I import MicroSplat into my Unity project, I get the following error:

    Script updater for Library\Bee\artifacts\1900b0aE.dag\Assembly-CSharp-Editor.dll failed with exitcode -532462766 and stdout: Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
    ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\user_\Microsplat test\Unity[^\]+(\.ref)?\.dll$'.
    at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
    at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
    at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
    at System.IO.StreamReader..ctor(String path)
    at ScriptUpdater.Program.<>c__DisplayClass8_0.<Main>b__0()
    at ScriptUpdater.Program.Profile[T](Func`1 toProfile, Int64& elapsedTime)
    at ScriptUpdater.Program.Main(String[] args)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
    at Program.Main(String[] args)

    Even if I re-import the package, the error still persists.
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    Looks like the script updater is crashing? What version of Unity is this?
     
  36. Loewi_f

    Loewi_f

    Joined:
    Nov 13, 2019
    Posts:
    30
    The previous issuabout HDRP 2020 support seems to be my mistake. v3.79 works fine for Unity 2020.3.2f,HDRP 10.4.
    But now I have a new problem about HDRP Decal Layer.In my project,RenderingLayerMask has to be set as custom decal layer ,not Decal Layer Default.
    upload_2021-4-18_17-35-49.png
    After I set RenderingLayerMask of Terrain component (using Microsplat HDRP material ) as above, it fails to work .
    upload_2021-4-18_17-42-0.png
    But all other mesh rednerers, with HDRP/Lit material Recive Decals toggle on , can work perfectly.
    upload_2021-4-18_17-40-24.png
    upload_2021-4-18_17-36-50.png
    I think it seems to depend on Recive Decals toggle ? But there is no this toggle for MicroSplat.Core-HD . What should I do ?
     

    Attached Files:

  37. Pluefey

    Pluefey

    Joined:
    Nov 24, 2020
    Posts:
    2
    Hello, I'm having a few problems after importing microsplat into a new project...
    it throws me a couple of errors (image attached)

    Unity Version is 2020.3.4f1
    and I have a project with the URP in it
    (and imported both microsplat (v3.793) and urp2020 (v3.771))
    after selecting both of my 1k terrains and adding the component,
    i hit convert and it throws me those errors and does only change the component on one terrain.
    It also doesn't let me sync the second to the same material and keeps giving me an error.

    I wonder if that's a problem with versions being incompatible?
    Or if I'm just doing something wrong.

    Thank you in advance.
     

    Attached Files:

  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    Looks like your terrain has no splat maps?
     
  39. Pluefey

    Pluefey

    Joined:
    Nov 24, 2020
    Posts:
    2
    Oh! I thought I'd not need textures before the conversion and could add them afterwards, my bad. Thanks!

    I could do the conversion now and most of the errors are gone now, but one stayed,
    i attached another image of it.
     

    Attached Files:

  40. Lorrak

    Lorrak

    Joined:
    Sep 17, 2019
    Posts:
    13
    Hi, Better Lit shader with Trax is probably too heavy on mobiles?(like samsung s7)
     
  41. fox40phil

    fox40phil

    Joined:
    Mar 25, 2021
    Posts:
    2
    Hi guys,
    can I use Microsplat for terrains made by tools like maybe TerraWorld?

    Is it possible and easy to integrate it for maybe a offroad racing game with mud etc?
     
  42. cpmullen

    cpmullen

    Joined:
    Apr 4, 2020
    Posts:
    13
    2021.1.0f1. I`m somewhat new to Unity so I`m not sure what to do.
     
  43. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    Yes and yes..

    For one, get off the experimental tech release branches, which break more often that the LTS versions (which often have their own issues, but are at least supposed to be more stable). You can try rerunning the API updated from the Assets menu..
     
  44. Loewi_f

    Loewi_f

    Joined:
    Nov 13, 2019
    Posts:
    30
    Hello ,@jbooth.
    Do you have any idea about HDRP decal layer setting ?
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,818
    No, I haven't had a chance to look at this yet- the shader does expect to support decals by default, so it's most likely something in the HDRP2020 template code, not simply exposing the toggle to turn it off.
     
  46. PiAnkh

    PiAnkh

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

    I think I have found a bug in MS related to importing splatmaps, I am using the latest version of MS in Unity 2019.4 LTS

    I was importing the splatmaps from a previous project into a fresh project and saw that the splatsmaps were different to the previous project. It looks like the splatmaps are being mirrored on the x-axis on import.
    As a work around, I re-exported the splatmaps from the new project and reimported them again which mirrored them a second time, fixing the problem.
     
  47. cpmullen

    cpmullen

    Joined:
    Apr 4, 2020
    Posts:
    13
    Thank you, but I`m not using the beta thogh. Maybe there isn't support for 2021 or have you already done that?

    UPDATE: I installed the 2020 LTS and it ran the auto API update. I don't know why it wouldn't work on 2021 but whatever.
     
    Last edited: Apr 20, 2021
  48. niallmc

    niallmc

    Joined:
    Sep 3, 2015
    Posts:
    38
    Hey @jbooth,

    As always, thank you for supporting Microsplat, such a great asset.

    Recently we've moved to HDRP and all is working. however when we pull/rebase unity immedietly crashes, and the editor.log seems to point to a terrain material issue as the last point before the crash.

    Have you ever seen this before?



    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) UnityEngine.Terrain.set_materialTemplate (UnityEngine.Terrain,UnityEngine.Material) [0x00014] in <b63c08e7d0fc4da6927a9bb41a23d803>:0
    at MicroSplatTerrain.Cleanup () [0x00034] in C:\Users\Test\Documents\Test\Assets\AssetStoreContent\MicroSplat\Core\Scripts\MicroSplatTerrain.cs:120
    at MicroSplatTerrain.OnDisable () [0x0000d] in C:\Users\Test\Documents\Test\Assets\AssetStoreContent\MicroSplat\Core\Scripts\MicroSplatTerrain.cs:91
    at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x00020] in <eae584ce26bc40229c1b1aa476bfa589>:0


    =================================================================
    Got a SIGSEGV while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================
    Crash!!!
     
  49. adavis1

    adavis1

    Joined:
    Jun 27, 2018
    Posts:
    9
    Hey Jason, I'm having trouble with microsplat/digger throwing errors. I've submitted my invoice number to the discord bot and I've no idea if it's been accepted/there's a waiting period/the number wasn't right because there's no feedback or information on how long it takes to get verified. Kind of frustrating...
     
    PrivateFox45 likes this.
  50. adavis1

    adavis1

    Joined:
    Jun 27, 2018
    Posts:
    9
    When I try to change any of the microsplat properties (I'm trying to set lowpoly) digger, I get this error, even when using a fresh scene that doesn't have digger applied to the terrain yet. This stops the terrain rendering at all, and then starts throwing a million of the same editor errors so that none of the immediate code of the editor window works any more (inspector does not refresh when you click on other game objects, etc) Restarting unity clears that, but as soon as I change microsplat settings the same thing happens again.

    Digger.MicroSplatSync:OnEnable () (at Assets/Digger/Sources/Digger/MicroSplatSync.cs:24)
    Digger.DiggerSystemEditor:SetupMicroSplatMaterialSyncEventHandler (Digger.DiggerSystem) (at Assets/Digger/Sources/Digger/Editor/DiggerSystemEditor.cs:639)
    Digger.DiggerSystemEditor:SetupMicroSplatMaterials (Digger.DiggerSystem) (at Assets/Digger/Sources/Digger/Editor/DiggerSystemEditor.cs:573)
    Digger.DiggerSystemEditor:SetupMaterial (Digger.DiggerSystem,bool) (at Assets/Digger/Sources/Digger/Editor/DiggerSystemEditor.cs:97)
    Digger.DiggerSystemEditor:Init (Digger.DiggerSystem,bool) (at Assets/Digger/Sources/Digger/Editor/DiggerSystemEditor.cs:77)
    Digger.DiggerMasterEditor:DoReload () (at Assets/Digger/Sources/Digger/Editor/DiggerMasterEditor.cs:760)
    Digger.DiggerMasterEditor:OnInspectorGUIClearButtons () (at Assets/Digger/Sources/Digger/Editor/DiggerMasterEditor.cs:708)
    Digger.DiggerMasterEditor:OnInspectorGUIEditTab () (at Assets/Digger/Sources/Digger/Editor/DiggerMasterEditor.cs:684)
    Digger.DiggerMasterEditor:OnInspectorGUI () (at Assets/Digger/Sources/Digger/Editor/DiggerMasterEditor.cs:302)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
unityunity