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

    Elervax

    Joined:
    Sep 4, 2017
    Posts:
    5
    Hello,
    I want to change the splatmaps of my terrain from script. Im using twelve layers in the microsplat shader but the unity terrain data only allows 8 splat layers. How does microsplat save 12 or more layers in these 8 layers?
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It doesn't, Unity terrains don't have a splat map limit of 8. I don't actually think they even have a limit.
     
  3. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    121
    @jbooth I think I did something and my Microsplat (Terrain bundle) started doing this weird chunking as I back the camera off, I have adjusted all the knobs I see in the Microsplat material, but it is not adjusting.

    How do I push these further back? I want to keep the layered textures at a much further distance:

    Screen Shot 2021-04-02 at 7.26.15 PM.png

    This moves with my camera, and has a circular distance pattern with these squares. What parameter controls this distance?
     
  4. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    I tried to convert a terrain to microsplat. The materials came out way to shiny. I saw that smothness was not included so I added those and pressed update., Now its all black. Removing them and press update did nothing

    upload_2021-4-2_21-44-9.png
     
  5. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    If I removed them from the terrain prior to adding Microsplat, are you saying MS would still add a white texture for them?
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Without knowing what features you have on, I have no idea what this could be coming from. Usually the process to figure it out is turning features on/off to see which one is causing an issue, then figuring out what parameters you adjusted to make it do that.
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    In 2020.3LTS there's a bug in Unity when textures are compressed (see your console) - this is logged with Unity. There's another one that keeps messing up terrains almost randomly, but if you go into play mode or adjust certain things, it just starts working again. Both of these are filled with Unity..
     
    MDADigital likes this.
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    MS would use whatever is in your Texture Array Config once it's converted. If you leave blank textures in there, it will default to white for them.
     
  9. ohbado

    ohbado

    Joined:
    Aug 13, 2014
    Posts:
    37
    Hi.
    I think MicroSplat is a very good asset.(I have purchased Anti-Tiling Module and Global Texturing.)
    However, I am getting a shader error in Microsplat.It seems that the error occurs when LIGHTMAP and FOG are enabled.

    I can also prepare a project to reproduce the error.
    Please let me know the solution.

    Unity:2020.3.2(Built-in Render Pipeline)
    target:windows

    If you want to use fogcoord, you need to define UNITY_FOG_COORDS(x); as the input information for the Fragment shader.If you look at the definition of the corresponding struct, you will see the following description
    #ifdef LIGHTMAP_ON
    UNITY_LIGHTING_COORDS(10,11)
    #else
    UNITY_FOG_COORDS(10)
    UNITY_SHADOW_COORDS(11)
    #endif​
    When using LIGHTMAP, Microsplat does not define UNITY_FOG_COORDS. Therefore, fogCoord will not be generated.
    However, when Fog is enabled, the vertex shader will call the UNITY_TRANSFER_FOG macro. It will try to reference the fogCoord, which will generate an error.


    Error message
    --------
    Shader error in 'Terrain': invalid subscript 'fogCoord' at line 4226 (on d3d11)

    Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_ON DIRLIGHTMAP_COMBINED SHADOWS_SHADOWMASK FOG_EXP2
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR UNITY_PASS_FORWARDBASE
    Disabled keywords: INSTANCING_ON FOG_LINEAR FOG_EXP _ALPHATEST_ON LIGHTPROBE_SH DYNAMICLIGHTMAP_ON LIGHTMAP_SHADOW_MIXING VERTEXLIGHT_ON UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30​
    --------
     
  10. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Hey Jason, hope ur well, I've found a couple of bugs, using latest 2020 HDRP LTS,

    1. HDRP decals are not showing up in the game view, they do show up in the scene view however, I'm using decal layers if that helps

    2. When ever I save my scene the terrain shader disappears, it I find the terrain and disable it/ enable, it come back, so not a massive one, but a bug never the less

    3. This one is odd when ever I try to use TextMeshPro/Bitmap shader this happens :D

    Bug.jpg
     
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Would love a repro project of this if you have one handy, if not there's enough info here to reproduce it- thanks for the investigation. This is standard pipeline right?
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Are these Unity decals or my decals?

    2 is a known 2020.3LTS bug- seems to only happen on windows and seems to also cause an almost random result for people- some people get white terrain, some black, some it only partially goes wrong for.

    3 is really strange - that shader would need to have the custom editor for microsplat assigned to it to show the MicroSplat editor- did it happen to get changed into a MicroSplat shader somehow? Someone had reported the "regenerate all shaders" command changing a shader that was not a MicroSplat one and I've added an additional check, but perhaps that's what happened here too?
     
  13. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461

    Never mind- repro'd, will fix.. Thanks!
     
  14. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    2. Doh
    3. I did do "regenerate all shaders", so possibly, although if I delete the textMeshPro package and re-import it still does it

    As for the decals, they are just default HDRP decals, but it is indeed the decal layer option here's a before and after shot

    so first - here's a decal working on terrain & barrel note use layer disabled

    1.jpg
    now with use layers enabled in the HDRP settings, see how decal appears to work in scene view and in the game window it draws on the barrel, but not on the terrain

    2.jpg
     
  15. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,272
    I had the pleasure of being allowed to check out Jason's upcoming asset today. It's most awesome. I wanted to share a vid with Trax being applied on a road mesh with the new asset in HDRP, but since the official thread isn't available yet, I'm crashing this one :D



    Here's one of the screenshots I took while playing the game:

    Pavement damaged 1.jpg
    I'm hyped :)

    I only got the idea with the dragon stomping into the ground after stacking a noise texture on the pavement which I did before, which is also awesome:

    dirt.jpg
    Top is normal, bottom is a mix using the new asset.

    Or here's another with the standard shader vs the new one which supports noise on world scale, basically you can make every house different:

    comparison.jpg
    Enough spoilers :D Can't wait to see what you guys come up with :)
     
    Last edited: Apr 5, 2021
  16. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,272
    One more spoiler, I hope nobody minds, but I was having so much fun with this today :D

    It started with a clean room

    zombies 0.jpg
    Then I added Zombies

    zombies 1.jpg

    Of course the ambience didn't add up. So I converted the HDRP/Lit shader to Better Lit Shader and used the Better Lit Shader to stack more features on walls, floor and roof. Just to get that certain noise in. What's really nice is that e. g. for the floor I only used a glass texture that came with the Suburbs asset. Just because of lack of a proper dirt texture. But it just works as well as dirt after a few tweaks in the Better Lit Shaders material:

    zombies 2.jpg
    Adding a fog volume and the scene is done

    zombies 3.jpg

    Probably gonna add some peeling wallpapers and such as well. But overall, most impressive asset incoming :D
     
  17. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    A note to users: please do not put files online that do not contain your property. Assets are not your property, you only have a license to use them.
     
  18. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    So, I am going to admit that I just had a very negative support experience with jbooth via email, I'm sure he can figure out who I am exactly; this is on a different account than the one I used for email. Perhaps it is in bad taste to be mentioning this, but I would rather admit it directly rather than jbooth silently assume who I was.

    Instead of leaving a negative review and going on my way like I originally was going to do, all I really care about now is getting to the bottom of the problem I have with MicroSplat and asset bundles, especially since it apparently is an issue only I am experiencing.

    Basically my problem is that for some reason, MicroSplat is not showing painted textures correctly when loading terrains from asset bundles, but only in builds. Any painting done in the editor is not reflected, and the terrain does not respond to any changes to the alphamaps from code. I have reproduced this in a clean 2020.2 project. I have not had this problem with other custom terrain materials. This was also working in my project in Unity 2018.2, before upgrading to 2021.1.

    He did not seem too keen on providing any kind of advice in our emails. So now I just want to throw this question out into the wild to see if I can get any answer. I am not asking for anyone to fix this for me, but I want at least some kind of help.
     
    Last edited: Apr 5, 2021
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You got a negative experience because after I told you I wasn't going to spend three days debugging your asset bundle code, you started calling me lazy. How much of my time do you really think your $40-$80 purchase buys you? Hint: Its zero - the ample time I spend helping people here and on my discord is my choice, not yours. If you spent 3 years developing a very cutting edge system like this, then ported it to three render pipelines, for basically wages that are a fraction of what you earn in your regular work, how much time would you spend on someone who calls you lazy? When you get 5 requests a day demanding you to look into things that have dubious, at best, connections with your product for no pay, would you not say no? Is the right reaction to someone telling you:

    "I mean I'm not going to look into this issue- This would take me several days to debug, and isn't something in the domain of normal usage, and most likely will come down to some error outside of my code, be that in Unity or in your code. That represents thousands of dollars of unpaid work."

    To call them lazy because they won't work for your project for free? The burden of proff on this bug is on you- if you were to track down some issue in MicroSplat I'd gladly fix it, but I highly doubt this is in MicroSplat since I've shipped games myself with it using Asset Bundles, and many developers here have as well. How entitled are you?
     
    Rujash likes this.
  20. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    I'm glad you replied because I want to publicly apologize for the way I conducted myself in our emails and for the still hostile tone of my previous post. I personally attacked you and called you lazy, and that was so very wrong of me. It was a hot-headed, knee jerk reaction, I take full responsibility for it, and I will not attempt to provide any excuses or displace blame from myself in any way.

    I will try and figure out what exactly I am doing wrong that is causing the problems I am experiencing with MicroSplat.
     
    Last edited: Apr 5, 2021
    jbooth likes this.
  21. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,272
    Puddles work as well, which is awesome :) I tried fading the layers in and out during game, works as well:



    In Scene :D

    zombie puddle.jpg
    outside.jpg

    I think I should try if that works in VR :D
     
  22. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    Read through this again. While I still regret what I said and still stand by my apology, I feel like I am being somewhat misrepresented.

    I experienced what I thought was a bug with MicroSplat, so I provided a description of the problem, a small (~7MB compressed) reproduction project, and the specific steps to reproduce. The project contains very little of my code. In fact I can paste it all here and it comes out to less than 100 lines, excluding usings:

    Code (CSharp):
    1. //These classes are separate files in the actual project
    2.  
    3. //Loads the asset bundles and opens the scene containign the terrain.
    4. public class Loader : MonoBehaviour
    5. {
    6.     private void Start()
    7.     {
    8.         AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "AssetBundles", "game_assets"));
    9.         AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "AssetBundles", "game_scenes"));
    10.  
    11.         SceneManager.LoadScene("SampleScene", LoadSceneMode.Single);
    12.     }
    13. }
    14.  
    15. //Randomizes a terrain's alphamaps to test runtime terrain painting
    16. public class RandomizeAlphamaps : MonoBehaviour
    17. {
    18.     [SerializeField]
    19.     private Terrain terrain;
    20.  
    21.     public void Randomize()
    22.     {
    23.         float[,,] alphamaps = terrain.terrainData.GetAlphamaps(0, 0, terrain.terrainData.alphamapResolution, terrain.terrainData.alphamapResolution);
    24.         Vector2 origin = new Vector2(Random.Range(-1000, 1000), Random.Range(-1000, 1000));
    25.  
    26.         for (int x = 0; x < alphamaps.GetLength(0); x++)
    27.         {
    28.             for (int y = 0; y < alphamaps.GetLength(1); y++)
    29.             {
    30.                 //Randomly assign perlin noise value
    31.                 float total = 0;
    32.                 for (int z = 0; z < alphamaps.GetLength(2); z++)
    33.                 {
    34.                     float perlin = Mathf.PerlinNoise(origin.x + (x / 40f) + z, origin.y + (y / 40f) + z);
    35.                     total += perlin;
    36.  
    37.                     alphamaps[x, y, z] = perlin;
    38.                 }
    39.  
    40.                 //Normalize so sum = 1
    41.                 for (int z = 0; z < alphamaps.GetLength(2); z++)
    42.                 {
    43.                     alphamaps[x, y, z] = alphamaps[x, y, z] / total;
    44.                 }
    45.             }
    46.         }
    47.  
    48.         terrain.terrainData.SetAlphamaps(0, 0, alphamaps);
    49.     }
    50. }
    51.  
    52. //Editor script to build asset bundles and move them into StreamingAssets
    53. public static class MoveAssetBundlesToStreamingAssets
    54. {
    55.     const string buildAndMoveAssetBundlesToStreamingAssets = "Assets/Build Asset Bundles";
    56.  
    57.     [MenuItem(buildAndMoveAssetBundlesToStreamingAssets, false, 1)]
    58.     static void BuildAndMoveAssetBundlesToStreamingAssetsAction()
    59.     {
    60.         string baseAssetBundlesPath = Application.dataPath.Substring(0, Application.dataPath.Length - 7) + "/AssetBundles/Development";
    61.         string assetBundlesStreamingAssetsPath = Application.streamingAssetsPath + "/AssetBundles";
    62.  
    63.         try
    64.         {
    65.             if (!Directory.Exists(baseAssetBundlesPath))
    66.                 Directory.CreateDirectory(baseAssetBundlesPath);
    67.  
    68.             if (!Directory.Exists(assetBundlesStreamingAssetsPath))
    69.                 Directory.CreateDirectory(assetBundlesStreamingAssetsPath);
    70.  
    71.             EditorUtility.DisplayProgressBar("Building and Moving Asset Bundles to Streaming Assets...", "Building Windows Asset Bundles", 0);
    72.             AssetBundleManifest manifest = BuildPipeline.BuildAssetBundles(baseAssetBundlesPath, BuildAssetBundleOptions.UncompressedAssetBundle, BuildTarget.StandaloneWindows);
    73.  
    74.             EditorUtility.DisplayProgressBar("Building and Moving Asset Bundles to Streaming Assets...", "Deleting existing Asset Bundles in Streaming Assets...", 0.33f);
    75.             FileUtil.DeleteFileOrDirectory(assetBundlesStreamingAssetsPath);
    76.  
    77.             EditorUtility.DisplayProgressBar("Building and Moving Asset Bundles to Streaming Assets...", "Copying Asset Bundles into Streaming Assets...", 0.66f);
    78.             FileUtil.CopyFileOrDirectory(baseAssetBundlesPath, assetBundlesStreamingAssetsPath);
    79.         }
    80.         finally
    81.         {
    82.             EditorUtility.ClearProgressBar();
    83.         }
    84.     }
    85. }
    The rest of the project contains the latest version out-of-the-box MicroSplat, a few assets for the terrain itself, and a couple of simple scenes. The RandomizeAlphamaps script isn't actually necessary, since painting done in the editor does not show up for me in the build either.

    One thing that bugs me is that I'm not sure if you even tried downloading my project and going through the reproduction steps to see the results for yourself. If you did, you didn't let me know.

    But like you said, how you provide support is up to you. I will continue trying to find the cause out myself, but I'm basically fumbling around in the dark until I stumble across the source of the problem or I just give up.
     
  23. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    Alright, so I wasn't able to figure out the real cause of my problem, but I did find a workaround that so far is halfway working in my project (it is working for one of my scenes, but not another).

    In the scene I have the terrain with no material set, as well as the MicroSplatTerrain component with no template material set. I have a separate script that keeps a reference to my MicroSplat material. At scene load I set the template material and sync, and it works as expected.

    Not really sure if this tells me anything about why I was having problems in the first place, some weirdness with the way things were getting loaded? I don't know, but I'm just glad I was able to find something that seems like it should work, if I can figure out what's wrong with my 2nd scene.
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Sounds like some kind of synchronization issue between how the bundles were getting loaded, the objects instantiated, and the startup sequence of the Unity terrain component, which sets data on the material. The ordering of these events can be different when loaded from asset bundles than when running from a direct build, and also depends on how you are managing your bundle breakup and dependencies.
     
    Cramonky likes this.
  25. fea777

    fea777

    Joined:
    Jun 29, 2015
    Posts:
    14
    Hi,
    I bought the microsplat(terrain collection 11 modules), microsplat(mesh workflow), and megasplat and saw that there will be a spring sale for microsplat(ultimate bundle). Would it be possible to get a discount on ultimate bundle spring sale since many of the microspat asset I already have overlaps?
    Thank you very much.
     
  26. Jihaysse

    Jihaysse

    Joined:
    Mar 29, 2020
    Posts:
    53
    Hey everyone,

    I just started using MicroSplat but as soon as I set it up using the documentation, all the "normals" of my terrain textures have been affected.

    Let's say I have 3 layers: grass, sand and dirt.
    Grass has a normal texture scaled to 1, sand and dirt has no normal textures.

    Now it looks like I do have a high scaled normal texture on my sand and dirt layer (see attached).

    Am I doing something wrong?

    Thank you!

    Capture d’écran 2021-04-07 à 13.53.13.png Capture d’écran 2021-04-07 à 13.53.21.png
     
  27. cprelot_Bkom

    cprelot_Bkom

    Joined:
    Nov 2, 2020
    Posts:
    6
    does anyone know if can re-name Microsplat shader without breaking it?
    we going to have multi terrain with different biome
    I wanted to re name each microsplat sufix with a biome naming convention
    how I can do that?
    upload_2021-4-7_10-50-15.png
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Normals are autogenerated if you do not supply them- if you don't want them, insert a blank (blue) normal map.
     
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Do you want to rename the shader or the file? You can rename the shader itself via the material, but renaming the file is ill-advised. It can be done, but most likely you'll get something wrong and end up asking why your per texture properties don't work right or some other issue..
     
  30. 13E12K

    13E12K

    Joined:
    May 4, 2014
    Posts:
    20
    Hi there,

    I have recently got the Microsplat terrain shader and testing it around in my project with a 8x8 km terrain. It really felt performant and good quality compared to the default Unity terrain. That is really good work, much appreciated!

    However, when I try the "fog" from post-processing stack v2, I have encountered a weird issue. The terrain becomes pink after the shader error saying invalid subscript 'fogcoord'.

    As a workaround, - I turn off the fog, recompile the shader, and turn on the fog again -, however, after some time, if the shader somehow recompiles while fog being on, same error pops up again. I am using Unity 2018.4.33f1, but had the same issue with 2018.4.28f1.

    Is there anyone else having such an issue? Or anyway to solve this incompatibility with the fog?
     
  31. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This was fixed and released yesterday.
     
    ecfelts likes this.
  32. 13E12K

    13E12K

    Joined:
    May 4, 2014
    Posts:
    20
    Awesome, thank you! Now fog works flawless together with the terrain.
     
  33. Wayne-wyj1994

    Wayne-wyj1994

    Joined:
    Nov 13, 2019
    Posts:
    30
    HDRP 2020 Support is not compatible for MicroSplat Terrain Collection? I just install Microsplat 3.79, MicroSplat Terrain Collection 3.791,and HDRP 2020 support,but " MicroSplat Terrain Collection" doesn't work for 2020.3.2f ,HDRP 10.x. Like AlphaHole,it works for built-in pipeline,but in hdrp it doesn't work. I check the shader code ,find that there is Property "_AlphaData" in Example_AlphaHole.shader but not in Microsplat_HD.shader,also for other collection like AntiTile,Tessalation and ...... .
    upload_2021-4-8_9-6-3.png
    upload_2021-4-8_9-6-33.png
    Once I set AlphaHole for Microsplat_HD.shader,there will be duplicatied method in shader file .
    upload_2021-4-8_9-22-28.png
    upload_2021-4-8_9-22-56.png


    How should I set up MicroSplat Terrain Collection to work for HDRP?
     
    Last edited: Apr 8, 2021
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461

    Try clearing the package manager cache, as the package manager is broken in many versions of Unity and reports that you have latest but installs an old version from the crash. Also try in a fresh project. Also, why are you using Alpha Holes? These days it makes more sense to use Unity's built in hole system.
     
  35. Wayne-wyj1994

    Wayne-wyj1994

    Joined:
    Nov 13, 2019
    Posts:
    30
    Alphahole is just an example,other shader of MicroSplat Terrain Collection doesn't work either.I only want to use functions of these in HDRP pipeline too.
    I have tried to clear package manager cache and package cache and to restart project,but it still failed.There are same errors like above
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Is there error always "redefinition of UnpackNormal"? Or is it varied? There was this error like this in the 2019 adapter, but not in the 2020, and I am to compile fine in both platforms right now. What you could do is scan the .txt files in this directory and see if that function is being defined in two different places, and then try removing one. However, if you have the 2020 adapter installed instead of 2019 it should not have this error.
     
    Last edited: Apr 8, 2021
  37. Ponzel

    Ponzel

    Joined:
    Jun 17, 2017
    Posts:
    41
    Hi jbooth, thanks for all the work.

    We recently updated to Unity 2020.3 LTS and are getting a bunch of "Mesh x has more materials than subset" warnings:
    upload_2021-4-8_18-9-9.png

    You can easily see that there is one material too many on the object. I can delete them, but once I save the scene, they get regenerated.
    upload_2021-4-8_18-9-6.png

    Just to be sure, I updated MicroSplat today to its latest version, but the issue remains.
    Do you know about that? Is there a way we can fix it?

    Let me know if you need more info.
    Thanks.
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yeah, your using terrain blending - this is how terrain blending works, but putting a second material on the mesh. Is unity now constantly spewing these warnings into the console or something? For many years, this was a warning that only showed in the UI..
     
  39. Minzie

    Minzie

    Joined:
    Jul 26, 2019
    Posts:
    77
    @jbooth, I notice that after updating to version 3.791, the content in Microsplat node in Map Magic 2 is auto removed whenever I remove & add the same graph. I need to manually drag & reconnect Microsplat material & prop data into the node every time I change graph. However there is no issue when I use Map Magic 2 with previous Microsplat 3.79. How can I solve this?
     
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's no way any change in MicroSplat would cause Map Magic to lose references to objects. And certainly not a change from 3.79 to 3.791, which was a change to the shader output.
     
  41. Minzie

    Minzie

    Joined:
    Jul 26, 2019
    Posts:
    77
    That's what I think as well. I hope this is just a glitch.. I'm asking in Map Magic forum in case anyone have same issue.
     
  42. Ponzel

    Ponzel

    Joined:
    Jun 17, 2017
    Posts:
    41
    @jbooth Yes we're using terrain blending. You're right that the warning in the UI has always been shown and we're fine dealing with that.

    When we go into play mode, we get about 450 warnings in the console now and it's harder to notice other warnings.

    Do you have an idea of what one could do to mitigate them? Can we add the second material during runtime or something like that?
     
    Last edited: Apr 9, 2021
  43. wolfy22

    wolfy22

    Joined:
    Jul 3, 2017
    Posts:
    3
    Hello.. Im having an issue with HDRP terrain conversion. Please ignore normals and such.
    Mainly im talking bout blending of layers...
    First Pic is the original terrain. No issues..
    Second: After Microsplat Conversion i can clearly see layer boarders. None "texture blending" mode seems to fix the issue. (unity blending seems to give best results).. is there a way to fix this?. bandicam 2021-04-09 15-00-45-261.jpg bandicam 2021-04-09 15-00-21-734.jpg
     
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I would report this as a bug to Unity- using a second material is a valid use case, and it shouldn't be logging these to the console.
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It's a height map blend by default, if you want a linear blend, choose one of the other blend modes. But the blend quality will depend on how nice your height maps are..
     
  46. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    Hi @jbooth

    I just imported the last update of microsplat and it throws me these compile error:


    No idea what do they mean
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    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.
  48. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    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!
     
  49. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    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.
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    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.
Thread Status:
Not open for further replies.