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

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Confirmed latest version has sampler##name instead of sampler_##name and it solved the problem :)

    Had to do a fresh install, whenever I tried updating without a fresh install of microsplat and its components I got some error from the previously generated shaders, after doing a fresh install I was able to use it on the switch URP with terrain meshes no problem ^^ Thanks!
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It could be done..

    I must have fixed that before this conversation started. You basically have to delete your package manager cache every time you update an asset, because basically the package manager doesn't work.
     
  3. Lorrak

    Lorrak

    Joined:
    Sep 17, 2019
    Posts:
    50
    Unity 2020.30f1(LTS?), clean asset install, android build, clean project, tried all compressions overrides if it changes something, it happens then i try to add textures to array config
    "astc" etc errors with other compressions
    Code (CSharp):
    1. 'ETC2_RGBA8' is not supported on this platform. Decompressing texture. Use 'SystemInfo.SupportsTextureFormat' C# API to check format support.
    2. UnityEngine.Texture2DArray:.ctor (int,int,int,UnityEngine.TextureFormat,bool,bool)
    3. JBooth.MicroSplat.TextureArrayConfigEditor:CompileConfig (JBooth.MicroSplat.TextureArrayConfig,System.Collections.Generic.List`1<JBooth.MicroSplat.TextureArrayConfig/TextureEntry>,string,bool) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1365)
    4. JBooth.MicroSplat.TextureArrayConfigEditor:CompileConfig (JBooth.MicroSplat.TextureArrayConfig) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1870)
    5. JBooth.MicroSplat.TextureArrayPreProcessor:CheckConfigForUpdates (JBooth.MicroSplat.TextureArrayConfig) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayPreprocessor.cs:70)
    6. JBooth.MicroSplat.TextureArrayPreProcessor:OnPostprocessAllAssets (string[],string[],string[],string[]) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayPreprocessor.cs:44)
    7. UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets (string[],string[],string[],string[],string[])
    8. JBooth.MicroSplat.TextureArrayConfigEditor:CompileConfig (JBooth.MicroSplat.TextureArrayConfig,System.Collections.Generic.List`1<JBooth.MicroSplat.TextureArrayConfig/TextureEntry>,string,bool) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1851)
    9. JBooth.MicroSplat.TextureArrayConfigEditor:CompileConfig (JBooth.MicroSplat.TextureArrayConfig) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1870)
    10. JBooth.MicroSplat.TextureArrayConfigEditor:DelayedCompileConfig () (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1094)
    11. UnityEditor.EditorApplication:Internal_CallDelayFunctions ()
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There are two known bugs with Unity compression right now:

    1. For ages, compressing into ETC2 on windows will throw this error- because the editor running on windows does not support ETC2 - but everything works fine.
    2. On 2020.3, they broke texture compression on some platforms. This bug is filed and repro'd, but I'm not sure when unity will fix it.

    Your screenshot is of the first, and can be ignored.
     
  5. Lorrak

    Lorrak

    Joined:
    Sep 17, 2019
    Posts:
    50
    okay, i will wait for unity to figure it out with texture compression, because if i go further and try using it(arrays) on microsplat shader standart or urp, unity goes crazy with all sorts of errors :D
     
  6. maky13

    maky13

    Joined:
    Jul 16, 2018
    Posts:
    7
    Hi!

    I have a question regarding changing texture quality at runtime? (something like a "Low/Mid/High" slider present in many games)
    I am using HDRP with 3 quality presets (Low = Quarter Res, Mid = Half Res, High = Full Res) and change between them. I think it is the same as changing QualitySettings.masterTextureLimit from code directly. However, this doesn't apply to the Microsplat texturearrays, and this is my dilemma.
    I am not very experienced with this, and I am worried that if I "hack" something together, it might end up more trouble than it is worth. Also, I saw an earlier comment in this thread about how changing QualitySettings.masterTextureLimit has its own issues, so I am having second thoughts about the whole process.

    What is the best practice for this?
     
  7. Unimacsima

    Unimacsima

    Joined:
    May 16, 2017
    Posts:
    3
    Hello! I am using Microsplat terrain blending on URP 2020.1.17f
    The blending works great! BUT, every time I play or save the scene it seems like the Terrain_normal gets reset because the blending has completely gone. I have to update the normal data to brings up the blending again. Is there any solution? thank you
     
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Wait until you get comfortable with profiling your game before considering things like this- do you know that texture size is an actual factor affecting your frame rate yet?
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    If you can provide a way to repro this I'd happily look into it- there seems to a few issues around saved introduced in 2020.3 reported by various people, but so far I've not managed to repro them myself or gotten a repro from anyone else that works.
     
  10. maky13

    maky13

    Joined:
    Jul 16, 2018
    Posts:
    7
    To be honest, I don't feel comfortable at all with graphics profiling (especially with all the HDRP options). I am just trying various configurations and looking at the fps, so nothing in-depth. Changing the texture sizes didn't seem to have a significant impact on my machine (maybe a few fps).
    I am used to seeing such option in most of the games I play, so I thought of it as a "must have in game" (perhaps not the best idea).
     
  11. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    I've been looking into fixing repeating textures on our terrains. I really like the results of the "Stochastic Height Sampling Node for Amplify Shader Editor" asset:

    https://assetstore.unity.com/packag...ampling-node-for-amplify-shader-editor-143715

    It's from the same author, does anyone know if there is an implementation of it for MicroSplat?

    There is also the anti tiling module which appears to do something similar to an older asset called "Distingo" which worked ok but wasn't perfect.

    Last but not least there is the "Texture Clusters" module.

    Could anyone with experience using those comment on performance, effectiveness and usability?

    We also plan to use the "Tessellation and Parallax" module if that is of any consequence.

    Thank you.
     
    Last edited: Mar 16, 2021
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Texture Clusters has a stochastic option..
     
  13. Unimacsima

    Unimacsima

    Joined:
    May 16, 2017
    Posts:
    3
    Hello again Jason, I was able to reproduce the bug again and again. So FYI I'm using 2020.3 now because it was LTS.
    To repro, the bug just simply doing the basic thing
    - New Scene
    - Create Terrain
    - Insert the Microsplat script
    - Insert the Microsplat material to the terrain
    - Paint the terrain
    - Import the Microsplat Terrain blending
    - Activate the Terrain Blending on the Microsplat terrain
    - Put the 3D Object to the Terrain
    - Insert the Microsplat Blendable Object to the Object
    - It works!
    - SAVE / Ctrl +S same result
    - No blend
    - Adjust
    - Blend again
    - PLAY
    - No blend.

    And in 2020.3 the bug while saving and the terrain going black is occured.
    It is still bearable because the texture will pop up if you just play or adjust anything.

    Thank you, hope there's any way i can use the terrain blend it was so good! Thank you jason
     

    Attached Files:

  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The terrain blending issue repro's and is fixed, but I still don't see black terrain on saves..
     
  15. development_unity92

    development_unity92

    Joined:
    Jul 16, 2020
    Posts:
    2
    Hello, @jbooth I am having a problem with tesselation on ios. When I enable tesselation it looks like this on iPhone XR, with unity version 2020.2.1 on highest quality settings. You can see the green lines and some darker areas. If you can help it would be much appreciated. Thank you. Screen Shot 2021-03-19 at 16.10.08.png
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Unless you have some green texture coming through for some reason, I would expect this to be some kind of driver issue. Do any particular feature combinations cause this?
     
  17. vidugam

    vidugam

    Joined:
    May 2, 2019
    Posts:
    7
    Hello @jbooth I seem to be confused as to either how Unity handles normal maps or how this asset handles normal maps. I'm using HDRP and Tessellation and the landscapes seem to be incorrectly rendering the normals of the material I made in substance. You can see that the shadows of the gravel on the landscape are facing the lightsource. The same textures appear correctly on the cube and sphere. Do I have something set incorrectly in the config? The normals are in OpenGL format. Normal Channel Inverted Problem.png
     
  18. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    World Creator + Quadspinner Gaea. HDRP 2020.3. Trees from Triforge fantasy pack. GPU Instancer for trees performance;)
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      421.8 KB
      Views:
      330
    • 2.jpg
      2.jpg
      File size:
      533.7 KB
      Views:
      319
    • 3.jpg
      3.jpg
      File size:
      418.4 KB
      Views:
      325
    • 4.jpg
      4.jpg
      File size:
      587.3 KB
      Views:
      327
    • 5.jpg
      5.jpg
      File size:
      489.3 KB
      Views:
      317
    Last edited: Mar 19, 2021
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Is that a standard unity shader on the sphere? MicroSplat internally stores its normals differently than Unity does, but should account for it in the shader- however, it's quite possible something got flipped somewhere it shouldn't have. Is this using HDRP2019 or 2020's adapter, and in which version of HDRP? Also, triplanar or UVs?
     
  20. vidugam

    vidugam

    Joined:
    May 2, 2019
    Posts:
    7
    @jbooth I've fiddled about and updated to HDRP 2020 and the supported version of Microsplat. Not much has changed, but I am however getting errors in the console when I edit the microsplat material which weren't appearing before. I'm not sure if they have any relevance to my problem since they seem to not effect anything. What's stranger is the material on the right in the picture seems to the being rendered perfectly fine. All of the other materials and textures on the terrain have inverted channels. I am not using triplanar or any other modules. Only HDRP and Tessellation. I doubt Tessellation is causing it since the maps were inverted before I had it installed. huh.png what.png
     
  21. vidugam

    vidugam

    Joined:
    May 2, 2019
    Posts:
    7
    Oh and this happens when I save the scene.
    It goes away when I rebuild the material though and comes back when I save again.
     

    Attached Files:

  22. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I'm getting the same issue with Unity 2020.3.0. If I make any changes, or save the scene the terrain seems to lose its normal mapping. If I toggle something in the MicroSplat material the normal appearance is restored. Entering play mode also restores the correct terrain appearance.
     
  23. TheFoundation

    TheFoundation

    Joined:
    Jan 29, 2014
    Posts:
    20
    @jbooth I can confirm the shader errors reported by vidugam and pauldrummond using those versions:
    • Unity 2020.3.0f1 (with HDRP template)
    • High Definition RP 10.3.2
    • MicroSplat Core 3.76
    • MircoSplat HDRP 2020 Support 3.7
    The CoreHDRP2020 Example should produce those errors out of the box.
     
  24. vidugam

    vidugam

    Joined:
    May 2, 2019
    Posts:
    7
    Cool. I was beginning to think something was wrong with my installation.
     
  25. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yup, fixed this yesterday..
     
    TheFoundation likes this.
  26. pat0000

    pat0000

    Joined:
    Mar 22, 2021
    Posts:
    1
    Is there a step by step guide on how to install MicroSplat - HDRP 2020 into a fresh Unity 2020.3.0f1 project? I cant seem to find the option to turn on the rendering loop or where that would be located.
     
  27. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Install core, install HDRP2020, and any other modules, then the render loop will be at the top of the material interface.
     
  28. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    181
    I am using a Tesselation module and it looks very nice.
    Does anybody knows how to make a character (robot in my example) to actually walk on such MicroSplat terrain and not sink into it. Is it possible at all?
    Tesselation01.jpg
     
  29. vidugam

    vidugam

    Joined:
    May 2, 2019
    Posts:
    7
    @Artini The best thing you can do is to use occlusion mapping or to displace the geometry downward instead of up. Since displacement and tessellation run on the GPU you can't really get the information of the geometry to do anything with say IK.
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This is covered in the docs and in the faq.
     
  31. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Was the fix in the latest Microsplat release? Unfortunately, I'm still having the same issue with Unity 2020.3.1 HDRP and Microsplat 3.77. If I change anything in my scene the terrain seems to lose normal information. Going into Play mode always fixes it. Here's a screenshot to illustrate:



    Whenever anything in the scene changes I get this alert in the console:

    Importer(NativeFormatImporter) generated inconsistent result for asset(guid:3c925592ae7f74e9abbf2a36ae9d54b4) "Assets/Coast House/Terrain Data/MicroSplatData/MicroSplat_propdata.asset"
    UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
     
    Last edited: Mar 23, 2021
  32. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You have to clear the package manager cache before downloading any assets, as the package manager is completely broken in most versions of Unity. It will say it has latest, but install an old version.

    I was referring to the REV_VP compile error (a patch shipped this morning for a number of issues). There have been several reports of people having issues after saving and having to adjust a property or regenerate normals to get it to snap back, but I can't seem to repro this myself.
     
  33. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I have been clearing the cache for each update. Unfortunately, things are even worse now. My terrain textures are appearing far too light, almost as if they're in the wrong colour space. This screenshot shows the albedo debug view. The textures should be a lot darker. All other scene elements appear as expected. The Microsplat material has been set to the correct 'HDRP 2020' render loop and workflow.

     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I haven't changed anything with color space or texture code in, well, years. There is a diffuse is linear option on the texture array config though.
     
  35. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I saw that. I'm going to create a test scene and work through options to see if it's something dumb I'm doing.
     
    jbooth likes this.
  36. vidugam

    vidugam

    Joined:
    May 2, 2019
    Posts:
    7
    @jbooth So my normal problem seems to be fixed but there seems to be a problem with the texture compression now? The textures I have look really S***ty up close. These are 2048x2048 textures and should be far more detailed than this. You can see the artifacting? in this image where the color looks like it got converted into a jpg, and I get this error in the console when I go to create a new terrain. Am I doing something wrong? I went through the FAQ and nothing talks about this. Crust.png PossibleCrustError.png
     
  37. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I give up for today. Now the terrain doesn't receive realtime lights/shadows and the textures look really weird; washed out and almost pixellated. I can't work out what's wrong with it. I may have to revert to my project version in Unity 2019.
     
    Last edited: Mar 23, 2021
  38. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    181
    Thanks a lot. I have had no idea, how to fix this issue at all.
     
  39. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    181
    Oh, I admit, I have not read the docs and the faq, yet. I am so impatient with testing things out.
     
  40. waffenwars

    waffenwars

    Joined:
    Mar 4, 2013
    Posts:
    4
    Hi, I got microsplat and the hdrp 2020 module, I'm using unity 2020.3 LTS. I cleared the package cache and re-downloaded the modules an hour ago. I get the following message when updating the texture array (either deleting a material or adding one). It doesn't seem to be causing any issues but I thought I'd let you know:
    upload_2021-3-23_19-53-45.png

    My workflow to get to this step was:
    Create a new terrain
    Add the microsplat component to the terrain
    Click convert (did not supply a material)
    Add textures to the slots for one of the materials in the array
    Click update

    Whenever i add or remove new materials from there the error pops up. I seem to be able to paint and erase new materials fine.

    This asset is awesome, thanks for supporting it!
     
  41. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yes, bug is logged with Unity, expecting a fix in a patch version or three..
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Nothing has changed with the texture compression code, except that bug that throws an error in Unity 2020.3, but I can't do anything but wait for them to patch that.

    Do you have your texture array config set to 2048? The default is 1024..
     
  43. waffenwars

    waffenwars

    Joined:
    Mar 4, 2013
    Posts:
    4
    Thanks for the response! I installed the blending plugin and found that the blend shader doesn't seem to respond to realtime shadows in hdrp. Is hdrp not supported for this module or am i missing a trick?
     

    Attached Files:

  44. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Hi back again with this bug (iOS), and reading through the forum (im now on 2020.3.1f1, have deleted package manager cache and reinstalled / updated microsplat today),

    am still getting the error:

    Autoconnected Player async texture load: failed to load MicroSplatConfig_normSAO_tarray from /private/var/containers/Bundle/Application/C20D9C3A-4718-4187-9AA0-41E31E3DFF76/HorseAcademy.app/Data/sharedassets5.assets.resS


    To attempt to workaround i switched to packing mode quality and updated, which lead to a different (but very similar looking)

    Autoconnected Player async texture load: failed to load MicroSplatConfig_smoothAO_tarray from /private/var/containers/Bundle/Application/65CBCAB6-A1BF-41B1-BE07-6075DE5016C7/HorseAcademy.app/Data/sharedassets5.assets.resS


    Reading the forum, I'm guessing that my issue is related to these unity bugs, and they're aware of it and nothing we can do here apart from sit and wait for them to fix it up? If my issue is somehow different to the unity bugs mentioned above, if I can do anything to help in assisting debug I would be happy to do so. As always, support for your asset and patience with your support are to be admired.
     
  45. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I reverted to a version of the project using Unity 2020.1.17. Everything is okay but I can't update the Microsplat assets because there's no HDRP module for this Unity version. Something in the jump to Unity 2020.3.1 is breaking my project. I need to work out what it is.
     
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This was fixed recently- you likely need to delete your package manager cache and redownload, as the package manager is completely broken.
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Different error, but something in Unity's or your projects domain- I don't load anything manually in MicroSplat, that's all handled by Unity's reference/build system.
     
    andrew210 likes this.
  48. vidugam

    vidugam

    Joined:
    May 2, 2019
    Posts:
    7
    @jbooth I'm guessing you mean these options? They're set to 2048 and I'm still getting weird compression problems. On top of that, this distortion still keeps coming back whenever I save, and sometimes when that happens Unity will just decide to not render anything while the terrain is on screen.

    Options.png UV possible problem.png
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Well, nothing has changed with any of the compression code in ages- but there is that Unity error being thrown in 2020.3, so it's possible it has something to do with it.
     
  50. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Thank you, efforts to debug this have been rather fruitless at the moment, the only slightly interesting thing i've found is that changing the compression on the platform overrides for ios to "Uncompressed", on this build it didn't throw any errors but didn't work at all. If not due to the bugs noted already in with 2020.3.x does anybody have any ideas on what i could potentially try next to get this fixed (reverting to earlier version of unity seems the only option i can think of right now)
     
Thread Status:
Not open for further replies.