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
    I know nothing of SECTR so am not sure what you're talking about. That said, the requirements on the MS side are that the mesh terrain component be there with all of its data and Sync gets called on it once that's true.
     
  2. ibernd

    ibernd

    Joined:
    Jun 24, 2019
    Posts:
    16
    Unfortunately that did not help. The problem does not occur if the traxamanger is in a fixed position instead of attached to the player...
     
  3. kopanz

    kopanz

    Joined:
    Dec 6, 2016
    Posts:
    82
    Jason

    I have a problem which is not related to Microsplat but it's related to terrains and you have a lot experience in unity terrains. I think you may have a solution.
    My game has enormous amount of memory leaks on scene switches(both in edit/play mode and builds). I investigated the source of the leaks. Gross majority of the leak are from terrain splatmaps, terrain data and compiled shaders. All of the leaks are in native memory space and the unity developer(me) is normally not responsible for freeing those memory.
    I read such solutions like calling Destroy() on terrains manually, using Resources.UnloadUnusedAssets() and System.GC.Collect()

    This problem is really killing my game. I loose 1-2 gb of ram on each scene switching.
    I hope you have an idea about this problem.
    I'm a legit Microsplat user. You can read my review in MicroSplat - Ultimate Bundle 8 months ago.

    Thank you.
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Welcome to Unity. That said, I would expect TerrainData, for instance, to all be managed memory, and if they are sticking around, then something still holds a reference to them somewhere - something marked DontDestroyOnLoad, static class, or asset bundle. I would also try something silly, like loading an empty scene that calls Resources.UnloadunusedAssets and such, and then loads the next scene.
     
    GCatz, Willbkool_FPCS and kopanz like this.
  5. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    So for using 2021.2.x (URP 12) should I purchase the URP module? or is there a newer one?
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The newer one has been stuck in Unity's review process for 3 months now.
     
  7. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    Too bad! :( What if you open a ticket? I saw the upgrade price so gonna go for the 2020 version now, downgrading the current project, and purchase the 2021 when it's up.
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    That is so crazy. My sympathies for you and for your customers.
     
  9. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    @jbooth I purchased the 2020 URP module, imported the base microsplat and the module but the shader type doesn't appear in the microsplat shader generation and I see no documentation about it. Any idea?


    upload_2021-12-26_13-21-48.png

    When clicking on URP in "Want more features" it leads me to the 2019 asset store page and I see no documentation about this either...
     
  10. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    upload_2021-12-26_13-26-11.png
    This is what should appear but it doesn't. I'm using unity 2020.3.25f1 (LTS) + URP 10.7
     
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Wow, as if posting in multiple discord channels and 20 emails wasn't enough, posting here and bashing me on the review system as well. Really motivated to help you now! Goodbye..
     
    Willbkool_FPCS likes this.
  12. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    This is a MapMagic issue, not a MicroSplat one, but im leaving this on both forums in case this helps someone using MapMagic 1 and Microsplat :) (they work really well together)

    I updated Microsplat and then had this MapMagic 1 error:

    Assets/MapMagic/Generators/CustomShaderOutput.cs(1439,36): error CS0246: The type or namespace name 'MicroSplatTerrain' could not be found (are you missing a using directive or an assembly reference?)

    I fixed it by editing CustomShaderOutput.cs and adding:

    using JBooth.MicroSplat;

    to the top of the page.
     
  13. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    395
    Hi,

    I would like to see if I get better mobile performance from a mesh terrain than Unity's. I downloaded and imported MicroSplat, Terrain to Mesh and Microsplat URP. I follow the documentation process of converting Unity terrain to Microsplat then using the Editor Window to convert to mesh but an error is thrown and the newly created mesh terrain is missing its material:



    I'm running URP 2020.3.7f1 with the latest release of the 3 aforementioned plugins.

    Thanks, Jake
     
  14. oliran

    oliran

    Joined:
    Sep 29, 2015
    Posts:
    49
    I'm using Microsplat with URP but terrain is pink. I bought and imported Microsplat URP but doesn't help. The diretions say to select the material and change the Render Loop. I don't see any Render Loop option on the material.

    Edit: reimporting Microsplat URP and restarting Unity doesn't help. I'm using 2020.3.25.
     
    Last edited: Dec 27, 2021
  15. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Did you install MicroSplat's core module first? I just tested on 2020.3.25 since this is the second report of this on this version of Unity and perhaps Unity broke something in the this patch, but it all worked fine for me.
     
  16. cr281164

    cr281164

    Joined:
    Mar 5, 2013
    Posts:
    15
    Got a quick question about Better Lit Shader and Better Shaders. if I purchase Better Shaders do I essentially get the Better Lit Shader in that pack? Does the Better Lit Shader have any additional features that I couldn't just generate using the Better Shader framework?
     
  17. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    841
    This video was made using this asset. MicroSplat does wonders for terrains!



    Third in the Apollo’s Dream series, we make these for all people to find some peace and beauty in this world of chaos. We hope you enjoy it.
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, they are different things entirely. Better Shaders is an authoring system for making any shader you want, Better Lit was created with that authoring system. Same as CTS was a terrain shader made with Amplify Shader Editor, but it was not Amplify Shader Editor.
     
  19. oliran

    oliran

    Joined:
    Sep 29, 2015
    Posts:
    49
    Thank you for looking into this. I am not sure why, but it suddenly started working. The only thing I did was delete the terrain and create a new one, but I can't imagine why that should make the shader work. So I have no idea, but it works! Thank you again.
     
  20. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    From reading this thread I saw URP 2021 is not yet available. I guess the 2020 version will not work on URP versions higher than 10? Sorry I'm not too knowledgeable about these things so I have to ask.
     
  21. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    From what I know the URP 2021 module is stuck in Asset review queue since October, so hopefully soon in January it will find its way in to the asset store.

    And I work on URP 2020 in Unity 2021, and it mostly works apart for some things like wind and glitter i noticed yesterday and perhaps some other features i dont usually use.

    Hope Unity get its S*** together and finally approve 2021 adapters :(
     
  22. Elvis083

    Elvis083

    Joined:
    Jan 11, 2015
    Posts:
    26
    Hi,

    i've got few questions. I've bought MicroSplat - Terrain Collection to improve visual and/or perfomance of mobile game. Whatever I try, I'm unable to achieve better perfomance as with unity terrain shader. Game using Microsplat running cca. 2x slower than with unity terrain shaders. With few configurations I was not even able to make a build, so I cannot judge, if there's really no optimal configuration.

    Build errors:
    upload_2022-1-2_9-35-53.png

    Configuration which leads to those errors:
    upload_2022-1-2_9-32-17.png

    upload_2022-1-2_9-36-39.png

    upload_2022-1-2_9-41-29.png

    Terrain has 8 layers, no normal maps yet because of performance. I'm using Unity 2020.2.2f1, Build-in render pipeline. I was hoping MicroSplat will improve perfomance to make it be able to add normal maps, but it performs worse even without normal maps, actually probably worse without normal maps than unity shader with normal maps.

    So my questions are:
    1) Are thoose build errors somehow solvable (by upgrading project to 2020LTS for example, or will you fix them soon, etc.)?
    2) Am I able to achieve with MicroSplat what I want to achieve (increase perfomance of terrain with 8 layers with (or without) normal maps, with no extra functionalities on mid-range android/ios devices, or It's not asset for that?

    Thanks.
     
  23. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    Hello Jason!

    Sorry to come up with a problem too. However, the normal maps aren't working. And there is definitelly a confusion with already created microsplat-terrains. Yes, the new generated MicroSplatData folder pops up, as soon as I press generate microsplat, however, he starts creating texture sets from a setting that was once build, only this time without normal maps, AO, gloss etc. and yes, it gets saved in a fresh "microsplatdata" folder. However, already setup textures shows me that there is a dependecy somewhere.

    And when generating a new terrain, with a new microsplat-data folder, which I check twice if it is really not referencing to any old "microsplat data" folder/files, the normal maps and other things don't work. Worflow is PBR, everything points on having "all the features" The arrays seem also to be ok and setup normally:

    And my settings goes to everything uncompressed in 4k, highest quality, trilinear to 16x etc. and all the normal maps aren't working anymore. I guess also depth, and the others. I only see the albedo and I tried everything but Idk anymore what to do. The 1st generated terrain (weeks ago) with Microsplat works. The new ones not. And from where does a new creation associate a texture that I used before? Albedo/Height & Normal/Smooth/AO

    It's somehow depressing. I would've been done two days ago with the scene, and I am totally under pressure of my business.

    You might remember my opinion about Unity. It IS crap, it STAYS crap and I will soon move to Unreal and say good bye to this complicated thing that calls itself a development tool.
     
    Last edited: Jan 2, 2022
  24. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    @Rastapastor Yo thanks. I was mostly worried that installing it would cause a lot of errors and make the project not work or even break things.
     
  25. PeterBalso

    PeterBalso

    Joined:
    Oct 23, 2021
    Posts:
    7
    Did you rename anything in your MicroSplatData directory? Did you change anything in the 'Advanced' section of your MicroSplat material inspector or change the Packing Mode on your texture array asset? In my experience, when MicroSplat doesn't seem to be propagating updates correctly, it's usually because I did something to interfere with MicroSplat's data management. Probably not MS's or Unity's fault!
     
  26. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    I only move the MicroSplatData folder into another folder, that's all.
    I recreated the default process every time. It always behaves differently - without a single error message. Like everything would be normal.

    Here screenshots from the setting

    Microsplat2.PNG

    Microsplat.PNG

    Microsplat3.PNG
     
    Last edited: Jan 2, 2022
  27. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's a lot written in the optimization guide about this. That said, it takes a bit of work to get MicroSplat to run faster than Unity's shader, especially on mobile, because Unity's shader is very bare bones and doesn't do much, and MicroSplat is optimized for high texture counts and much more complex features. In some cases, it pays an upfront cost for its optimizations which if you're not using many of it's features doesn't help (these are disabled in certain modes).
     
  28. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    95
    It looks like you changed the packing mode on your texture config from "Fastest" to "Quality" without changing the packing mode on the MS material, which is probably what's causing this. Change it back to "Fastest".
     
    Rensoburro_Taki likes this.
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Seems like you've been turning on options without realizing what they actually do or reading the docs on them. For instance, you have the texture packer set to quality packing mode but the material is not, which means you don't have the right texture arrays assigned to the material, hence your normal issue. Consider reading the docs on these options before you change them from the defaults.
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Oh, also, if you have shaders that are throwing those errors can you pm them to me with the errors?
     
  31. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    "the material is not" ? where do you see that? And sorry, if that all gets confusing at some point, because I tell you what, since you sound a little annoyed! YSomething like that should nowadays be implemented from unity by standard, and you should be rich. Thank you, I am done.
     
  32. Rensoburro_Taki

    Rensoburro_Taki

    Joined:
    Sep 2, 2011
    Posts:
    274
    Thank you! That was it.
     
  33. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    So I was reading about the mesh module to be able to paint on regular meshes and from what I understand you can only paint with custom textures, not custom materials/shaders.
    Is this correct?
     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Not sure what you mean- materials are assigned to submeshes in Unity, so you can't paint "materials/shaders" unless you were simply assigning them to polygons and breaking the mesh into more submeshes.
     
  35. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    Really? This asset apparently lets you paint over a mesh with whatever shader you want. https://assetstore.unity.com/packages/tools/painting/paint-in-3d-26286

    Since I want to use Microsplat to blend meshes together I thought I'd ask if there was something similar feature in the mesh module. I have a grass asset that spawns grass with a custom material and being able to paint just that material on the areas I need to would be a huge time save.
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, it doesn't let you paint shaders - it paints data a shader reads that is run the second time the mesh is rendered, which is the same as the Overlay mode in the mesh workflow.
     
  37. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    Ok, so it's just a fancy mask then? Well, all I really care about is being able cover the mesh with different shaders as if they where painted. It won't matter if the object has to render 3-4 times, they are super simple quad meshes more or less for a top down view.
    So you say that's how overlay mode works and you can apply several custom shaders in that mode?
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, it's a shader for the main rendering, then a shader for the painting - this is a little different than the other system, which paints colors into the second layer, where as mine paints textures.
     
  39. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    Ok, I understand. Thanks.
     
  40. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    374

    Sorry to return to this topic, but I have been unable to get it.

    Could you help me get the marks made permanent for next scene loads?

    My goal is to simulate that several cars have passed through an area and that those marks appear there when a car enters the scene.

    Thank you.
     
  41. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Like I said, you'll need to serialize out the buffers and restore them on scene load. If you have specific questions I might be able to answer them, but I'm not going to write the code for you.
     
  42. tolosaoldfan

    tolosaoldfan

    Joined:
    Sep 14, 2012
    Posts:
    92
    Hello,
    I just download the last version on my MacM1 + U3D 2021.2.5F1, URP project, and all the materials from your examples are pink. Tried to create a material with the Shader BetterLit/Lit => same thing. Same things on Windows + 2020.3.21f1
     
  43. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Unity 2021.2 is not a supported version. The versions supported are listed clearly on the asset store listings.

    Also, the examples for MicroSplat ship in BiRP format, so you'd have to change the render pipeline to a compatible URP pipeline on the materials.
     
  44. tolosaoldfan

    tolosaoldfan

    Joined:
    Sep 14, 2012
    Posts:
    92
    Thanks for your answer, so when do you think the 2021 & 2022 version will be released? We're in 2022, and your last released (today) doesn't support the 2021, which was available for a while. I know it could require some (huge) work, but having such a delay doesn't show to your potential customers that the plugin will be maintened in the futur. Netherless, happy new year 2022.
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You'd have to ask Unity, I submitted the 2021 version over 3 months ago and they've been sitting on it for no reason. I can't release adapters as fast as Unity breaks them because the asset store is effectively broken.

    As for 2022, I don't support beta/alpha/tech releases in SRPs (a technology designed to be fundamentally unstable) - they break all the time, and rewriting 10k lines of shader code every few weeks so script kiddies can pay with the latest incredibly buggy versions of Unity that just create more support requests is not a valuable use of anyone's time. Unity doesn't even support tech releases, yet you expect solo asset developers too? Please. If you think that shows "lack of support", the you try updating them constantly with no warning or support or documentation from Unity and see if it's a good use of your time.
     
    Recon03, tolosaoldfan and jRocket like this.
  46. tolosaoldfan

    tolosaoldfan

    Joined:
    Sep 14, 2012
    Posts:
    92
    Thanks for this long explanation. Effectively, I understand your constraints and your frustration. Keep going!
     
  47. JamesHorn_AbsolutelyGames

    JamesHorn_AbsolutelyGames

    Joined:
    Jul 5, 2021
    Posts:
    2
    Hello,

    Having issues with MicroSplat Terrain not utilising shadowmasks with URP on Unity 2020.3.15f2. Can't find if shadowmask is supported or I'm missing something.

    Thanks,
    JamesHorn
     

    Attached Files:

  48. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    It's actually not so bad anymore. Microsplat HDRP works just fine in Unity 21.2. The shader API is getting more stable and fewer things are breaking compared to early on.

    Insulting your users over wanting to use state of the art tech is poor form though.
     
    Last edited: Jan 6, 2022
  49. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Blame Unity for giving asset creators headache and frustrations :)
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Insulting asset creators and saying they aren't supporting their products or aren't dedicated because they don't want to spend thousands of hours chasing bugs in beta versions of Unity is what's poor. 70% of my dev time last year has been spent cleaning up Unity mess with the SRPs, which is a massive loss of both money and time that no one asked for, that's hardly not supporting my products. Other terrain shaders simply took their products off the store rather than dealing with this.
     
Thread Status:
Not open for further replies.