Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

[FREE]MicroSplat, a modular terrain shading system for Unity Terrains

Discussion in 'Assets and Asset Store' started by jbooth, Aug 9, 2017.

  1. ecfelts

    ecfelts

    Joined:
    Aug 7, 2017
    Posts:
    11
    Jason,
    That sounds like an *excellent* question...!! Let's find out..!

    <Time passes...>

    So the first thing I figured out was that the sample scene does not load properly when using the URP.

    Undaunted, I set up a fresh test scene using the standard renderer to see what I could see. Part of me was hoping that it would turn out to be the URP just so that I could have something to blame this issue on. But that was not to be.

    As you can see from the attached image, the artifacts appear even when using the standard render pipeline. The package manager says that I am using Microsplat 3.794 and Scatter 3.791 in both projects if that information helps.

    I may be able to get some play by making the color of the scatter texture closer to the terrain color, but feels like more of a cheap workaround than a solution.

    Do you have any other thoughts or insights that you may be able to share..? Is there any information that you might need from me to figure out how to fix this?

    Thanks again,
    ecfelts

    upload_2021-5-5_10-39-41.png
     
  2. cpmullen

    cpmullen

    Joined:
    Apr 4, 2020
    Posts:
    13
    But is there a way to change it and keep it that way?
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    I mean you could go add serialization to it, but why? It's not used at runtime, and is only used when you press export..
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901

    Open the microsplat_scatter_func.txt and see if it has this code block in it:

    Code (CSharp):
    1. if (blend0 == 1)
    2.          {
    3.             a0.a = SAMPLE_TEXTURE2D_ARRAY_GRAD(_ScatterDiffuse, my_point_repeat_sampler, uv * scale0 + uvOffset, i0, dx * scale0 * 0.3, dy * scale0 * 3).a;
    4.          }
    5.          if (blend1 == 1)
    6.          {
    7.             a1.a = SAMPLE_TEXTURE2D_ARRAY_GRAD(_ScatterDiffuse, my_point_repeat_sampler, uv * scale1 + uvOffset, i1, dx * scale1 * 0.3, dy * scale1 * 3).a;
    8.          }
    9.          if (blend2 == 1)
    10.          {
    11.             a2.a = SAMPLE_TEXTURE2D_ARRAY_GRAD(_ScatterDiffuse, my_point_repeat_sampler, uv * scale2 + uvOffset, i2, dx * scale2 * 0.3, dy * scale2 * 3).a;
    12.          }
    If it does not, then you have an older version. I tried to check by downloading the latest from the store, but the package manager is not working at all for me right now, so I'm not sure if they are having server issues or what.. The package manager is such a disaster..
     
  5. ecfelts

    ecfelts

    Joined:
    Aug 7, 2017
    Posts:
    11

    Hmm...

    So I did an initial search for the text file and could not find it. ok. Frustrating, but I have been mucking about with the files in an effort to reinstall the add-on, so I go to the Package Manager to reinstall and it tells me that the text file is there but there is an update for it.

    ok. I install the update.

    I check the text file and the block of text that you showed me in your last response is there. Great.

    Then I test out the Scatter add-on in my project and get the same result. Sigh.

    Alright. So now I shut down unity, go back into the cache then delete everything again. Reopen Unity.

    Retest Scatter.

    Same artifacts.

    So I went through, confident in the belief that I now had the most current version of the scatter add on and my cache had gotten as clean as it was going to get, and checked the scatter using all of the compression, filter and mip map settings that I could think of on both the Config and the Texture settings and I just could not get the artifacts to go away.

    It would not even be so bad if they did not seem to replace with lower-res maps as the camera gets further away... What was a thin line at high res becomes a blobby mess when using lower resolution textures.

    Package Manager is still saying that I am using Scatter 3.791 and the block of code you sent me starts at line 230 of the text file that I am looking at (just to be 100% sure that we are looking at the same thing.)

    I totally have no idea what next steps might be in terms of getting scatter working properly.

    On the other hand, everything else that I have tried using on Microsplat seems to work so far. Sorry if it seems like I am just complaining, there is a ton of awesome stuff in microsplat. And thank you for taking the time to provide support, I am just having a problem with this particular add on.

    Let me know if you have any other thoughts or insights involving this issue.
    Thanks again for all of your help,
    --ecfelts
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    did you change an option on the shader to get it to regenerate with the new code?
     
  7. ecfelts

    ecfelts

    Joined:
    Aug 7, 2017
    Posts:
    11
    I was not aware of any such option.

    Where would I find this?
     
  8. ibernd

    ibernd

    Joined:
    Jun 24, 2019
    Posts:
    11
    Hello,

    I have a strange performance problem in a scene where trax was used. Although I remove all objects from the scene, the profiler (target: editor) shows a list of about 100 entries "RenderSingleCamera..Trax Camera" which causes low fps in the editor/game

    Screenshot 2021-05-07 093227.png

    I use the current Microsplat Collection + Trax + URP 2019 Support
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    Any time you change an option in the features section of MicroSplat it re-writes the shader code, that's what that pause is about- it's rewritten the code and reimports it. The function files aren't actually used directly, rather blocks of code that get copied into a generated shader file.

    I recently came across this with another user - you'll have to manually delete the extra cameras in the scene (they have hide flags set on them), and the bug which was leaking them was fixed and a patch pushed to the store.. It should be only 1 camera render.
     
  10. cpmullen

    cpmullen

    Joined:
    Apr 4, 2020
    Posts:
    13
    Ah, okay.
     
  11. Tayrtahn

    Tayrtahn

    Joined:
    May 18, 2013
    Posts:
    6
    Got a new bug with the Triplanar module. Unity version 2019.4.9f1 personal.

    I took a terrain with 3 textures (diffuse and heightmap only), and got it looking the way I want with heightmap blending. But when I enable set Triplanar Mode to Triplanar or Height Blended, the generated shader breaks with a bunch of shader errors:

    Shader error in 'TerrainBlend': 'PrepTriplanar': cannot implicitly convert from 'float3' to 'struct Config' at line 3155 (on d3d11)

    And the same error for a few different lines and for a hidden version of the shader.

    Any idea what's going on?
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    Most likely your version of core and triplanar are not sync'd from the same period. Clear your package manager cache, because the package manager is broken in most versions of Unity, and get latest of all your modules..
     
  13. leslviv

    leslviv

    Joined:
    Jun 22, 2019
    Posts:
    32
    Hi. Is MicroSplat - URP 2020 Support asset going to work with Unity 2021?
    Also, is there a way to slice a tessellated terrain onto many piece to get around the current URP Forward Renderer 8 lights per object limit?
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    Someone else had this issue - turns out the version of triplanar on the store as a single asset doesn't match the one in the terrain collection, so if you downloaded it as a single asset it would have an issue but not if you downloaded the terrain collection. Issued a patch for this, which should be out on monday. DM me if you need it sooner..
     
  15. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    157
    Hey,
    How does the dynamic snow work on terrain grass and trees ? I´ve seen no option for that in the videos. Will it work or is only the terrain covered ?
    Thanks !
     
  16. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    607
    Hello,

    I'm using HDRP 2020.3.4f1 LTS. I'm having a couple of bugs.

    The first is my terrain keeps changing how it looks when I play the game until I turn the microsplat component off/on or the terrain off/on. I can't tell if its messing up the global UVs, or something else. This also happens sometimes (maybe always?) when I save the scene. It _seems_ to be okay when I build, but I haven't tested enough to know if there will be times when its not.

    The second is I get errors when enabling POM and the terrain turns completely white (or invisible, might be seeing the bottom of the skybox). I have a flat terrain, its being used in a tile-based game. Its an x-com style view, so in theory, I should be able to get a much crisper extrusion without requiring the performance of high tessellation values. I don't actually know what your POM will look like, so its hard to tell, but the built in HDRP POM looks better than the tessellation for me at this viewing angle (barring absurdly high levels of tessellation I guess), so it would be nice to have that option here, especially so if its more performant.
     

    Attached Files:

  17. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    You'd have to texture the objects with a shader that responds to snow, such as BetterLit, or if you own the mesh workflow module it can output a general object shader for rocks and stuff.

    Unity broke terrains in 2020.3LTS:

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

    Most likely your modules are out of sync, because the package manager is broken in most versions of Unity, and keeps giving you old versions of packages and showing that you have the latest. Unity has decided to not publicize this issue and instead frustrate users and dump all the support it requires onto asset store publishers. To work around it, manually delete the asset store cache folder and update everything. If you still get the error after that let me know what's in your keyword file and I'll see if I can repro it.
     
  18. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    607
    Okay. Just confirming. POM _should_ be working in HDRP 2020 LTS, correct?

    Thanks!
     
  19. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    607
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    DGordon likes this.
  21. Tayrtahn

    Tayrtahn

    Joined:
    May 18, 2013
    Posts:
    6
    Thanks, that fixed the problem for me!
     
  22. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    607
    Thanks so much for fixing the POM issue. Super fast, I thought I'd need to wait on that ... didn't expect you just went in and fixed it and pushed right away!
     
  23. leslviv

    leslviv

    Joined:
    Jun 22, 2019
    Posts:
    32
    Any info please?
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    is unity going to break comparability or not? Your guess is as good as anyone’s.
     
  25. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    21
    Hello, first of all, amazing assets, will make my game infinitely better!
    My issue: When using Trax with Enviro I get some errors when entering playmode, things works fine in editor and playmode even with the errors. But when building I get the same errors and the build does not complete. The only thing I found is someone saying on Enviro discord that I need to make Trax extra camera use a different renderer other than Enviro Default one.
    I do have the Envrio Third Party support for Microsplat enabled, but it controls snow , seasons etc, there is nothing there about Trax.
    Using URP10.x
    Unity 2020.3.2f1
    Any Help would be appreciated, thanks!

    EDIT:
    Hendrik from Enviro gave me a workaround, the steps to make it work are:
    1- set up another URP Forward Renderer in high, mid and low URP settings
    2- Make it the default one
    3- Change in the main camera To use the Enviro renderer.


    Now there are no more errors in the Editor when entering playmode, But , I have these new shader errors when making a build:

    Code (CSharp):
    1. Shader error in 'Hidden/MicroSplat/RenderHeight': 'UnitySetupInstanceID': no matching 1 parameter function at line 30 (on d3d11)
    2.  
    3. Compiling Vertex program with STEREO_INSTANCING_ON
    4. 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_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
    5. Disabled keywords: 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_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30
    6.  
    7. AND
    8.  
    9. Shader error in 'Hidden/MicroSplat/RenderHeight': invalid subscript 'instanceID' at line 30 (on d3d11)
    Also if I remove Trax, the build works fine, with all the other microsplat features working also.
    Anyway, any help would be appreciated , thanks

    Enviro Errors before workaround: (All 3 are the same just change this line: Assets/MicroSplat/Trax/Scripts/TraxManager.cs:145 ...147.....149)
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. EnviroSky.RenderWeatherMap () (at Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSky.cs:981)
    3. EnviroSky.RenderCloudMaps () (at Assets/Enviro - Sky and Weather/Enviro Standard/Scripts/EnviroSky.cs:1002)
    4. UnityEngine.Rendering.LWRP.EnviroBlitPassVolumeClouds.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Assets/Enviro - Sky and Weather/Enviro Standard/URP Support/Scripts/EnviroBlitPassVolumeClouds.cs:534)
    5. UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.ScriptableRenderPass renderPass, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@10.4.0/Runtime/ScriptableRenderer.cs:726)
    6. UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteBlock (System.Int32 blockIndex, UnityEngine.Rendering.Universal.ScriptableRenderer+RenderBlocks& renderBlocks, UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData, System.Boolean submit) (at Library/PackageCache/com.unity.render-pipelines.universal@10.4.0/Runtime/ScriptableRenderer.cs:700)
    7. UnityEngine.Rendering.Universal.ScriptableRenderer.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@10.4.0/Runtime/ScriptableRenderer.cs:556)
    8. UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData cameraData, System.Boolean anyPostProcessingEnabled) (at Library/PackageCache/com.unity.render-pipelines.universal@10.4.0/Runtime/UniversalRenderPipeline.cs:385)
    9. UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at Library/PackageCache/com.unity.render-pipelines.universal@10.4.0/Runtime/UniversalRenderPipeline.cs:514)
    10. UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Camera[] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@10.4.0/Runtime/UniversalRenderPipeline.cs:241)
    11. UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[] cameras) (at <10564ed154d647e194bef4aef8878649>:0)
    12. UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <10564ed154d647e194bef4aef8878649>:0)
    13. UnityEngine.Camera:Render()
    14. JBooth.MicroSplat.TraxManager:Setup() (at Assets/MicroSplat/Trax/Scripts/TraxManager.cs:145)
    15. JBooth.MicroSplat.TraxManager:OnEnable() (at Assets/MicroSplat/Trax/Scripts/TraxManager.cs:236)
     
    Last edited: May 12, 2021
  26. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    161
    @jbooth Hi Sir whenever I tried to get into playmode , I get a console error
    'Exception thrown while invoking [DidReload] script method 'Jbooth.microsplat.renderpipelinedefine:eek:nScriptReloaded(): TimeoutExcept: the operation has timed out.
    I'm using Unity 2019.4 built-in pipeline building for Android vulkan. It does happen Everytime whenever I hit play button or not even using microsplat in a new scene. It creates laggy experience. Thank you
     
  27. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    You could try changing the timeout in the RenderPipelineDefine script - I just raised it from 1000 to 10000 myself. Or in your case, since your on built in, you could even delete that script.
     
  28. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    161
    Thank you sir. I will try deleting that script and let you know.

    [Edited] Hi I've deleted that script and everything works. Thank you sir.
     
    Last edited: May 12, 2021
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    That shader isn't even used anymore, so you can just delete it..
     
  30. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    21
    It worked! Thank you Sir!
     
  31. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,896
    Since someone on discord had the same problem recently, here's an important information about Trax: If you use LODs, then the last LOD is being used. So if the LOD is culled, you won't see any tracks. Just duplicate one of the horse LODs instead of the culled and set its layer to be the one to render in trax instead of the actual horse.

    Example with Horse Animset Pro:

    lod 1.jpg
    This will not give you any tracks. For the player's horse I tend to remove all LODs. In that example right click on LOD 1 and click delete, then drag the right edge of LOD 0 up to the right end.

    trax.jpg
     
    Last edited: May 13, 2021
  32. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    67
    I'm getting shader errors on build (Unity 2019.4.9f1, URP 7.4.3)
    Any idea how to fix or temporarily disable the shader? In desperation I tried hacking out the offending lines hoping it would only break this shader, but that causes ALL rendering to fail so I just get a white screen and music.

    Example of the offending lines:

    Code (CSharp):
    1.             #ifdef GPU_FRUSTUM_ON
    2.                GetObjectToWorldMatrix() = VisibleShaderDataBuffer[unity_InstanceID].PositionMatrix;
    3.                GetWorldToObjectMatrix() = VisibleShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
    4.             #else
    5.                GetObjectToWorldMatrix() = IndirectShaderDataBuffer[unity_InstanceID].PositionMatrix;
    6.                GetWorldToObjectMatrix() = IndirectShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
    7.             #endif
    upload_2021-5-13_9-6-22.png
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901

    Delete the package manager cache, update to latest, regenerate the shader by changing an option on it.
     
    Chris_Payne_QS likes this.
  34. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    67
    Not sure if it was the upgrades or my previous attempts to disable the offending shader, but I'm now getting no build errors, but nothing rendering in the final build - not even UI, just a white window accompanied by the game music.
     
  35. Funonium

    Funonium

    Joined:
    Aug 7, 2019
    Posts:
    5
    I am using MicroSplat with runtime generated terrains and I ran into an exception in MicroSplatTerrain.Sync() due to keywordSO being null. I have worked around it by doing this:
    Code (CSharp):
    1. var microSplatTerrain = terrainInfo.TerrainReference.gameObject.AddComponent<MicroSplatTerrain>();
    2. microSplatTerrain.keywordSO = new MicroSplatKeywords();
    In looking at the the code that sets this variable, it seems to be a lot of editor based stuff. Do you have any suggestions for properly setting this using the material keywords at runtime? Is it pretty much just trying to reproduce what the editor code in MicroSplat does, or is there a better way?
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    Every MicroSplat material/shader has a keywords file associated with it (by name). This holds the options for how the shader is compile (what features are on, etc). So this needs to be set on the component because in some cases it needs to know what features the shader is using. You should not create a new blank one..
     
    Funonium likes this.
  37. Funonium

    Funonium

    Joined:
    Aug 7, 2019
    Posts:
    5
    I feel like I just had a brain-fart. Is it as simple as exposing a MicroSplatKeywords property in the inspector, assigning the _keywords asset, then using that instead? Seems to work fine, but I notice no difference versus my previous code, so I wanted to confirm that this does what needs to be done.
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    It's already exposed in the debug section. Your previous code might work fine if you aren't using a feature that the terrain component needs to know about..
     
  39. Funonium

    Funonium

    Joined:
    Aug 7, 2019
    Posts:
    5
    Sorry, I meant exposing a variable in MY script that adds the MicroSplatTerrain component, like this:
    Code (CSharp):
    1. public class MicroSplatStreamingTileInitializer : MonoBehaviour
    2. {
    3.     public Material MicroSplatMaterial; // Assign material asset
    4.     public MicroSplatKeywords MaterialKeywords; // Assign *_keywords asset
    5.  
    6.     private void Start()
    7.     {
    8.         var microSplatTerrain = gameObject.AddComponent<MicroSplatTerrain>();
    9.         microSplatTerrain.keywordSO = MaterialKeywords;
    10.         microSplatTerrain.templateMaterial = MicroSplatMaterial;
    11.         microSplatTerrain.Sync();
    12.     }
    13. }
     
    jbooth likes this.
  40. Sisay

    Sisay

    Joined:
    Dec 6, 2012
    Posts:
    23
  41. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    52
    Hello, I am trying procedural texturing in URP 11 (2021.1) (installed URP 2020 module), this is what I have got after texturing
    upload_2021-5-14_21-52-40.png

    This is what it became after I baked the texture, it looks very different, at least the sand layer is missing.
    upload_2021-5-14_21-54-22.png

    You mentioned in the doc that the texturing will not be exactly the same because of the splatmap resolution, but how to set it? this is terrain setting. Thank you.

    upload_2021-5-14_21-56-11.png
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    Yes, though that doesn't look like a splat map resolution issue. Render Baking is kinda new for SRPs, I only got it working in URP last week, and it doesn't work at all in HDRP yet, so it's possibly an issue there.
     
  43. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
  44. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    52
    Thanks for the information. Just wondering do you have a schedule for the update release?

    Also, sometimes I found that the whole terrain will be darkened or magenta-ed (missing material), it happens when I change some parameters in the inspector or save the scene. But when I click Play, it becomes normal again. Hopefully it will be resolved together.
     
  45. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    459
    I finally had time to look into the root cause of issue I'm having with Single Pass Instanced rending mode and MicroSplat.

    It looks like just ticking "Draw instanced" on the terrain causes the terrain the have repeated holes (rectangles) in it. I'm surprised that no one else is complaining about this issue.

    Any idea as to what the resolution could be? I have to use "Draw Instanced" for my terrain as there is a significant load time boost when its used.
     
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    That's a Unity bug which has been plaguing everyone since 2020.3LTS was released. A fix is apparently coming in one of the future point releases.

    Draw Instance affects CPU usage, not load times. That said I haven't heard of anyone having this issue before, though it sounds familiar to draw instancing bugs I saw and fixed when porting MicroSplat to Better Lit's shader structure a few months back, though I can't imagine why they would only happen in one rendering mode and not all rendering modes..
     
  47. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    459
    It actually affects both CPU and load times
    https://blogs.unity3d.com/cn/2018/10/10/2018-3-terrain-update-getting-started/

    I've noticed that some shaders that I've upgraded myself have had various issues when going to Single Pass Instanced. From GrabPass requiring array textures to transparency modes needing adjusting, etc.

    Not sure if any of this helps asI don't know much about terrains, but the rectangles seem to be at regular intervals, like they are corners for tiles. adjusting the pixel error field of the terrain seems to move them a bit.
     
  48. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    52
    Sorry I suppose you mean the darkening of the terrain is a unity bug, while the render baking after procedural texturing for URP, you will release an update on the Microsplat module am I correct? I can still live with the dark terrain at the moment, but render baking is more of an issue as I am thinking other alternatives other than Microsplat if it is not going to be resolved in the near future....
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,901
    Render Baking is part of MicroSplat, yes.
     
  50. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    52
    Thanks, so there will be an microsplat update release to fix the render baking for URP? any schedule?
     
unityunity