Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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. vanhalen17

    vanhalen17

    Joined:
    Apr 19, 2015
    Posts:
    87
    Here's a screenshot of the terrain darkness.

    Awesome thanks Jason.

    Switching to Vulkan now to test it out
     

    Attached Files:

  2. vanhalen17

    vanhalen17

    Joined:
    Apr 19, 2015
    Posts:
    87
    More info on this: Tried a blank new project and Microsplat works with Quest, but once you turn on Linear Color Space, it seems to get that dark/black effect (in a build, is fine in editor). Oculus recommends this color space for Quest development. If you or anyone else can reproduce this or think of a solution, I'd be very grateful. Using OpenGLES3
     
  3. philwinkel

    philwinkel

    Joined:
    Jun 6, 2013
    Posts:
    313
    i'm in unity 2019.3.0f6 , I've imported the brand new updates to microsplat core, import microsplat lwrp / urp, and then when i import microsplat terrain collection i'm getting these errors:



    the only Microsplat scripting define symbols thats present is the __MICROSPLAT__ one. In the past when I used microsplat i remember there being a lot of scripting define symbols for the terrain collection. Looking at the errors and a quick glance at the cs scripts i think the missing scripting define symbols are the issue.

    I've tried deleting the entire microsplat directory and re importing everything from scratch. but i dont see any other scripting define symbols being added other than __MICROSPLAT__


    EDIT: I manually added __MICROSPLAT_STREAMS__ and __MICROSPLAT_TEXTURECLUSTERS__ to resolve the compilation errors, and it seems like all the other errors went away, and the rest of the scripting define symbols from the terrain collection went in there and everything compiles now
     
    Last edited: Feb 7, 2020
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    yes, sorry, I submitted a patch for this a few hours ago.
     
    philwinkel likes this.
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
  6. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    62
    Hi. Whenever I upgrade Microsplat I get the following message:
    "Assets\MicroSplat\Core\Scripts\Editor\TextureArrayConfigEditor.cs(682,56): error CS0619: 'TextureFormat.ATC_RGBA8' is obsolete: 'Enum member TextureFormat.ATC_RGBA8 has been deprecated. Use ETC2_RGBA8 instead (UnityUpgradable) -> ETC2_RGBA8'"

    I usually just comment out the appropriate lines, however I'm wondering if this should be necessary. I'm using Unity 2019.2.20 and am developing for Windows VR.

    Also I'm having an issue with terrain textures in the final build that doesn't occur in Unity. The textures look overly reflective and appear to have some kind of graphical glitching (best way I can describe it). Also, the textures in-game don't always correspond to the textures in Unity. I've attached In-Unity and In-Game screenshots. These were both taken with Quality settings at Medium, but occur no matter which Quality level I select.
    I'm wondering if this can be caused by the error above.

    Cheers.
     

    Attached Files:

  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    Did you press yes when it asked you to run the script updater?

    In terms of the error, it looks like you have some corrupted textures. If you are over 4gb of textures this will happen because unity will start writing other data over the bits - it could also just mean your library folder is corrupted and you need to clear it and let unity re-cache it all (and be disconnected from the cache server, because once bad data gets into the cache server it will just send that everywhere).
     
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    So I've been looking into the various issues on Quest, and here's what I've found:

    Starting out at abound 45fps on device.

    - For some reason, Quest needs it's color textures compressed into linear texture format's instead of sRGB. I have exposed an option on the texture array config for this. If your textures are very dark, turn this on and update the arrays
    - For a while I've had a fallback system for choosing texture formats in MicroSplat. The basic idea was to choose a texture compression format, then fall back to an available format if this isn't available. However, it turns out that the check Unity provides for this works on the system that calls it- not the system your targeting. IE: If you use this check in the editor code, it will let you know if windows/osx supports that texture format- not if your target device does. So this would cause the texture packing code on android to fall back to uncompressed formats, which are obviously much slower than compressed formats.
    So I removed the fallback system all together. If you select automatic, then you will get PVRTC on iOS, DXT on windows/mac, and ETC2 on Android. If you use the options to force a specific format, then it will attempt to compress into that format. However- it turns out that at least in 2019.3 on my Windows box, if you try to create a texture array in ETC2 format, it will work but throw warnings in the console about it not being supported. Wonderful. What's worse, if we select ASTC, then it will outright fail to create the texture and tell you to check the supported formats first.
    This all works with regular textures because they are handled at Import time. Unity doesn't have native importing of texture arrays, because there's no formats out there for such a thing, so mine are all constructed in editor using the Texture Array Config code.
    - With textures compressed into ETC2 formats, draw instancing on, and branch samples set to regular, I now get about 150fps in the default scene. With branch samples disabled, the framerate is about 20-30% slower, continuing the idea that branch samples is nearly always a win.
     
    Rowlan and vanhalen17 like this.
  9. mthawley

    mthawley

    Joined:
    Sep 7, 2018
    Posts:
    62
    Hi. Thanks for reminding me about the 4gb limit. That was the problem.

    With regards to the Microsplat upgrade issue, I have completely uninstalled MicroSplat and all the add-ons. I then removed all MicroSplat related Scripting Define symbols and restarted the project. When I reinstall MicroSplat I accept the API update message but then get the following console error;

    APIUpdater encountered some issues and was not able to finish.

    Unhandled Exception:
    System.InvalidOperationException: Operation is not valid due to the current state of the object.

    at Mono.Cecil.ModuleDefinition.ReadSymbols (Mono.Cecil.Cil.ISymbolReader reader) [0x0002f] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x0004a] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.ModuleReader.CreateModule (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00081] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable`1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000d] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006c] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at APIUpdater.Framework.Configuration.ObsoleteAttributeBasedConfigurationFactory..ctor (System.String pathToAssemblyWithAttr, System.String[] potentiallyReferencedAssemblyPaths) [0x00072] in <8ea7fde4e8274f79917988d666e207a2>:0

    at APIUpdater.Framework.Util.IEnumerableExtensions.ComputeConfigurationProvider (System.Collections.Generic.IEnumerable`1[T] assemblyPaths, APIUpdater.Framework.Configuration.ConfigurationProvider provider, System.String[] references) [0x00032] in <8ea7fde4e8274f79917988d666e207a2>:0

    at ScriptUpdater.Program.ConfigurationProviderFor (APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.Text.RegularExpressions.Regex configSourceFilter) [0x00051] in <b36398d5df844c3ab7a2e3eae00158d9>:0

    at ScriptUpdater.Program.Main (System.String[] args) [0x000b2] in <b36398d5df844c3ab7a2e3eae00158d9>:0
    [ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Operation is not valid due to the current state of the object.

    at Mono.Cecil.ModuleDefinition.ReadSymbols (Mono.Cecil.Cil.ISymbolReader reader) [0x0002f] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x0004a] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.ModuleReader.CreateModule (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00081] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable`1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000d] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006c] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <a3989f8c34e6476eaca56644d5639ee8>:0

    at APIUpdater.Framework.Configuration.ObsoleteAttributeBasedConfigurationFactory..ctor (System.String pathToAssemblyWithAttr, System.String[] potentiallyReferencedAssemblyPaths) [0x00072] in <8ea7fde4e8274f79917988d666e207a2>:0

    at APIUpdater.Framework.Util.IEnumerableExtensions.ComputeConfigurationProvider (System.Collections.Generic.IEnumerable`1[T] assemblyPaths, APIUpdater.Framework.Configuration.ConfigurationProvider provider, System.String[] references) [0x00032] in <8ea7fde4e8274f79917988d666e207a2>:0

    at ScriptUpdater.Program.ConfigurationProviderFor (APIUpdater.Framework.Configuration.CompilerResponseFile responseFile, System.Text.RegularExpressions.Regex configSourceFilter) [0x00051] in <b36398d5df844c3ab7a2e3eae00158d9>:0

    at ScriptUpdater.Program.Main (System.String[] args) [0x000b2] in <b36398d5df844c3ab7a2e3eae00158d9>:0

     
  10. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    Yeah, none of these have to do with MicroSplat. Must be something else in your project, or just unity throwing internal stuff.
     
  11. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    597
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
  13. Thall33

    Thall33

    Joined:
    Sep 18, 2013
    Posts:
    67
    Hi Jason. I'm on 2019.3.6, URP 7.18. I'm looking to use the vertex painting tool included in the mesh module.

    I've installed the latest microsplat, microsplat urp module and then the meshworkflow module, but im getting that classic pink and a few errors, tried restarts and reimports.

     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    Did you read the note in the asset description that says the vertex based workflow isn't for SRP pipelines yet? It's also in the patch notes, and in the docs.

    Though it looks like the texture backed ones are pink in your scene as well, did you switch the shaders to use the URP adapter?
     
  15. RetroFlight

    RetroFlight

    Joined:
    Nov 16, 2019
    Posts:
    35
    Wow thanks so much for doing this troubleshooting! I was really struggling and ready to give up! I am in the process of deleting my library and rebuilding a cleaner build trying to get rid of Unity Gremlins. I will make the changes you suggested and see if I cam get my fps back up!!

    I love the anti-tiling module by the way. Such a simple idea and it truly is amazing. The first before/after when uou enable it is a jaw dropper. It feels like going from 1990's video games to very close to the uncanny valley.
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    I'm a bigger fan of texture clustering and stochastic sampling, but the stuff in the anti-tiling package works pretty well when you can't afford all that. Let me know if any of it helps.
     
  17. RetroFlight

    RetroFlight

    Joined:
    Nov 16, 2019
    Posts:
    35
    Haha yes I agree... what is its performance on the Quest? I assumed it would be too much processing... but if it works decently on the Quest 100% I will be buying.
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    Likely too much for quest- 3x the sample counts.
     
  19. GarbageCat

    GarbageCat

    Joined:
    Jul 31, 2012
    Posts:
    227
    any insight into why there are black lines in the default WebGL 2.0 build ?
    testtttt.png
     
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    None- are they view dependent or do they stay that way when you get close?
     
  21. GarbageCat

    GarbageCat

    Joined:
    Jul 31, 2012
    Posts:
    227
    view dependent
     
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    I would expect it to be the same, but you might try turning off normals for a quick hack to see if what's happening is that the lighting response is more extreme. Also, I know at once point the core shader had POM on when I shipped it, so make sure you change an option to force a regenerating of the shader code to the latest. I won't be able to get to it soon, but will make a webGL build when I can and see how it runs (haven't tried webGL in ages).
     
  23. GarbageCat

    GarbageCat

    Joined:
    Jul 31, 2012
    Posts:
    227
    changing normals to off didn't help, but after going crazy with the options I've managed to remove the black lines by switching filter mode to trilinear
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    Really? I would not have expected that. If you switch back they return?
     
  25. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    67
    Hello, I've been getting this error whenever I try to adjust the settings:
    Annotation 2020-02-13 202442.png
    And another thing; I can't seem to get smoothness to work. Smoothness strength is set to 1, but it has no effect, same with metallic. And I've tried multiple maps.
    Annotation 2020-02-13 203149.jpg
    (The texture on the plane is how it's supposed to look)

    Can you tell me what I'm doing wrong?

    Thanks
     
    Last edited: Feb 13, 2020
  26. Goldenvale

    Goldenvale

    Joined:
    Feb 26, 2015
    Posts:
    67
    Nevermind, I've managed to fix it. If anyone else has this problem just set your lighting model to standard, I was using lambert. The only problem with this is that there's no way to get rid of the sheen, but it's subtle in my case.

    The error somehow vanished..

    Annotation 2020-02-13 225003.jpg
     
  27. ibbybn

    ibbybn

    Joined:
    Jan 6, 2017
    Posts:
    178
    Hey Jason, just got the HDRP module. Looks great! Is Unity's terrain hole feature not yet supported? Reading your terrain hole modules description makes it sound like it should but the holes only show up with unitys hdrp terrain shader. Using the latest hdrp packages and 2019.3.1f1 here.
     
  28. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    137
    Hi All, Has anyone had any success using the Microsplat Procedural Texturing Module with Map Magic? I'm still working through it and it's a little frustrating.
    I assumed that because it's all done in Microsplat's shader that all I would have to do was use the MS material -- and it does reproduce on the generated terrains but the texturing doesn't appear. I'll work through this some more but just wondered if anyone else had tried.
    I know I can use the MM integration but this needs Custom Splat Maps enabled and the result is not as smooth.
     
    boysenberry likes this.
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    WTH, the forums stopped sending me alerts about this thread. Seems to happen every once and a while.

    Can you tell me which buffer it's trying to print at that line? This happens if it can't load a fragment file (to inject stuff into the shader's cbuffer). Usually this only happens if you've renamed or deleted a fragment file by mistake, but who knows, maybe I missed something.

    Yeah, lambert is a rather old lighting model- usually you want to leave it on automatic, though there's an experimental no-sheen mode that attempts to get rid of the GGX specular on glancing angles that a lot of people don't like.
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    Yeah, it should be, but I took a look today and it didn't seem to be working, so I'll have to see what changed.
     
  31. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    (this was discussed in discord, but for reference) - This is most likely because the MM node doesn't fully setup the terrain and shader the way the MicroSplatTerrain component does. This should either be modified to use a terrain component instead of a material and copy it onto each terrain and call Sync, making it future prof, or the code will have to do everything the Sync function does and be updated to match the full feature set.

    Most likely this was all written before procedural texturing existed, and the component needs to generate some LUTs from the procedural texturing curve and upload them to the material. Without this (and other data) various features can't work correctly.
     
  32. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,379
    I disabled MipMaps on one of my terrain textures and it doesn't seem to have any bad effect. Would you suggest I disable mipmaps on all my MicroSplat terrain textures? Does MicroSplat only use the top level texture size anyways? If yes I think I can save some app memory by removing mipmaps for them.
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    MicroSplat doesn't use those textures at runtime at all. They are only there so you can compile texture arrays for them, and they remain on the terrain so that other tools (editor and runtime) know what they are. Once the textures are compiled into the texture arrays, they all have mip maps, because disabling mip maps is incredibly bad for performance and should basically be done only with very small textures where memory isn't a concern anyway.

    Note there is an option on the Texture Array Config which will shrink the source textures to a much smaller size in game so you don't have two copies of them in memory at full size. Two sizes are offered in case you read back pixel data from them for some reason (usually only the name is needed for footsteps and such, but sometimes people read the pixel data as well).
     
    protopop likes this.
  34. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,379
    ahhh... cool. So I disabled mipmaps in my terrain textures since I don't use them anywhere but in microsplat and what im understanding is microsplat will turn them into an array with its own mip maps anyways, is that correct? Or should I re-enable mip maps for my terrain textures anyways?

    Screen Shot 2020-02-17 at 9.24.33 PM.png

    Is this the source texture size you're talking about? My source textures are 512 x512 but if I use the k32 or k256 will that make my microsplat terrain textures blurrier? or is that just to do things like detecting footsteps on certain kinds of textures like snow etc ?
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    Your mip map settings won't make a difference. If you set that to 32 it wont effect the size of the textures in your array.
     
    protopop likes this.
  36. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,379
    SO I can select the k32 option and there is basically no downside? Does it work like Microsplat takes my full textures, converts them into the Microsplat array format, and then the k32 option shrinks down what's left in case I need to read a texture for some reason (and if I don't need to read a texture that's fine too)?

    So basically I SHOULD select the k32 option because its basically a win-win?
     
  37. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    Yup. The only downside is that they'll be 32x32 in the terrain painting display or other tools which show the terrain textures in the editor, or if you need the data at runtime, which is rare. Usually you just need to know what the texture name is. If you haven't read the new optimization guide in the core/documents folder I suggest reading it - let me know if it doesn't explain something well enough and I'll add more detail.
     
    protopop likes this.
  38. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,379
    I love good tips like this - thank you:) I’ll try the k32 option and I really appreciate all the in depth explanation. It all makes sense.
     
  39. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Hello Jason, Just purchased the mesh module but it gives following errors after install.


    Assets/MicroSplat/MeshWorkflow/Scripts/VertexPaint/Editor/VertexPainterWindow_GUI.cs(209,34): error CS1061: 'MicroSplatVertexMesh' does not contain a definition for 'templateMaterial' and no accessible extension method 'templateMaterial' accepting a first argument of type 'MicroSplatVertexMesh' could be found (are you missing a using directive or an assembly reference?)

    Assets/MicroSplat/MeshWorkflow/Scripts/VertexPaint/Editor/VertexPainterWindow_GUI.cs(211,38): error CS1061: 'MicroSplatVertexMesh' does not contain a definition for 'templateMaterial' and no accessible extension method 'templateMaterial' accepting a first argument of type 'MicroSplatVertexMesh' could be found (are you missing a using directive or an assembly reference?)

    Assets/MicroSplat/MeshWorkflow/Scripts/VertexPaint/Editor/VertexPainterWindow_Painting.cs(93,31): error CS1061: 'MicroSplatVertexMesh' does not contain a definition for 'keywordSO' and no accessible extension method 'keywordSO' accepting a first argument of type 'MicroSplatVertexMesh' could be found (are you missing a using directive or an assembly reference?)

    ssets/MicroSplat/MeshWorkflow/Scripts/VertexPaint/Editor/VertexPainterWindow_Painting.cs(94,26): error CS1061: 'MicroSplatVertexMesh' does not contain a definition for 'keywordSO' and no accessible extension method 'keywordSO' accepting a first argument of type 'MicroSplatVertexMesh' could be found (are you missing a using directive or an assembly reference?)

    Assets/MicroSplat/MeshWorkflow/Scripts/VertexPaint/Editor/VertexPainterWindow_Painting.cs(95,26): error CS1061: 'MicroSplatVertexMesh' does not contain a definition for 'keywordSO' and no accessible extension method 'keywordSO' accepting a first argument of type 'MicroSplatVertexMesh' could be found (are you missing a using directive or an assembly reference?)

    Assets/MicroSplat/MeshWorkflow/Scripts/VertexPaint/Editor/VertexPainterWindow_Painting.cs(96,26): error CS1061: 'MicroSplatVertexMesh' does not contain a definition for 'keywordSO' and no accessible extension method 'keywordSO' accepting a first argument of type 'MicroSplatVertexMesh' could be found (are you missing a using directive or an assembly reference?)
     
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    odd- I take it MicroSplat is installed? There might be an ordering dependency if it wasn’t installed before the mesh workflow. You might try uninstalling them both and installing core first, then the mesh workflow.
     
  41. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Yes, that fixed the problem. Thanks!
     
  42. BOOLitGameStudio

    BOOLitGameStudio

    Joined:
    May 16, 2013
    Posts:
    7
    Just a thought. It would be great if microsplat included a terrain shader that would create a toon/cell shade lighting effect which you could control via gradient. I would buy it in an instant.
     
  43. WeltenbauerRenn

    WeltenbauerRenn

    Joined:
    Jun 20, 2017
    Posts:
    25
    Hello jbooth,

    We have currently testing MicroSplat in our Game. We have a big world which is streamed in, so we are using one Material is for close up (Unity.Terrain) and one in the distance (Mesh). Strangely the normals are way different when using Triplanar UV sampling. I have attached some screenshots with settings and SRP Debug mode. We are using the HRDP support package.
     

    Attached Files:

  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    In triplanar it should be the same regardless of any data on the mesh. Can you send me a repro so I can check it out?
     
  45. Blarghle

    Blarghle

    Joined:
    Aug 19, 2014
    Posts:
    19
    Hey man, I just updated my project from 2019.2.8f1 LWRP to 2019.3.2f1 URP, and MicroSplat is throwing a few errors. A couple pop up when the editor is started:

    Shader error in 'MicroSplat/MicroSplat': 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).
    Shader warning in 'MicroSplat/MicroSplat': Output value 'ShadowPassVertex' is not completely initialized at line 3613 (on d3d11)

    Some of the options in the material aren't there, like texture clusters, and the texture tiling is all messed up, I imagine because it's not compiling properly due to the error. If I change a setting, like Per-Pixel Normal, to try and refresh it, the terrain disappears. I have MicroSplat, LWRP/URP support, and Texture Clusters installed. Any ideas?
     
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    You need to download the new URP module, as you've downloaded the 2019.2 version not the 2019.3 version.
     
  47. WeltenbauerRenn

    WeltenbauerRenn

    Joined:
    Jun 20, 2017
    Posts:
    25
    Hello I have send you a link to a project via PM. I found out while creating it that drawInstanced was changing the Normal rendering.
     
  48. Blarghle

    Blarghle

    Joined:
    Aug 19, 2014
    Posts:
    19
    I think I have, the version of the LWRP/URP Support package I have is 3.13. CoreLD/Examples/MicroSplatData/MicroSplat.shader is throwing the error, Windows says it was last updated on 2/12/2020, which is when the update was pushed. Is there a different Asset Store package I should be looking at instead to get the 2019.3 URP version?
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,337
    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.
     
  50. 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
unityunity