Search Unity

  1. New Unity Live Help updates. Check them out here!

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

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Well, if you download it in 2019.2 then you get a different version than when you download it in 2019.3.. Unlike the rest of MicroSplat, for SRP I have to upload one version for each version of Unity, which is pretty annoying..

    It also might be that the shader in the examples didn't get recompiled in 2019.3 and changing an option on it will fix it.
     
  2. philwinkel

    philwinkel

    Joined:
    Jun 6, 2013
    Posts:
    313
    I see errors similar to Blarghle on win10, dx11 , i7 5960x , gtx titan x, unity 2019.3.2f1 , latest microsplat & latest lwrp/urp module (updated them all today). I see those 2 errors immediately upon opening any scene containing microsplat.

    ive gone as far as to delete microsplat from my project, delete all the microsplat unity packages from my computer, redownload / reimport microsplat (to ensure i have latest versions of microsplat and lwrp/urp module) - but i'm still seeing these errors.

    In the CoreLD demo scene microsplat appears to be rendering despite the errors. However in my scene the terrain is invisible, and i haven't had much luck getting microsplat to work. When I put the microsplat terrain component on a terrain and hit "convert to microsplat" the terrain becomes invisible. I've tried fiddling with various settings and switching back and forth from surface shader / LD, but i cant seem to fix the invisible terrain in my scene on windows.

    On mac OSX catalina with AMD vega 64 running Metal, things seem to be working fine - i am not seeing those errors. I do see some spammy messages about 'duplicate basemap name MainTex' , but those are only warnings (not errors) and everything is working OK otherwise.

    these are the errors i see on windows/dx11, they seem similar/identical to Blarghles issue:
    I am able to reproduce these errors on win10 / dx11 / unity 2019.3.2f1 by creating a new empty project based on the URP template, import microsplat, import microsplat lwrp/urp module, then open CoreLD demo scene (or any scene containing microsplat)
     
    Last edited: Feb 25, 2020
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Ok, I'll try updating to 2019.3.2f1 - what version of the URP module are you using?
     
  4. philwinkel

    philwinkel

    Joined:
    Jun 6, 2013
    Posts:
    313
    Microsplat URP Module is 3.13 from Feb 13, 2020
    Microsplat itself is 3.14 from today Feb 25, 2020 - but i was having same issue with previous version

    Universal RP package says its 7.1.8
     
    Last edited: Feb 25, 2020
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Thanks for the clear repro- found, fixed, and uploaded to the asset store. For reference the 2019.3 version of URP targets 7.21..
     
    philwinkel likes this.
  6. philwinkel

    philwinkel

    Joined:
    Jun 6, 2013
    Posts:
    313
    TY sir, much appreciated! :D:D
     
  7. TurboHermit

    TurboHermit

    Joined:
    Dec 20, 2011
    Posts:
    16
    Good day! I'm running into an issue where my terrain turns magenta only when painting. When releasing the paint button it becomes visible again and it works fine.

    I'm on 2019.2.15f1 and LWRP 6.9.2. When I try to generate the shader it returns this error:
    Code (CSharp):
    1. Shader error in 'MicroSplat/Terrain 15-15-0 Terrain': Vertex program 'ShadowPassVertex': Unrecognized sampler 'sampler_terrainnormalmaptexture' - does not match any texture and is not a recognized inline name (should contain filter and wrap modes).
    2. (on d3d11)
    3. Compiling Vertex program with UNITY_PASS_SHADOWCASTER INSTANCING_ON
    4. Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
    Since the shader works fine on its own, is there anything you or Unity terrain does to swap out materials/shaders while painting?
     
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    So a bug like this was fixed in UPR (Unity 2019.3, URP 7.21) - could be the same or different though.. I don't do anything with swapping materials, though I know the painter has some new materials it uses for visualization.
     
  9. Corvostudio

    Corvostudio

    Joined:
    Jul 19, 2015
    Posts:
    6
    Hello JBooth, we talked with you via mail some days ago for the transparent problem on Editor and Switch.
    We updated the packages and now most of the problems are fixed, no more console error and no more transparent terrain (except on Nintendo Switch, it is still transparent).
    Howhever, this may be a confuguration problem, we are having issues with shadows on terrain: It doesn't recive them, and if we move the camera (even the editor camera) around, in some positions all the terrain get darker (probably shadowed)
     
  10. Corvostudio

    Corvostudio

    Joined:
    Jul 19, 2015
    Posts:
    6
    Unity terrainLit:
    terrain.png
    Microsplat all terrain darkened (happens in some places with the camera near the ground)
    terrain_all_shadowed.png
    Microsplat no shadow
    terrain_not_shadowed.png
     
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Which pipeline is this in and what version of it are you running? URP was just updated to 7.21, as they changed the shadowing code between 7.16 and 7.21..

    If you want stability, don't use an SRP- they are clearly not "production ready" like Unity claims, and they've basically destroyed the shader pipeline. I would file a bug with unity on the switch issue- they will bounce is back saying that it's something in my code, but without a surface shader like abstraction it's basically impossible to write shaders and know that things will just work now. There's also no way for authors to test on platforms they don't own, and the only way to make unity correct these issues is to continuously put pressure on them from every conceivable angle until they admit there's a problem and deal with it. Or at least, you know, document something for a change.
     
    Last edited: Feb 28, 2020
    DeathRace26 likes this.
  12. Corvostudio

    Corvostudio

    Joined:
    Jul 19, 2015
    Posts:
    6
    Got it. My version in fact is 7.1.8.
    As you already know, since we have to target Nintendo Switch we are stuck on finding a good way to optimize terrains, and the best way seems to convert it to chunked meshes, but without a proper shader is a pain to make it look nice.
    Maybe we will try to write our own shader that taking the slope and the height of the mesh automatically apply textures, but this would be a very primitive solution. Thank you anyway again!
     
  13. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Well the latest URP module is updated to 7.2.1 - there's not really a clean way for me to ship for 7.1.8 and 7.2.1 since they both use the same unity version, sans making the user select which SRP version they are using.
     
  14. zhn17

    zhn17

    Joined:
    Jul 30, 2019
    Posts:
    24
    Hello, I recently purchased this asset and it works just fine until I found out that my normal maps doesn't have any effect.
    Is there any solution for this, as with the standard shader I had a "shininess" slider which was at 1

    EDIT: This is regarding the tessellation module
     
    Last edited: Feb 29, 2020
  15. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Normals or specular response? Make sure the texture arrays are assigned to the material and packed in the same format on both the array and shader options.
     
  16. sunseeker1988

    sunseeker1988

    Joined:
    Jul 10, 2014
    Posts:
    440
    Hi, I upgraded to Unity 2019.3.3f1 and every texture on the terrain is dark now. now sure if I need to change something in unity.
    UnityIssue.PNG
     
  17. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    not enough info, is this on an SRP? If so you need to download the version for that Unity version from the store and make sure your using rye right SRP version and regenerate the shaders. If not an SRP then likely you have a corrupted library folder.
     
  18. TurboHermit

    TurboHermit

    Joined:
    Dec 20, 2011
    Posts:
    16
    I've made a fresh project in 2019.3.1f1 with URP 7.21 and the latest (2 March) Microsplat Core and LWRP support updates and it still happens. It seems triggered by changing the shader generator's max texture count setting and seems more prevalent when there's a mismatch between terrain layer amount and texture array length.

    Funnily enough, I've been messing around (in another project) with the TerrainPaintTool API and noticed that it doesn't happen if you use a tool that don't make trees invisible while painting, which is an option you can enable in your custom tool.
     
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    The actual bug only happened when you had max textures set to 16 - the patch was released on March 2nd, so you may have downloaded before that or possibly have the old version in the cache.
     
  20. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,114
    I have to say that the stochastic texture cluster mode is quite impressive. Visually beneficial and performing very well, even in HDRP. Compare the rock wall.

    Please keep in mind that this was recorded in edit mode. When compiled I get beyond 60 fps.

    Without:

    stochastic off.jpg

    With:

    stochastic on.jpg
     
    Last edited: Mar 5, 2020
    camta005, sjm-tech and jbooth like this.
  21. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    106
    Hi I want to know the workflow for using 8texture with their each albedo normal and height maps. I've seen the option 'add pass' should I use that for using 8textures ? Also the packing setting and shader setting for balancing the quality and performance for mobile. I know 4texture is enough for mobile but I wanna build for high end mobiles. Thank you.
     
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Just use 8 textures and set Max Textures to 8 on the material. There's an optimization guide in the documents folder which will give you a lot of information on how to optimize the shader and texture settings. Also, almost all feature enumerations in MicroSplat are ordered from least to most expensive.
     
    mukki014 likes this.
  23. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    151
    my steps to frustration.....

    1. new project (2019.3.3f1).
    2. urp 7.2.1 (was 7.1.8 upaded via package manager).
    3. terrain tools preview, 3.0.1
    4. turned off fog in lighting.
    5. unchecked draw instanced in terrain settings (if you dont do this, then camera preview is gray)
    6. imported microsplat 3.16 (core) - warning about obsolete api. (api updater)
      1. following errors on each MS asset install
      2. error 1 - Binary to YAML conversion: type UInt16 is unsupported
      3. error 2 - Setting anti-aliasing of already created render texture is not supported!UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    7. imported microsplat 3.16 (collection)
      1. same errors as above.
    8. imported microsplat 3.16 (urp lwrp)
    9. started new scene as errors wouldnt go away. New scene didnt have any errors.
    10. created terrain again via terrain tools
    11. unchecked draw instanced in terrain settings (if you dont do this, then camera preview is gray) interesting note: above is already unchecked if you create terrain via create menu. (go figure)
    12. added microsplat to terrain (quality setting).
    13. converted.
    14. Everything pink (as expected)
    15. more errors (as below)
    Shader error in 'MicroSplat/Terrain_0_0_116be494-6b02-46df-9392-ba26524e92ba': undeclared identifier 'vert' at line 3266 (on d3d11)Compiling Vertex program with _ADDITIONAL_LIGHTS
    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

    Shader error in 'MicroSplat/Terrain_0_0_116be494-6b02-46df-9392-ba26524e92ba': undeclared identifier 'ShadowPassVertex' at line 7977 (on d3d11)

    Compiling Vertex program with UNITY_PASS_SHADOWCASTER
    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

    Shader error in 'MicroSplat/Terrain_0_0_116be494-6b02-46df-9392-ba26524e92ba': undeclared identifier 'vert' at line 12621 (on d3d11)

    Compiling Vertex program
    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

    1. saved scene.
    2. 3 errors and 21 warning in microsplat.shader
    3. selected microsplat.mat in microsplatdata folder.
    4. Changed from 4 max text count to 8, so that microsplat.shader re-complies.
    5. all warnings and errors gone on recompile. (everything still pink as expected)
    6. selected microsplat.mat in microsplatdata folder.
    7. Changed render loop from surface to unity ld.
    8. 3 errors and 21 warning in microsplat.shader
    9. everything still pink, except when zoomed out. (not expected)
    10. selected microsplat.mat in microsplatdata folder.
    11. Changed from 8 max text count to 4, so that microsplat.shader recomplies.
    12. still shows errors in shader. Each time you change something, errors grow.

    given up at this stage.
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999

    My steps to repro this:

    - Create a new project with URP template in 2019.3f1
    - Upgrade to URP 7.2.1
    - Import MicroSplat
    - Unity throws binary to yaml (UInt16) conversion errors. There's nothing I can do about these, I don't even use UInt16's in MicroSplat. The _MainTexture warnings are also present, which unity claims are fixed in 2019.3.f4, which isn't out yet.
    - Open Example Scene in CoreLD/Examples, double click on cube- terrain is rendering fine
    - Regenerate shader by changing an option on it- terrain is still rendering fine..

    But overall, I don't get any errors about missing vertex functions, etc. It still sounds like you have an old version of one of these packages in your asset store cache or package manager cache - you also don't need to install MicroSplat before the terrain collection, as the terrain collection included MicroSplat.
     
    Last edited: Mar 5, 2020
  25. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    151
    Yes, your examples 100% fine, even when I change options in microsplat.mat. Yet when I create a new scene, add terrain, convert to MS, change to LD, everything still pink. Actually, just tested adding to your example terrain, then converting to MS, new terrain goes pink (besides new terrain not aligning with your terrain)

    Surely you have tweaked some settings in your example? (ignoring all the changes to the terrain.)

    Reseaching "asset store cache" now, see if I need to resolve this. Also checking if your microsplat.mat differs from my microsplat.mat
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    the only difference is the LD setting.. make sure you have the right material and aren’t changing some other one somewhere.
     
  27. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    151
    ok, here what I have done:

    1. New project.
    2. add microsplat (collection and urp)
    3. installed terrain tool.
    4. create terrain through terrain tool. Added a few materials, made a couple of changes to terrain (paint texture, raise, etc)
    5. removed fog through lighting.
    6. unchecked draw instanced in terrain settings (otherwise camera doesnt show terrain). This is already unchecked if you create terrain through create menu.
    Everything works fine till this stage:

    1. Added microspalt script.
    2. Converted.
    3. Changed microsplat.mat to render loop, ld.
    Terrain is now pink when zoomed in, fine when zoomed out. Material preview is always pink as well (microsplat.mat). Errors in previous post still exist.

    What I have done to fix it. (As per discussions on discord on matching example coreld scene microsplat.mat to my microsplat.mat)

    1. uncheck Tessellation.
    This removed all pink issues, and removed errors from shader recompile. Hope this helps someone else.
     
  28. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    106
    Thank you. It is really helpful. Gonna try today.
     
  29. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,114
    I had to see how MicroSplat wetness performs and looks like in HDRP. The Enviro integration works great and it performs excellent. Wetness transition starts at 00:50:



    Have to find out how to make those plants wet. And I guess next thing will be sand, snow and wind.
     
    eaque, camta005 and jbooth like this.
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    So, SRP support, it's a nightmare. This morning I'm fixing a bug in tessellation in URP. Once this is done, I need to back port it to LWRP versions for 2018.3, 2019.1, and 2019.2. When 2020.1 ships (or some URP version in between), it will no doubt break something and require a new set of templates for the adapter. This basically means that the list of versions I have to port and test changes across grows to near infinity over time.

    This is obviously unsustainable, and Unity doesn't seem to be willing to make the necessary moves to prevent this. Which leaves me with some choices about how to deal with this mess they've created going forward. Given that this basically grows to some point in which it consumes all available man hours of everyone on the earth ;)

    Strategy One:
    - Only support the current SRP version. This is easiest for me, but it means forced upgrades if you want latest for any reason.

    Strategy Two
    - Use the LTE release strategy. Basically I support LTE releases for 2 years, like Unity is saying they will do, and only support the latest version of the URP. So in the future this might mean I support 2018.4 LWRP, 2019.4 URP, and 2020.2 URP when the latest release is on the 2020.2 schedule. This basically means I have to support 3 versions of each SRP max at any given time (7 in total, standard, URP - 3, HDRP - 3).

    Strategy Three
    - LTE + Current point releases. Same as above, but all versions of the current release cycle are supported, ie: 2020.1 would still be supported in the case above. This basically means I have to support 5 versions of each SRP max at any given time (11 in total, standard, URP - 5, HDRP - 5).

    The downside of supporting more versions, besides me screaming at Unity about surface shaders every day and being very annoyed, is less time for actual development. In the last 2 months, I have spent most of my actual work days working on MicroSplat- something I'm not going to be able to afford to do very often since it doesn't make nearly enough to live on. That allowed me to release some new modules (Mesh Workflow, Digger Support, etc) and do some amazing optimizations, but approximately half of that development time was spent on SRP support, because doing all of these things requires porting and testing changes across all of these versions (and right now there is only 1 HDRP version).

    For these reasons, I lean towards the second strategy- however, I know it's going to lead to a lot of 1 star reviews as people expect everything to just work on their versions of Unity/SRP. Additionally, if other developers use a different strategy, then you may not be able to upgrade one of your assets.

    As an example of this problem, the URP module is currently designed to work with URP 7.2.1, however the default install in 2019.3 is URP 7.1.8, but both versions are 2019.3 compatible. This is because they changed how shadow cascades work in URP 7.2.1. So, let's say you have a bunch of different assets in your project - a water shader, a Vegetation shader, and MicroSplat. If the water shader is on 7.1.8, and the other two are on 7.2.1, then the water shader is going to be broken. If you downgrade to 7.1.8, then MicroSplat and your Vegetation shader are going to be broken. And note this is all within one version of Unity, so my 2019, 2020 versioning above is not really dealing with the actual complexity here.

    Basically Unity has created an impossible situation for asset store developers and anyone who wants to buy things off the asset store and have them just work. In truth, their is only one good option here which is for Unity to fix their shader pipeline, but they have stuck their heads in the sand and ignored this issue. As SRP support and usage is basically forced onto everyone, this problem will only grow.
     
  31. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,114
    I'd go with this one. Unity isn't compatible to itself, the SRPs are still in progress, i. e. beta. If anyone (like me) goes with SRP they go with Unity beta, not asset beta.

    Besides Unity doesn't have versioning for assets, so you can't download an older version of an asset. Also a Unity problem, not an asset problem. I'd always go with the latest one. Nobody in their sane mind would choose an engine like that for production.
     
  32. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    But that means the chance that every asset developer has updated their assets is basically near 0. And Unity is advertising both SRP's as ready for production and not beta now, despite not having the architecture in place for them to really be that way. They actually do have asset versioning, but it's tied to Unity version, which is why I based my adapters around unity versions. And in the 2020 cycle they are going to start requiring SRP support for assets and depreciating the Standard pipeline, so they are pretty much forcing this problem onto everyone.. I love the idea of only supporting one version, but it just doesn't seem possible..
     
  33. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    509
    @jbooth

    Strategy Four:
    - Only support the current SRP version and charge users on older SRPs for "legacy support" if they really want that new feature on their older version.

    Sounds fair enough to me and makes it worth your while a bit more.
     
  34. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,114
    Problem is you might e. g. be dealing with memory leaks, wouldn't be the first time, and are forced to upgrade to the latest because Unity doesn't backport it. Just one example.
     
  35. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    106
    Can anyone tell me which map I should use in smoothness slot ? I've roughness metallic specular but not found smoothness. Or I should use roughness map and invert them?
    I also want to know like I'm using base color normal and height map, your shader fill up the blank slot by itself. So I put all 5textures in their slot. Then it would cost me performance or it will same as I use 3 slots per texture. Thank you.
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    A smoothness map is just an inverted roughness map - Unity is the only company that I know of using smoothness instead of roughness as the term. Anyway, there's an invert button on the config if you have roughness maps, so you don't even have to do the invert yourself.

    It's better to provide your own maps (higher quality) - all channels get filled with data, so there is no performance difference.
     
    mukki014 likes this.
  37. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    106
    Thank you for your advice.
     
  38. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    630
    Hi,
    Microsplat performs so well that I wanna try tesselation in my project.
    -Can this cause issue with geometry and colliders? like my character going way too deep into the terrain? I saw that with someother tesselated shaders...

    -Is there a module that can blend the terrain with a global color map like a satellite image "global tint module"??

    Special request:
    -Is there a way to get the raw map used in your global tint promo module! this marvelous orange sandy zone??:p i would love to stamp it in my desertic world!!!

    thx in advance
     
    Last edited: Mar 11, 2020
  39. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    122
    [SOLVED - Solution in UPDATE 2]

    Hi, does anyone know why ambient scene lighting might stop working for a terrain? I have multiple terrain tiles in my scene. A strong ambient red light is applied to one terrain and all other game objects but not the other terrain tiles I have. All terrains use a microsplat material but the terrain with correct ambient light has a different one to the others.

    Screenshot 2020-03-11 at 09.08.02.png

    I know it's a bit of an open ended question but I've been through toggling most if not all of the terrain & Microsplat shader options to try and make them the same but still not red ambient light on some terrain tiles!

    It appears related to the Microsplat material as setting a non-working terrain to use the working terrain material gets the ambient light working.

    [UPDATE] - it's something to do with the [Normal/Smooth/AO Array] in Splats... setting it to a different texture array fixes the lighting! :O

    [UPDATE 2] - fixed it. I had to create a new texture array config. Copied all the same values in as before and it works. I don't know why it wasn't working before still, maybe because it was generated with a different version of Microsplat or something incorrect was cached in the asset itself?
     
    Last edited: Mar 11, 2020
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Yes, there's currently no solution for tessellation and collision. The best you can do is use the per-texture offset to automatically center the tessellation around the original geometry and keep it reasonable. Also, combining with parallax can help increase the perception of depth with lower displacement amounts. The global texturing module allows for global tint maps, among other things. The map used in the promo is actually included in the example folder.
     
    eaque likes this.
  41. sas67uss

    sas67uss

    Joined:
    Feb 8, 2020
    Posts:
    25
    Hi
    I want texture mesh terrain in a way that compatible with LWRP .
    Suppose I have splatmap and basemap of terrain .
    Which microsplat modules should I use?
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    You can use the Mesh Terrain module to convert your terrain into a mesh with all the microsplat features on it that you want enabled. You'd need the LWRP/URP module for compatibility with those pipelines. If you want to fade into a global base map in the distance, you can set the splat maps to disable and assign the global maps, or use the new Fade Splat Map feature to fade the splat maps into a single texture at some distance, and blend in the global map before that happens. Splat mapping will not be computed past the fade distance.
     
  43. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    11
    hi,

    i bought MicroSplat Terrain Collection awhile back and now just got to try it. i followed the video tut here:


    but, i'm not getting any result.
    here's what i did.
    1. create URP project in Unity 2019.3.4f1
    2. create a terrain with all the default settings
    3. add texture to my terrain (in my case, i just use the free stuff here: https://assetstore.unity.com/packages/2d/textures-materials/nature-materials-vol-2-32020)
    4. select the terrain & ADD COMPONENT > MicroSplat Terrain
    5. click on CONVERT TO MICROSPLAT

    according to the video tut link above, i should see some actions while MicroSplat doing its tasks.
    however, in my case, nothing happens as if i'm not performing STEP 5 above.
    what am i doing wrong?
    what's the solution.

    thanks in advance.
     
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Yeah, you need to be in the standard pipeline. If you want URP support, there's a LWRP/URP module that adapts the code to run under URP (7.2.1).
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
  46. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    630
    Only great news!!:) i checked your video and i noticed your advice "parallax combined with low tess"
    i'll buy both!
    thx for the map inside global tint!
     
  47. Dnawrkshp

    Dnawrkshp

    Joined:
    Jan 19, 2014
    Posts:
    2
    Hi jbooth!

    I'm experiencing issues blending objects with the terrain in URP. The textures work perfectly but the normals don't seem to be blending at all. I've added some images of my problem and my settings. I've also added information about my project.

    upload_2020-3-15_12-58-47.png
    Here, changing the Blend Normal Distance has no visual effect on the mesh.

    upload_2020-3-15_12-59-50.png
    Toggling 'Object Normal Blending' also has no visual effect on the mesh.

    Any help would be greatly appreciated! Thanks!

    Project:
    URP 7.2.1
    Unity 2019.3.3f1
    MicroSplat 3.18
    MicroSplat LWRP/URP support 3.17
    MicroSplat Terrain Blending 3.17
    MicroSplat Texture Clusters 3.18
    MicroSplat Triplanar UVs 3.1
     
  48. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    Yeah, the normals don't blend right now; until unity stabilizes URP it's just too much work to do it- I'd have to rewrite it every release.
     
    Dnawrkshp likes this.
  49. CliffCawley

    CliffCawley

    Joined:
    Mar 30, 2009
    Posts:
    19
    Hi,

    I've used Microsplat in Unity 2018.4.17 but recently upgraded to Unity 2019.3.5. I'm using the built in shader pipeline still. Platform is Windows

    Whenever I build now I get:
    Fragment program 'frag_surf': Unrecognized sampler 'sampler_diffuse' - does not match any texture and is not a recognized inline name (should contain filter and wrap modes).
    (on d3d11)


    (The error only happens when I build for release, not in general editor use)

    I saw that you said this might be because I had imported the package in 2018 and to just change the shader properties and it should fix.

    This has worked a couple of times (I just changed PBR workflow to Specular and back to Metallic).

    But restarting Unity caused it to happen again and this time making the above change also didn't fix it.

    I then changed a texture property and it fixed it, but then the next time I restarted Unity, the same issue and this time doing any of the above fixes doesn't work.

    What am I doing wrong and why do I have to try to apply these modifications every time I restart unity?

    Cliff :)
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,999
    I wouldn’t expect you to have to restart unity at all. Any chance you can send me the project with repro steps? If not PM me the shader so I can look at that.

    This error usually happens when the windows shader compiler determines that the diffuse texture isn’t being used and strips its sampler, which other textures then try to use. Usually it only happens in debug modes, but it appears to be happening elsewhere for some people.

    [Edit] this is coming up enough that I'm putting a hack into the main shader to prevent it from stripping that sampler. It has a very small cost, but worth it to make sure everything works on all platforms. This will ship in the next version, which has already been uploaded to the store.
     
    Last edited: Mar 16, 2020
unityunity