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

    ecfelts

    Joined:
    Aug 7, 2017
    Posts:
    11
    Hello,

    I have recently purchased the microsplat package and am trying to get all of its modules to work.

    I am not able to get the Streams add-on to do anything.

    I have brought a microsplat emitter into my scene.

    I have set the emitter type to Lava.

    I have opened the Microsplat Terrain FX Painter dialog window.

    I have a terrain object selected.

    I am getting a warning message in the Microsplat Terrain FX Painter dialog window saying that I need for Streams or Lava or whatever to be enabled on my terrain to begin.

    I do not see anywhere to enable streams or lava on the terrain.

    I do see a place to enable them on the microsplat material, so I have.

    There is a toggle in the upper right of the Microsplat Terrain FX Painter dialog window labeled "Active(ESC)" I have tried working with this turned on and off. It does not seem to make any difference.

    I am getting nothing happening so far.

    The fill and clear buttons seem to work ok.

    I expect that I am missing something very basic, but no matter how many times I watch the demo video or read the manual I cannot tell what I might be missing.

    Attached are shots of the Microsplat Terrain FX Painter dialog and the Streams block of the microsplat material.

    If anyone can see what I am doing wrong with the information that I have provided, please let me know.

    If you need more information in order to be able to help, let me know what you need and I will get it for you.

    Thanks in advance,
    ecfelts.

    upload_2021-4-23_18-34-39.png

    upload_2021-4-23_18-35-28.png
     
  2. Rujash

    Rujash

    Joined:
    Jan 3, 2014
    Posts:
    37
    I'm having a hard time finding what render pipeline I should be using with this asset, in which Unity versions. I bought the Ultimate bundle pack but see support for URP and HDRP are purchase-only. I don't want to ask for support using those unless I bought that, so I'm wondering what pipeline and LTS versions are compatible?

    Currently considering 2020.3 and 2019.4 LTS
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The built in render pipeline is supported across all unity versions from 2018.4 up. URP and HDRP require the correct adapter, and while they may work on non-LTS versions, I only officially support the LTS versions of Unity with the matched adapter.
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Emitters are only for dynamic streams/lava which is likely not what you want if you are trying to paint flows. To debug the painting, I'd turn the flow all the way up and set the target value to 1 and paint, as that should make it appear immediately. If fill works, then your material is setup correctly for painting. If it doesn't paint for some reason, press save on the painter and see if the texture written to the MicroSplatData directory with the _streams extension shows data or not. Lava is stored in the alpha channel, so you'll have to look in there (or paint streams which are stored in B).
     
  5. ecfelts

    ecfelts

    Joined:
    Aug 7, 2017
    Posts:
    11
    The Curse of Bad Settings.

    Thanks a lot for the help..!! That totally pointed me in the right direction.
     
  6. KitBarry1809

    KitBarry1809

    Joined:
    Jun 27, 2018
    Posts:
    34
    Unity 2019.4, latest versions of microsplat & digger. Tessellation upsets the Digger Integration. It's not a problem with Digger. When Tessellation is on, the digger meshes are out by -0.22 in y. See pics for hole is fine without tessellation, and hole is obviously not joined up to terrain with tessellation turned on. Documentation doesn't say the two options are incompatible.
     

    Attached Files:

  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There currently isn't a way to dampen the tessellation in the area of the blend, so it won't quite add up. The plan was to have digger add some mesh data to do this, but currently that data isn't present.
     
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,358
    Hi Jason,

    I have one user of my sky system in URP and i use a custom forward renderer feature for volumetric clouds, which the user say creates some slow down when combined with Microsplat URP. I would like to ask if the system uses any URP renderer features that might be affecting the performance.

    Thank you in advance for any insight on this.
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    no, it’s just a shader in most cases, and trax/streams and such are handled in a pipeline agnostic way. Likely your user just doesn’t understand what the actual bottleneck he’s hitting is and it has nothing related to any interaction between our assets.
     
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,358
    Thanks a lot for the heads up, i think the same as well, hopefully can figure it out soon.
     
  11. Independent-Arts-Software-GmbH

    Independent-Arts-Software-GmbH

    Joined:
    Feb 7, 2014
    Posts:
    15
    Hi @jbooth

    We have some trouble to compile the TerrainObjectBlend shader to Switch/XBox/PS4.

    We are Using:
    ------------------------------------------------
    Unity 2020.3.3f1
    Unitversal RP 10.4.0
    MicroSplat 3.793
    - Anti-Tiling Module 3.77
    - Terrain Blending 3.76
    - Texture Clusters 3.7
    - Triplanar UVs 3.7
    - URP 2020 Support 3.771

    The error log´s shows the following:

    ------------------------------------------------
    XboxOne
    ------------------------------------------------
    Shader error in 'MicroSplat/Terrain_0_0_360a2d71-da22-4637-93fb-8d64d03df120_TerrainObjectBlend': l-value specifies const object at line 5688 (on xboxone)

    Compiling Vertex program with FOG_LINEAR PROCEDURAL_INSTANCING_ON _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _SHADOWS_SOFT _ADDITIONAL_OFF GPU_FRUSTUM_ON _ALPHATEST_ON
    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 UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    Disabled keywords: DOTS_INSTANCING_ON _SCREEN_SPACE_OCCLUSION LIGHTMAP_ON DIRLIGHTMAP_COMBINED _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS
    LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK FOG_EXP FOG_EXP2 INSTANCING_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_COLORSPACE_GAMMA 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

    ...

    ------------------------------------------------
    Switch
    ------------------------------------------------
    Shader error in 'MicroSplat/Terrain_0_0_360a2d71-da22-4637-93fb-8d64d03df120_TerrainObjectBlend': Vertex program 'Vert': HLSL Compilation failed.
    at {}(106) (on switch)

    Compiling Vertex program with FOG_LINEAR PROCEDURAL_INSTANCING_ON _MAIN_LIGHT_SHADOWS _SHADOWS_SOFT _MAIN_LIGHT_SHADOWS_CASCADE _ADDITIONAL_OFF
    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 UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
    Disabled keywords: DOTS_INSTANCING_ON _SCREEN_SPACE_OCCLUSION LIGHTMAP_ON DIRLIGHTMAP_COMBINED _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS
    LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK GPU_FRUSTUM_ON FOG_EXP FOG_EXP2 INSTANCING_ON _ALPHATEST_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_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

    Shader error in 'MicroSplat/Terrain_0_0_360a2d71-da22-4637-93fb-8d64d03df120_TerrainObjectBlend': l-value specifies const object at {}(5696) (on switch)

    ...

    ------------------------------------------------
    Playstation 4
    ------------------------------------------------
    Shader error in 'MicroSplat/Terrain_0_0_360a2d71-da22-4637-93fb-8d64d03df120_TerrainObjectBlend': Program 'Frag', invalid l-value: can't assign to this expression at line 5688 (on ps4)

    Compiling Fragment program with FOG_LINEAR PROCEDURAL_INSTANCING_ON _MAIN_LIGHT_SHADOWS _SHADOWS_SOFT _MAIN_LIGHT_SHADOWS_CASCADE _ADDITIONAL_OFF GPU_FRUSTUM_ON _ALPHATEST_ON
    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 UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
    Disabled keywords: DOTS_INSTANCING_ON _SCREEN_SPACE_OCCLUSION LIGHTMAP_ON DIRLIGHTMAP_COMBINED _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK FOG_EXP FOG_EXP2 INSTANCING_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_COLORSPACE_GAMMA 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

    Shader error in 'MicroSplat/Terrain_0_0_360a2d71-da22-4637-93fb-8d64d03df120_TerrainObjectBlend': Program 'Vert', invalid l-value: can't assign to this expression at line 5688 (on ps4)

    ...

    Is this an known error or do we something wrong ?

    Greetz
    Joerg
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    unfortunately there’s no way for asset publishers to test on these platforms as we don’t have access to them. If you can isolate the code that is causing the issue I might be able to help, but from the errors alone I have no clue.
     
  13. Independent-Arts-Software-GmbH

    Independent-Arts-Software-GmbH

    Joined:
    Feb 7, 2014
    Posts:
    15
    Hi @jbooth

    you dont need "special assets" .... this also appears, if i use an empty project, install the microsplat and required modules (terrainblending/uwp2020 support) mark the terrainObject Blend sample scene for Build, and try to build for the mentioned platforms. This Demo scene also reports that errors .... and i have not much knowledge about shaders to tear the error down to the corresponding source line :(

    Greetz
    Joerg
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I can't build for PS4 without a PS4 sdk and license, same for switch and XBox/switch. Unity doesn't provide a way for us to test out assets with these platforms, you have to have a license with the platform holder..
     
  15. Independent-Arts-Software-GmbH

    Independent-Arts-Software-GmbH

    Joined:
    Feb 7, 2014
    Posts:
    15
    Oh i see .... :(

    So i tested it on an PC-Standalone build. And it seems, half of the error also occur here. If i build it for PC, the "Editor.log" file says no error on Compiling the Shader.

    Code (CSharp):
    1. Compiled shader 'Terrain_TerrainObjectBlend' in 11.59s
    2.     d3d11 (total internal programs: 136, unique: 136)
    But after build the exe and go to "...\Assets\MicroSplat\TerrainBlending\Example\MicroSplatData\MicroSplat_TerrainObjectBlend.shader" and look into the Inspector, 4 Errors are reported for that shader

    "l-value specifies const object D3D in 3898,3901,12600,12603"

    I dont know if it is correct, but for me it looks like that these "errors" are internally handled as "warning" on PC-Side But still goes on with compiling and at last success. While on the other platforms it is handled as error and stops compiling.

    Greetz
    Joerg
     
  16. Independent-Arts-Software-GmbH

    Independent-Arts-Software-GmbH

    Joined:
    Feb 7, 2014
    Posts:
    15
    It seems, i found the reason of compilation errors.

    First, you define 2 functions in microsplat_template_shared.txt
    Code (CSharp):
    1.                float4x4 GetWorldToObjectMatrix() { return unity_WorldToObject; }
    2.                float4x4 GetObjectToWorldMatrix() { return unity_ObjectToWorld; }
    Than, in UnityURP2020RenderLoopAdapter.cs you are replacing Unity variables through the new functions
    Code (CSharp):
    1.          shader = shader.Replace("unity_ObjectToWorld", "GetObjectToWorldMatrix()");
    2.          shader = shader.Replace("unity_WorldToObject", "GetWorldToObjectMatrix()");
    But the microsplat_terrainblend_body.txt trys to set the unity variables
    (which failes while they are replaced with the new defined get-functions. This causes the l-value error)
    Code (CSharp):
    1.       void setupScale()
    2.       {
    3.          #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED
    4.             #ifdef GPU_FRUSTUM_ON
    5.                unity_ObjectToWorld = VisibleShaderDataBuffer[unity_InstanceID].PositionMatrix;
    6.                unity_WorldToObject = VisibleShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
    7.             #else
    8.                set_unity_ObjectToWorld = IndirectShaderDataBuffer[unity_InstanceID].PositionMatrix;
    9.                unity_WorldToObject = IndirectShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
    10.             #endif
    11.  
    12.             #ifdef FAR_CULL_ON_PROCEDURAL_INSTANCING
    13.                #define transformPosition mul(unity_ObjectToWorld, float4(0,0,0,1)).xyz
    14.                   #define distanceToCamera length(transformPosition - _WorldSpaceCameraPos.xyz)
    15.                      float cull = 1.0 - saturate((distanceToCamera - _CullFarStart) / _CullFarDistance);
    16.                      unity_ObjectToWorld = mul(unity_ObjectToWorld, float4x4(cull, 0, 0, 0, 0, cull, 0, 0, 0, 0, cull, 0, 0, 0, 0, 1));
    17.                   #undef transformPosition
    18.                #undef distanceToCamera
    19.             #endif
    20.          #endif
    21.       }
    22.  
    23.       void setup()
    24.       {
    25.          #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED
    26.             #ifdef GPU_FRUSTUM_ON
    27.                unity_ObjectToWorld = VisibleShaderDataBuffer[unity_InstanceID].PositionMatrix;
    28.                unity_WorldToObject = VisibleShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
    29.             #else
    30.                unity_ObjectToWorld = IndirectShaderDataBuffer[unity_InstanceID].PositionMatrix;
    31.                unity_WorldToObject = IndirectShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
    32.             #endif
    33.          #endif
    34.       }

    Greetz,
    Joerg
     
  17. kopanz

    kopanz

    Joined:
    Dec 6, 2016
    Posts:
    82
    I have a very big open world map with multiple tiles as big as 87km^2. I want to have the satellite image on the terrain when you are very far from the terrain instead of splatmaps. Is such a thing is possible with Microsplat ? I mean just using a single diffuse texture when you are very far from the terrain and changing it with proper splatmaps when you come close.

    Thank you in advance
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The global texturing module allows this.
     
    kopanz likes this.
  19. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Thank you Jason for all of your hard work. Im using MicroSplat in Unity 2019.4 no problem and love it

    Today when I opened my project, and even my older backups, suddenly when I zoom out my MicroSplat terrain it turns white as I zoom. This happens even with a new terrain using my Microsplat material.

    Screen Shot 2021-04-28 at 12.20.50 AM.png Screen Shot 2021-04-28 at 12.20.38 AM.png Screen Shot 2021-04-28 at 12.20.44 AM.png

    Whats strange is this wasn't happening last week in this same editor. Its like maybe I installed an asset or something that made a global change to some editor setting (I had installed and removed incontrol), and now even backups are affected. Or I was in the graphics settings and disabled the deferred shader generators because I don't use them.

    I notice my microsplat material shows these jagged white triangles instead of a smooth material like it used to. This looks like the effect I se on the terrain. And I think I saw somewhere a Hidden/microsplat shader with the same name as my main shader with some numbers appended.

    Screen Shot 2021-04-28 at 12.28.27 AM.png Screen Shot 2021-04-28 at 12.37.04 AM.png
    Could a hidden microsplat shader be corrupt and is overwriting the main shader, because all the micrsplat shaders in the project folder (demo etc) show this same white triangle glitch. Are hidden shaders in unity global and app to every project opened in particular version of an editor, or are hidden shaders per project?

    If I open a backup made in an earlier editor version (2019.2) the issue isn't there. But it wasn't there in unity 2019.4 until today leading me to believe its some kind of universal editor setting I changed.

    Do you have any ideas?
     
  20. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    Regarding my previous post, here’s a gif that shows what’s happening in case it helps

    AF55C3D9-0D97-4D7B-9326-5CA608A9FBA7.gif
     
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Turn your quality settings back to full and press update on your arrays- when Unity reduces texture sizes, it reports the wrong number of mips when packing the textures, so the last mip ends up white.
     
    protopop likes this.
  22. tanoccb

    tanoccb

    Joined:
    Feb 16, 2020
    Posts:
    4
    Hi. Awesome asset, congratulations. I'm about to purchase the full bundle but have a question: could this be used directly on triangle meshes without any Unity Terrain in the scene? I'm generating Terrain from some perlin noise algorithms + marching cubes polygonization and i'd love to use the Microsplat bundle. I've read that I can use all of the features with the mesh terrains module but i'm no sure If It can be applied directly on a mesh without any kind of the Unity Terrain involved.

    Thanks!
     
  23. tanoccb

    tanoccb

    Joined:
    Feb 16, 2020
    Posts:
    4
    Does the mesh workflow module enables the use of all of the others modules on the mesh with the mesh workflow applied? Is there any restriction? Thanks!
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There are a few, as some effects, like dynamic stream emitters and terrain blending, that require a height field.
     
  25. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    That fixed it - thank you so much, and its very helpful to know about the mips maps.
     
  26. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    I recently changed my VR project from Single Pass to Single Pass Instancing to reduce draw calls. I noticed that my Microsplat terrain has repeated rectangle holes in it. Is there away to get this corrected?
     

    Attached Files:

    Last edited: Apr 28, 2021
  27. tanoccb

    tanoccb

    Joined:
    Feb 16, 2020
    Posts:
    4
    Thank you very much. Is there a way to provide to those modules the height field? I don't know about unity terrain system and the way it handles the height data, but i'm generating that height values from fractals, perlin noise powered, and i'd love to know if this data could be injected to your Microsplat modules. Thanks in advance!
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    None of that should be enabled unless you are using procedural instancing to draw the objects though, so seems odd that it would error. I should remove this code though, it's not used anymore and was for Vegetation Studio instancing, which doesn't work with terrain blending.

    Also note that the functions for GetWorldToObjectMatrix, etc, are only defined in the Standard pipeline, not in URP, so that shouldn't be compiled in that pipeline either. (The standard pipeline does not have these functions normally, as they are SRP syntax).
     
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    yeah. It’s stored in textures and can be set on the component.
     
  30. MarcopoloR

    MarcopoloR

    Joined:
    Feb 4, 2015
    Posts:
    114
    Hi, I just got your HDRP support pack for Unity 2020 and I cannot get it to work. I am using 2020.2.7f1 and when I open your package there is no installation package to click on to install it, and in the example scene the shaders are all pink. I looked at the PDF directions and read about how once it is installed it will ask you what render loop you want, problem is I don't know how to install it and there are no directions for that. I did notice on the store page where it shows the contents that there is a script called Unity2020RenderLoopAdapter.cs, where in my download it showed a folder titled "HDRP2020" with a bunch of scripts, none of which appeared to be the adapter look script. Please help clarify how to install this thing thanks.

    One more thing, I just tried running it now and I get an error on the MicroSplatVertexMesh and the MicroSplatMesh script that says "AppliedShareData" does not exist in the current context".
     
  31. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    First, you are in a tech release of Unity, and the adapters are only supported on LTS releases. Second, there is no install, once you download from the asset store you should have a render loop setting on materials which you can set to HDRP2020, which will cause the code to regenerate as an HDRP2020.3LTS compatible shader.
     
  32. Sheppard_25

    Sheppard_25

    Joined:
    Jan 9, 2013
    Posts:
    10
    hi, is it possible to achieve this texture blending using microsplat? do i need any special module?
    as you can see in the image, there are like 2 layers, but they seem to blend like one on top of each other, like at "differentes heights", not at the same level.
    left side is shaders settings hight quality / right side low quality in graphics settings.
    its a picture from age of empires 3 DE.
    i think the terrain is just plain there, otherwise the resolution would be really high, and would need to have several terrain per graphics settings.

    EDIT: its not shadows settings, its shaders settings(high/low) in the picture.

    thank you.
     

    Attached Files:

  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    By default, MicroSplat is a height blending shader, which I think is what your asking for..
     
  34. Sheppard_25

    Sheppard_25

    Joined:
    Jan 9, 2013
    Posts:
    10
    thanks for your answer, the thing is i've trying to do that with the core module, i've tried all settings under per-texture properties, and i can't figure out how to do it, can u be a little more specific?.
    i am a programmer, so my knowledge about shaders is low.

    thank you again.
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    If it's set to height blending mode (default), then it uses the height maps you provide to resolve the blend, with the interpolation contrast setting controlling how quick that blend is between textures.
     
  36. Sheppard_25

    Sheppard_25

    Joined:
    Jan 9, 2013
    Posts:
    10
    yeah i know that, the thing is i think that in the picture i uploaded, the terrain (height map) is just plain, and the "contrast" is just made via shader, like having +1 normal strenght for one, and "negative" strenght or something like that for the other one.

    anyway, thanks for your time.:)
     
  37. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    Is there support for Single Pass Instanced?
     
    Last edited: May 1, 2021
  38. cpmullen

    cpmullen

    Joined:
    Apr 4, 2020
    Posts:
    14
    Okay, @jbooth, thank you for the help, but I have another problem. When I convert my terrain to Microsplat, (see the picture, "Microsplat terrain error 1") the texture size goes down from what it was at before I converted it to Microsplat. So I turn it up to the max size. But when I do, my terrain turns black (see the picture, "Microsplat terrain error 2") and I also get these errors: (see the picture, "Microsplat terrain error console after 2") If you could help me, that would be great.
     

    Attached Files:

  39. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The black terrain is a unity bug:

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

    same for the error your getting, which is fixed in more recent patches.
     
  40. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    This is my third post regarding this, it would be nice to be at least acknowledged as I have a legitimate issue.
     
  41. ecfelts

    ecfelts

    Joined:
    Aug 7, 2017
    Posts:
    11
    Hello again.

    I am trying to get the Scatter Module to work.

    I am getting the Scatter to mostly work, but I am getting an outline of my pattern before seeing the scatter texture reveal itself.

    I am using the single-layer scatter option.

    My texture is 4k. I thought maybe by upping the resolution maybe I could set the seam small enough that it might not be noticeable...

    If you look at the attached image, you can see that the edge of the alpha is not antialiased. Just an abrupt transition from one value to the next.

    And if you look at my texture settings, you can see that I have turned off anything like mipmapping or compression...

    Is there anything that I am missing? What should I check next to try and resolve these artifacts..?

    Thanks in advance,
    ecfelts

    upload_2021-5-3_22-38-55.png
    upload_2021-5-3_22-34-8.png

    upload_2021-5-3_22-33-3.png
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Update, I pushed a fix to this a week ago or so.. (Note, package manager is broken in most versions of Unity, so you have to manually clear the package manager cache).

    Yeah, should work..
     
  43. ecfelts

    ecfelts

    Joined:
    Aug 7, 2017
    Posts:
    11
    @jbooth,

    Thank you for getting back to me so quickly... Unfortunately, even after clearing out the cache, removing the scatter script and the associated text files, and reinstalling the scatter add-on I saw no change in the product behaviour...

    So, I had our IT guy do the same thing on our project server, then I did a git pull of the project. It shouldn't make a difference, I know, but I like to think that I have tried everything.

    But I am still seeing the same artifacts as before.

    If it means anything, the artifacts seem to increase in resolution as I move the camera in on them and go away completely once I get super close. (shots are attached...)

    I have tried looking at everything to make sure that all settings for things like compression, mip map generation or filtering have been set to "off".

    I am not sure what else I can try.

    Do you have any thoughts or suggestions..?

    Thank you again for your time,
    ecfelts

    upload_2021-5-4_18-3-25.png upload_2021-5-4_18-5-42.png
     
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This is exactly the bug I fixed. Does it happen on the demo scene?
     
  45. cpmullen

    cpmullen

    Joined:
    Apr 4, 2020
    Posts:
    14
    So, the bug does seem to fix by its self, so thank you for the link. Also, in the Render baking tab, I cannot change the res on it. Look at the picture, "res before change (to what I want it to be)", then "res after change (also to what I want it to be)", then "res after change in play mode". Why does it do that? Also, I can take a video if you want.
     

    Attached Files:

  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It's not serialized, since it doesn't need to be.
     
  47. 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
     
  48. cpmullen

    cpmullen

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

    jbooth

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

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461

    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..
     
Thread Status:
Not open for further replies.