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

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    136
    do you guys have a getting started video's ?

    I got micro splat , URP and digger all set up but it looks like I have some packages that are not open and will not open
    hell some files will not import from package manager

    any tips to get started will be nice
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Read the included documentation or see the videos linked from the assets.
     
  3. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    136
    "videos linked from the assets" I was actually looking for in-depth videos'

    are you referring to the ones on the asset store ?
    if so I got to find out how to make it play
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Press the play button..
     
  5. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    96
    @jbooth hey, have a question about Better Shaders. What is the best way to reproduce ShaderGraph's Transform node, I particularly interested in this two variations:

    Object -> View
    float3 _Transform_Out = TransformWorldToView(TransformObjectToWorld(In));
    View -> Object
    float3 _Transform_Out = TransformWorldToObject(mul(UNITY_MATRIX_I_V, float4(In, 1) ).xyz);
     
  6. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    136
    things that blocks play back such as browser settings
    you can and will lose customs assuming we are to stupid to "press play"


    (edit)
    to be clear, I needed to clear my cookies apparently.
    looking that the first video this may have more features than I need for this project lol
    Time to explore.


    but yeah, I am aware you probably deal with stupid people a lot but you should never assume
    [mod edit: language]
     
    Last edited by a moderator: Feb 10, 2022
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    What's wrong with the code you just wrote?
     
  8. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    96
    (facepalm) it was a long day, sorry))
     
  9. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Sorry to ask here, but not sure where else to ask.
    1) Jbooth your Stochastic Amplify node was last updated in March 2021, does it work with the latest version of Amplify and Unity 2021.2.10f1, HDRP 12.1?

    2) The various Microsplat bundles/packages, do those only work on terrain or could I apply those to regular imported fbx meshes also?
     
  10. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    As far as I know, yes- they don't have anything to do with render pipeline compatibility though, that's all up to amplify.

    2) The various Microsplat bundles/packages, do those only work on terrain or could I apply those to regular imported fbx meshes also?[/QUOTE]

    There's a mesh workflow module that adds mesh support, using backing textures or vertex painting.
     
    newguy123 likes this.
  11. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Can i get same Result with Microsplat?


    why when import Frozen Land Demo so much Materials are Pink and Shader not work.

    Also how can Switch from CTS to Microsplat because CTS not Supported anymore and Microspklat has Snow Trails and Tracks with deep snow etc.

    With CTS

    Is there a way with Mcirosplat look same?

    CTS with Vegetation Studio Pro Biome Splat


    2nd 2 Screenshot with Mictosplat 1 after Convert 2nd with Some Tweaks






    Or cant get Microsplat that result?


    The CTS Result is automatic with Vegetation Studio Pro


    Thank you so much
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You likely just need to tweak the parameters for snow (erosion, for instance), height map strength (per texture properties), etc.. different shaders, different parameter ranges, etc.
     
  13. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    To clarify, all the various bundles and assets you have, for terrain, mesh etc, can and will work together seemlessly with HDRP, providing I also get your HDRP enabling module? That module enables HDRP for all your other assets?

    So then theoretically, if I want to prevent tiling on my meshes, I don't need Amplify with your Stochastic node, your mesh workflow module together with microsplat, microsplat antitiling, HDRP microsplat, will give me same result?
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I mean they are fundamentally different tools- amplify is a shader editor, so adding stochastic texturing to it lets you easily stochastic texture any texture sample in a custom shader of your design. Where as MicroSplat is not a shader editor, but rather a system which generates custom shaders with a lot of built in features you can toggle on/off. Stochastic texturing is actually in the Texture Clusters module, not anti-tiling though. And yes, HDRP support allows you to use all the modules in HDRP, etc..
     
  15. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Thank you

    Will try

    Tried already over 6 hours but cant get same out of it commes near but much things that cant look same.

    Will try if can get it similar or look also good with Microsplat

    but when then use it at other terrain with same texturwe the UV are set 256 but look very big and bad

    You also can answer my old questions? thanks
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    UV's are set per material, either globally or per texture, and can be in uv, world or triplanar space. Please read the faq/docs, as I suspect it will answer some of your questions.
     
  17. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    The above questions need some answers thank you cant find in DOcs.


    It no sended my question yesterday hmm so here again i mean the above ones thank you
    not remember my answer i sended but here:


    thanks will try but cant get after much hours not near the CTS result with Microsplat.

    Also how i can fix that Blend Object not get the Texture set with Procedural Texturing with Micro splat at slopes?

    Because the Blend object have no checkbox or so to not use the texture of Procedural settings at slopes







    Also when set Object Snow at Blend Object the look different then the snow at Terrain

    see here the Object Top and Terrain bottom also change Snow Width at Object changes nothing




    and how can fix that like in CTS here with Microsplat also with settings from Docs for fixing this looks like this:

    thank you



    and why Duplicate a Microsplat Material not work or how can copy settings to a clone / same material but then want change some settings for other terrain without neeed all redo by hand every 100 settings?
     
    Last edited: Feb 15, 2022
  18. breno4551

    breno4551

    Joined:
    Jan 11, 2022
    Posts:
    3
    Similar issue here with no results when trying to paint Streams, but there are no warning on any of the properties

    Using Unity 2020.3.21f1
    Renderloop is set to URP 2020
    Streams are enabled in the material
    Nothing happens when painting (Flow = 128, Target value = 1)
    Terrain_stream_data.tga is created - all channels remain black/empty including the alpha
    When pressing Fill, something happens for around 15sec but no change

    Also of possible note, painting Tint doesn't affect the tint texture either, it just stays middle grey

    What could be set incorrectly?
    Any help much appreciated

    upload_2022-2-17_13-33-48.png
     
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You'd have to hit save to see the result on the texture files (those are files on disk, not what is in memory), so I'd fill then hit save and see if it's updating the textures.
     
  20. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    1) Does this Asset, together with the HDRP module, bypass Unity, 8 splatmap limit in HDRP somehow, or with HDRP that limit is still valid?

    I want to use Microsplat, buy HDRP module, Global Texure Module, Anti Tiling Module, Tesselate Module, and have them work together in HDRP 12.x.

    2) Is the Texture Cluster Module, the same as the Anti Tiling and Tesselate Module put together?


    Just want to understand things a bit better to calm my expectations...
     
  21. breno4551

    breno4551

    Joined:
    Jan 11, 2022
    Posts:
    3
    SOLVED An import script was setting an override on textures in the folder, though the final texture format override was the same there must have been some in between stage. Disabling the overrides fixed it. Thank you :)

    The rest is probably TLDR but will leave it here in case someone else has the same problem

    --
    I notice the log getting spammed with this when Painting the Terrain


    When Painting Tint
    Unsupported GraphicsFormat(10) for SetPixel operations.
    UnityEngine.Texture2D:SetPixel (int,int,UnityEngine.Color)
    JBooth.MicroSplat.TerrainPainterWindow:PaintTerrain (JBooth.MicroSplat.TerrainPaintJob,UnityEngine.Vector3,UnityEngine.Vector2) (at Packages/com.jbooth.microsplat.core/Scripts/Editor/TerrainPainter/TerrainPainter_Painting.cs:305)
    JBooth.MicroSplat.TerrainPainterWindow:OnSceneGUI (UnityEditor.SceneView) (at Packages/com.jbooth.microsplat.core/Scripts/Editor/TerrainPainter/TerrainPainter_Painting.cs:193)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)



    When Painting Streams
    Unsupported GraphicsFormat(12) for SetPixel operations.
    UnityEngine.Texture2D:SetPixel (int,int,UnityEngine.Color)
    JBooth.MicroSplat.TerrainPainterWindow:PaintTerrain (JBooth.MicroSplat.TerrainPaintJob,UnityEngine.Vector3,UnityEngine.Vector2) (at Packages/com.jbooth.microsplat.core/Scripts/Editor/TerrainPainter/TerrainPainter_Painting.cs:342)
    JBooth.MicroSplat.TerrainPainterWindow:OnSceneGUI (UnityEditor.SceneView) (at Packages/com.jbooth.microsplat.core/Scripts/Editor/TerrainPainter/TerrainPainter_Painting.cs:193)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


    enum 12 is R8G8B8A8_SNorm but i think this should be RGBA32
    maybe we have some import settings messing with the creation?
    ---
    Sorry, I should have clarified - For all the Streams types, Fill then Save saves a black texture, painting then pressing Save is also a black texture. The time stamp on Terrain_stream_data is updated, so the texture is being saved, just no data is being added. I take it Fill should be white, not black?

    The scene with the terrain in it is writable, as is everything in the associated Microsplat folder

    For Tint, Fill then Save doesn't seem to save. Press Fill, "Hold on" then Save, the timestamp on Terrain_tint is still the time it was created
     
    Last edited: Feb 18, 2022
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    1. MicroSplat supports 32 textures on all SRPs
    2. No, the texture clusters module contains a bunch of high end techniques I developed to kill tiling patterns, while Anti-Tile are more traditional/low end techniques. All docs are available online so you can see what each contains.
     
  23. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Did you change the format of the textures? They are created as RGBA32 by the code.
     
  24. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Errrr, low end techniques, high end techniques?!? That doesnt tell me anything. I just want to get the job done with the one giving me most realistic results with less hassle in HDRP. Which one would that be? The low end techniques or high end techniques?
    I dont care about performance, only most realistic result for Offline Recorder Rendering
     
  25. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The best way to understand the techniques of any package is to read the docs, which are available online and in the core package, or just watch the videos which are included in the asset description where I explain it all. I'm not going to recreate all that content verbatim every time someone asks.
     
  26. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Exactly where online can I read the docs?
    Asset store description does not have docs, except for the free core module. Your website does not have docs. I cant get into your Discord without a invoice.

    You're not very helpful with information so far. How am I suppose to know which modules I want vs what I need, if I dont understand what each module is for?
     
    Last edited: Feb 19, 2022
  27. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    ...for now I've purchased the HDRP 2021 module together with the Global Texturing Module and also the Amplify Stochastic Height Sampling node

    I'll try and figure out the difference/use for:
    Anti Tiling
    Tessellation & Parallax
    Texture Clusters (this one to me, looks like the other 2 above combined)
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You can download the free core module, which has documentation for every module included. You can read the asset descriptions, you can watch the videos included on the asset listing of every module where I literally walk through every feature of every module one by one showing you what they do and how to use them. You're not exactly trying very hard here, as I've already provided ample information and instead of using it you want to take up other people's time to do your homework. Do you contact Unity support and ask them to write you a description of what every component does personally? Or do you look in the information they've already provided? Why do you expect you expect more from solo developers than you do from Unity, which has thousands of employees?
     
    Recon03 likes this.
  29. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845


    I GOOGLED this just now.

    https://assetstore.unity.com/packages/tools/terrain/microsplat-tessellation-and-parallax-96484

    Tess





    https://www.youtube.com/watch?
    Para

    The differences between them,


    This is Unreal, but it don't matter, its the same thing.... in any game engine. as far as Tess , and Para.


    Most of it was found right on the asset itself.

    HDRP, is just that HDRP...... support... Unity has millions of information what HDRP is.


    Anti-Tiling is what it says......

    Clusters, also is what is the name is....



    Go to Jason's You tube, videos which are all over, the place. and on the asset them selves... ( and if you need even more info, which you shouldn't, google about each technique/process, like Texture clusters, anti tiling, Tess , para.

    Remember google is your friend and Jason is fantastic about spelling out in his videos for what each module does........





    PS, alot of you would be in trouble if you started in the old days like Jason, myself and a few others did....We had no tutorials....... we had little to nothing..

    So, a little effort goes a far ways.
     
    Willbkool_FPCS likes this.
  30. breno4551

    breno4551

    Joined:
    Jan 11, 2022
    Posts:
    3
    They start as RGBA32 and end as RGBA32 but somewhere in between (like when anyone would start to paint) a script running on the folder was setting the texture override to R8G8B8A8_SNorm before SetPixel was called. Of course R8G8B8A8_SNorm is not a format that can be used with SetPixel and it is not even a format specified in any of our import scripts. Havent fully debugged this but looking at the final format of the texture (RGBA32), the error in the log and disabling overrides fixed it, it's my best guess
     
  31. EM_Grossman_SF

    EM_Grossman_SF

    Joined:
    Jan 19, 2022
    Posts:
    2
    Hey all, I'm having an odd issue and am not totally sure the best route to solve it.

    I joined a project using Unity 2021.1.1f1, which is at HDRP version 11.0.0, and was using Microsplat 3.8.

    I wanted to make some changes to the Microsplat material, but any time I made a change, the material would fail to compile.


    I noticed we didn't have the HDRP module installed, so I installed it and updated Microsplat to 3.9 while I was at it. Everything seems to be in order now, but when I try to make a change to the material, the compilation failure still occurs and I get these errors:

    upload_2022-2-22_12-30-56.png

    Changes I've tried are to change the texture blend mode, and a few per-texture settings like albedo. The error seems to occur only when a keyword changes, as adjusting properties like the Interpolation Contrast seems to be OK.

    I'm not really familiar with HLSL so I'm wary of troubleshooting this on my own. I couldn't find any specifics in the docs for issues like this, so I come to you for aid! Let me know if more info is necessary.
     
  32. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    MicroSplat does not support HDRP11, you'd need to use a newer or older unity version with the appropriate HDRP adapter for that version.
     
    EM_Grossman_SF likes this.
  33. EM_Grossman_SF

    EM_Grossman_SF

    Joined:
    Jan 19, 2022
    Posts:
    2
    Thank you for the clarification. Where is the best place to find supported versions of HDRP/Unity for Microsplat?
     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    On the asset listings for the various adapters..
     
  35. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Can Microsplat and Snow, Tessalation and Trax work at UWP Xbox?
     
  36. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Also can you help thank you @jbooth
     
  37. lenarskiy

    lenarskiy

    Joined:
    Sep 24, 2013
    Posts:
    179
    Hi, is there possibility to paint trax in edit mode? I want premade trax on the regular and snow grounds.
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's no tools for this, no..
     
    lenarskiy likes this.
  39. lenarskiy

    lenarskiy

    Joined:
    Sep 24, 2013
    Posts:
    179
    I'm trying to make 4 seasons. With current version it's very easy to make summer and winter seasons, but not the rest ones. Can you please give an advise on how to achieve seasons changing? I mean at least replace a set of textures to another set. I can see in Texture Array config there is an option Cluster Mode, this mode potentially can be used not only for clustering but for seasons or some other cases. Or, if you already have a solution or advice please help.
     
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I mean it depends on what you want to do. If you want to swap textures, you could build different arrays and set them on the material, but for more subtle stuff you could adjust things like the per-texture properties for tint and such.
     
    lenarskiy likes this.
  41. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    Hi,

    Using MicroSplat here with all modules, and it's brilliant.

    I have run into a couple of problems though... Both are related to Floating Origin.

    With Terrain Blending objects, it looks like the blendable objects aren't sampling the correct location on the terrain as the origin shifts:



    I tried changing the mapping mode to Worldspace UVs, and I'm updating the _GlobalOriginMTX matrix on origin shifts, but that doesn't seem to help:



    -----------------


    The second problem is not as immediately visible, but just as noticeable, with Static Decals, there is a noticeable moment of lag during origin shifts, because the decals think they are being moved (transform.hasChanged goes true). However, they will end up exactly in the same location relative to the terrain, so I was hoping there could be a way to prevent them from doing any updating during these shifts.

    I tried bypassing the static decal update call, but that does seem to be important to keep the decals in place.

    Is there anything I can do to make decals not lag on origin shifts? I'd rather not need to switch to dynamic decals just because of that. I'm not sure if my decals are baking properly either, hopefully that could help?


    Anyhow, thanks in advance for any help!

    Cheers
     
  42. lenarskiy

    lenarskiy

    Joined:
    Sep 24, 2013
    Posts:
    179
    Thanks for the quick response! Could you please guide me how to assign different texture arrays (MicroSplatConfig1...3) to the material via a script to work at runtime?
     
  43. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    with Material.SetTexture, like any other texture. In most cases, you want to do this with the template material and then call MicroSplatObject.SyncAll() to update the instanced materials.

    I'd bet the blended materials aren't getting the matrix set on them. You could enforce this by calling SyncAll, but that seems like overkill. Likely the right solution is to make the matrix into a global shader property instead of a local one, such that it can be updated once and every MicroSplat shader automatically uses the new value- I don't see a great reason why you'd want them different on different things.

    As for the decals, I'd suggest adding some static bool that early outs of OnTransformChanged, then set that before you shift things. The main overhead on static decals is that it will rerender the cache map if the transform changes, which can be very expensive at runtime.
     
    HarvesteR and lenarskiy like this.
  44. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    The matrix is already a global shader property, fortunately... it looks like maybe not all the shaders are using it then? I can have a look at the blended mat shader and try to add it in if that's all there is to it.


    I actually did that, I added a flag to skip the re-caching on transform changed, but that then caused the decals to not line up with the terrain anymore. I suspect it's a similar thing to the blended objects then, where it is probably mapping using worldspace coords instead of terrain coords.

    If that's the case, then I believe the fix could be the same for both things. That'd be nice and neat actually. Will have a look here.

    Thanks!

    Cheers
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This thread is now effectively closed. Support for my products will no longer be provided through Unity's forums, Discord only.

    Discord Group
     
    Last edited: Feb 28, 2022
  46. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    So, an update here.

    I've been able to fix the decal lag. Must have been something wrong on my initial attempt, but adding a flag to skip recaching for the static decals did work, and there is no more lag from decals on origin shifts (huzzah!).

    Next up are the blendable objects. As you said, hitting Sync/Sync All after a shift does seem to correct them, so now I need to look into what the minimum amount of updating is to do on origin shifts... or maybe use the global matrix offset somewhere. Will dig around and report my findings.

    Thanks already for the help!
     
  47. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    841
    WOW! What is going on?
    Are you quitting Unity?
    Where do we go for support?
    Are you depreciating your assets?
    Are your assets being removed from the store?
    Could you give some more information on this?

    Sorry for all the questions, but I read the forums everyday to gain insight and I know many people drop support and leave Unity to do other things, but there is usually some more info than a brief no support. If you are giving it up, we all appreciate your hard work and will miss your amazing assets. Best of luck to you in whatever you do next.
     
    kopanz likes this.
  48. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    Following up, I was able to fix the blendable objects as well!

    Had to add a script to my scene where I call the Sync() method on all blendable objects, and also update a couple of things in the terrains:

    Code (CSharp):
    1.  
    2.     public void SyncBlendableTgt(MicroSplatObject msObject)
    3.     {
    4.         Vector4 bnds = new Vector4();
    5.         Vector3 size = msObject.GetBounds().size;
    6.         bnds.z = size.x;
    7.         bnds.w = size.z;
    8.         bnds.x = msObject.transform.position.x;
    9.         bnds.y = msObject.transform.position.z;
    10.         msObject.blendMatInstance.SetVector("_TerrainBounds", bnds);
    11.     }
    AFAICT, this is the bare minimum that needs to be updated when the origin shifts. Might be possible to strip a few more lines out of this, but doesn't looks like there are any expensive operations happening in there, so it's good enough for our needs here.

    For context, the method above is being called from a script I added which gathers all blendable objects and MS terrains in the scene, and subscribes to the floating origin events to update them after a shift.

    Thanks again for the help! Looks like all our microsplat issues with floating origin are sorted out now! :)

    Cheers
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, nothing like that- Unity's environment is just toxic and they don't weed the garden, on discord I can do that myself.
     
    dsilverthorn likes this.
  50. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    841
    Ha!

    good news then. I’ll get you logged into my discord. Glad you’re not going away. :)
     
Thread Status:
Not open for further replies.