Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. 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. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Different error, but something in Unity's or your projects domain- I don't load anything manually in MicroSplat, that's all handled by Unity's reference/build system.
     
    andrew210 likes this.
  2. vidugam

    vidugam

    Joined:
    May 2, 2019
    Posts:
    7
    @jbooth I'm guessing you mean these options? They're set to 2048 and I'm still getting weird compression problems. On top of that, this distortion still keeps coming back whenever I save, and sometimes when that happens Unity will just decide to not render anything while the terrain is on screen.

    Options.png UV possible problem.png
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Well, nothing has changed with any of the compression code in ages- but there is that Unity error being thrown in 2020.3, so it's possible it has something to do with it.
     
  4. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    187
    Thank you, efforts to debug this have been rather fruitless at the moment, the only slightly interesting thing i've found is that changing the compression on the platform overrides for ios to "Uncompressed", on this build it didn't throw any errors but didn't work at all. If not due to the bugs noted already in with 2020.3.x does anybody have any ideas on what i could potentially try next to get this fixed (reverting to earlier version of unity seems the only option i can think of right now)
     
  5. jtate5

    jtate5

    Joined:
    Jan 13, 2014
    Posts:
    24
    Does Microsplat support tvOS? Although everything works fine on our iOS build, I am getting really bad corrupt shader on Apple Tv.
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    No idea.
     
  7. development_unity92

    development_unity92

    Joined:
    Jul 16, 2020
    Posts:
    2
    Thanks for the reply, @jbooth I switched from 2020 to 2019.4.2 and it fixed the green lines, however, I am still having the artifacts or the stains that the tesselation feature causing on IOS. Graphics API is Metal, I am using K2048 as the buffer size because if I use K1024 it looks really low resolution on mobile even tho the pc version is still very good on K1024. Trax manager is moving with the car, its world size is 80. You can look at the pictures I attached and can see the flickery artifacts in the distance and also on the tire tracks. I have the Trax, dynamic snow, tesselation packages, and tesselation is active. Displacement is set to 2.3, tesselation is 4.3. Thank you for your time.
     

    Attached Files:

  8. ElegantMetal

    ElegantMetal

    Joined:
    Oct 17, 2015
    Posts:
    3
    Is it possible to use the procedural and anti-tiling features on a terrain created at runtime? For example, if I allowed users to create a terrain from lidar data, then added a microsplat terrain to that created terrain, would I be able to generate the normal data at the end?
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    You'd have to generate the normal data yourself, or just grab it from the terrain if your using instancing..
     
  10. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    166
    Hi !

    I news on MicroSplat, i previously use CTS before, but it now depreciated nad the tesselation support will never come out URP saddly so i move on MicroSplat for this tesselation support.

    I try to have the same as CTS doesn't but i have some problem with the light on the surface texture with the day/night cycle :

    This is with CTS at 12AM :



    Same hours if MicroSplat :



    I dont know how to make the color good with the day/night ... Actually the diffuse color are good only on the morning and at the sunrise, at the night they turn black and at the day the look like my screen
     
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    I mean I can't tell much without knowing a lot more about your data, but the first thing I'd check is to make sure your texture array config settings are setup correctly for your color space/texture space.
     
  12. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    166
    Thanks for your reply, i'm in linear space and i setup MicroSplat in linear. My data is really basic, i'm not use PBR so i only have Diffuse/Normal/Height map, it's "toon/stylized" style, no smooth map, no metallic, no reflection or things like that.

    I switch off the normal map it now seem to work, and what i can tell is the performance are really incredible compared to CTS, i'm really impress
     
    Last edited: Mar 27, 2021
  13. ShefShifer

    ShefShifer

    Joined:
    Aug 16, 2017
    Posts:
    14
    Just updated from Unity 2019.4.21 to 2020.3.1 and MicroSplat cannot say exactly from version to the latest one (3.78) and now I'm having issues with normals. Everything was fine before but now normals behaving strange.
    To demonstrate what I mean - here's a screenshot. I set the texture with a simple normal map to better see the direction of the light. I also put a simple 3D object next to it with a standard material with the same texture. On this object, the lighting has a direction that corresponds to the shadows, i.e. correct. On terrain it is strange.
    MicrosplatNormals.png
     
  14. ShefShifer

    ShefShifer

    Joined:
    Aug 16, 2017
    Posts:
    14
    MicrosplatNormals2.png
    The settings of material I am using
     
  15. waffenwars

    waffenwars

    Joined:
    Mar 4, 2013
    Posts:
    4
    Hey, thanks for the replies, I'm still getting this error using microsplat hdrp 2020 and the object blending.
    The steps i took were:
    • Clear all packages from appdata folder
    • Create a new unity 2020.3 lts project (with the demo assets)
    • Open all packages in unity from the asset store
    • Download microsplat, hdrp 2020, and blending packages and import to the project (when importing the base microsplat module i get an error about outdated apis, i click ok to convert)
    • Create new terrain, add microsplat component, convert
    • Set up a texture in the array and update
    • On the material turn on per pixel normal
    • Select the terrain click generate normal data
    • Turn on terrain blending and object normal blend
    • Add my object with an hdrp lit shader
    • Add the blendable object script to the object
    The result is it works but shadows aren't taken into account:

    upload_2021-3-27_9-49-24.png
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Doe the same happen with instancing on and per pixel normals off (instancing already does per pixel normals)? Also check the draw order of the blendable shader - it should be set to 2225 (or 3225), as for whatever reason stuff in the normal alpha cue doesn't get shadowed in HDRP and they seem to use draw order to control that.
     
  17. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Did you read the note in the latest patch about having to repack the texture arrays?

    What render pipeline? What material settings (ie: triplanar, UVs, etc)? Instancing on or off?
     
    Last edited: Mar 27, 2021
  18. ShefShifer

    ShefShifer

    Joined:
    Aug 16, 2017
    Posts:
    14
    Yes, I repacked textures (pressed "Update" button in Texture Array Config. Several times. The last time was to make this screenshot with specific normalmap). I use default old pipeline (not URP and not HDRP), deferred rendering. Nothing special with textures - no triplanar or anything else. Iam not sure about instancing, where I can look to know? (But I think I do not use it also)
    The terrain is generated through code. After creating terrain I use
    Code (CSharp):
    1.             var ms = terrain.AddComponent<MicroSplatTerrain>();
    2.             ms.templateMaterial = terrainMaterial;
    3.             ms.propData = terrainMaterialPropData;
    4.             ms.keywordSO = terrainMaterialKeywords;
    5.             MicroSplatTerrain.SyncAll();
    everything worked well before the update
     
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Instancing is an option on the terrain settings itself (draw instanced). I'll check it out, I've been cleaning up some stuff with normals so it's possible I missed a case.
     
  20. waffenwars

    waffenwars

    Joined:
    Mar 4, 2013
    Posts:
    4
    I turned instancing on and per pixel normal off, I went into the shader and set the draw order to alphatest and it fixed the issue with shadows but made the whole object use just the terrain shader:

    upload_2021-3-27_19-1-57.png

    Is the draw order exposed for the blendable shader somewhere? I couldn't find it but I tried setting the render queue on the microsplat material to 2225 which turned the blendable shader off and 3225 which turned it transparent (disappeared)
     
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    It's written into the shader directly - you can see what it says it is by selecting the shader and it will show what it's set to in the inspector. Yeah, it needs to be alpha not alpha test, but should be 225 higher in the queue than regular alpha for it to receive shadows. (would be nice if any of this stuff was documented in HDRP, it's all trial and discovery) It should be hardcoding that queue value into the shader now.
     
  22. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    109
    I'm using Trax to leave tyre tracks in my terrain and would like to add particle effects. For each wheel hit is it possible to get the dominant texture at that point, plus some Trax data such as opacity and colour tinting? I could use this to drive the particle effects.

    Apologies if this has been asked before. I couldn't find anything online.
     
  23. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    This is in the FAQ. You can get the terrain texture the same as you would for a regular Unity terrain. The trax data is all available on the material or via per texture properties through the PropData interface.
     
  24. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    109
    I missed that. Thank you.
     
  25. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    109
    I'm at the point where I can sample the textures at the hit point on the terrain and work out which is the dominant (the index in splatmapData[] with the highest mix strength). How can I use this index value to access the Trax data? Should I be using Material.GetTexture() here? I'm afraid this is the point where I get a little confused!
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Are you trying to sample the texture itself? Or just know which trax texture is used for that terrain? The textures are in the texture array by index, same as the regular textures. So index 2 of the terrain is 2 in the trax array, etc.
     
  27. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    68
    @jbooth I used to get really nice Terrain Details Noise with the Detail Noise Texture option, but for some reason I now dont get anything there. All the other features seem to work, but everything I do with Detail Noise Texture (or Procedural) does nothing.

    If I turn everything off but that, still nothing. All other features work. Im on Unity 2019.4.22f, on a MacBook Pro with Intel Iris card, 10.15.6 OSX.

    Anything to try to get the Detail Noise Texture to unwedge? I have tried different textures, all setting combinations I can think of. I am running the latest "Microsplat Terrain Collection" bundle, version 3.78. I deleted the directory and re-imported to make sure there wasnt cruft.
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    It seems to be working fine in the demo scene in the AntiTile module. Do you have per-texture controls on and set to 0 strength or something?
     
  29. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    30
    Hello, I have unity 2020.2 with URP, I just installed Microsplat 3.78 and URP 2020 support module, quickly added a terrain, right after I added the Micro Splat Terrain component and convert, a few error came out, any help? I remember it did work before when using an older version of Microsplat and URP 2019 module. Thanks.

    upload_2021-3-29_13-2-56.png
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Yeah, the 2020 module is for 2020.3LTS, as listed on the asset store listing.
     
  31. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    30
    Thank you.

    Just installed a refresh 2020.3.1f1 and made a quick terrain using Gaia 2, before installing Microsplat, the FPS is well over 400 and even 500, but it dropped to less than 400 after installing Microsplat (with URP 2020). Is it expected? actually I am looking to source the Trax and other modules so just trying to see how is the performance impact. Thanks.

    upload_2021-3-29_17-28-46.png
     
  32. jeanpaul84

    jeanpaul84

    Joined:
    Jan 23, 2017
    Posts:
    1
    Hi Jason,

    We've noticed a performance issue when using Trax in HDRP. Using the Trax sample scene in HDRP, with Unity version 2019.4.7f1 and HDRP version 7.5.1, we noticed that the TraxManager.LateUpdate was taking a significant chunk of the frame time (5.53 ms).
    We traced this down to the cam.Render() call in LateUpdate in TraxManager. Changing this so that cam is not disabled in Setup() and commenting out the cam.Render() call in LateUpdate() fixed the performance issue.

    Were you aware of this issue? We are gonna go with this approach as there wasn't any noticeable difference in Trax behavior between this change and when the Trax camera was being rendered in LateUpdate.
    ProfilerTrax.png
    We also tried to reproduce this in the standard pipeline but couldn't.

    cheers
     
  33. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    109
    I'm using a single Trax texture so just need to get the Trax Opacity and Trax Tint per-texture property values for the dominant terrain texture at the current hit point.

    Thanks.
     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    HDRP is pretty angry about multiple cameras, I was going to change it to use a custom pass in HDRP10 at some point. But this seems to remove the overhead of the second camera? If so, that's a much easier change than rewriting everything as a custom pass just for HDRP..
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    You can get this from the PropData api.
     
  36. duminju1990

    duminju1990

    Joined:
    Jul 26, 2019
    Posts:
    26
    Hello. I just started using Microsplat (free version) & encountered this. Could somebody kindly enlighten me what I do wrong that some parts of the blending is too sharp, but some is good? I only change the global & per texture UV scale & interpolation contrast.
    upload_2021-3-29_17-16-1.png
     
  37. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Hard to say from the information here, but if you're changing the per-texture interpolation contrast that could cause something like that. Or if you have set your blend mode to fastest, which only allows 2 textures on each pixel, then it will clamp like this. Finally, if you are not supplying high quality height maps, then often blends are not nearly as nice because the system will generate height maps from whatever data you have provided, and those are usually not as good as authored ones.
     
  38. duminju1990

    duminju1990

    Joined:
    Jul 26, 2019
    Posts:
    26
    Do you mean blend quality as shown below? Currently set to "balanced". Is it good to always set this as "best quality"? Because I saw in the documentation that using best quality can create "bad blending" & should be used for terrain in distance only.

    Btw, I've reset the per texture & global interpolation, but it still shows the same. I'm using texture provided in Map Magic 2, not sure if the height maps is good but I think should be standard/ not bad? :confused:

    Oh yes, just to inform you that I've also occasionally got below error messages. I guess it's not a big deal since it's "yellow"
    upload_2021-3-29_17-24-46.png

    upload_2021-3-29_17-43-16.png
     
  39. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    68
    Apparently the Texture Array had to be re-Updated, because now it's working.
     
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    No, using fastest can cause issues- best quality is what should be used most of the time.

    Line endings should cause any issue..
     
  41. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    544
    In unity 2020.3lts using HDRP for microsplat is there a way to be able to use a Global Colormap and Global normal map and still be able to use tesselation on the terrain per texture. I'm fine if I can't use a global normal map and still be able to use a global colormap with Tesselation. If so which modules do I need to purchase to make that happen.

    Also whats up with the discord channel - I'm assuming you had to many trolls why its locked down unless you get permission to get in?
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Yeah, you'd need global texturing and tessellation to do that. The discord channel requires an invoice to get in, just message the invoice number to the bot.
     
  43. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    242
    I'm having an issue with a terrain where I'm removing some unused textures. After removing the textures and adding the microsplat terrain, I'm seeing white borders around the texture areas. If I just apply the microsplat terrain component with the unused textures in place, I don't see the white borders. Is there something I need to do after removing those textures? This is caused by the anti-tiling "Distance Resample" function.
     
  44. jtate5

    jtate5

    Joined:
    Jan 13, 2014
    Posts:
    24
    What is the best way to force Microsplat to use the Unity default terrain shader? We'd like to do this on some platforms where we are having issues (i.e. Apple TV).
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Remove the component and assign a material with the Unity shader on it.
     
  46. jtate5

    jtate5

    Joined:
    Jan 13, 2014
    Posts:
    24
    Is there a way to generate a material with the Unity shader that maintains our textures from Microsplat?
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Not that uses the ones in the actual array, but it should use the ones which the array was generated from - they are still referenced by the terrain layers..
     
  48. Ecliptec_Mobile

    Ecliptec_Mobile

    Joined:
    Dec 17, 2017
    Posts:
    6
    Hello Jason,

    Please can ou assist with my issue I am having with the Microsplat shader... I have some terrains created with Microspalt, along with the shaders. When I make a build, with the scenes as part ofthe build, textures of the terrains show up correctly and as expected. However, after putting the scenes in Asset Bundles, and install from a remote server, the terrains in all of the scenes are completely black. Terrain textures are built with the ATSC format in, both, the scene-inclusive build and the Asset Bundles and are fine in the inclusive. Also pretty sure it's not related to light maps, since it looks like other scene objects are lit correctly; in addition, when my terrain switches material (a game feature) to a legacy shader, shadows and lighting are correct on the terrain.

    Please, are you able to offer any help.

    Thanks.
    Marc.
     
  49. Tesrym

    Tesrym

    Joined:
    Dec 2, 2012
    Posts:
    60
    The discord bot does not accept invoice/orderno# for hdrp 2020 :(
    Don't worry I have no need for support for it, I just want access :)
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    4,766
    Your likely not bundling some part of the MicroSplatData directory for the terrain correctly - Write some code to display all the references on the MicroSplatTerrain component and I bet you'll find one is missing.

    Ping me on the discord
     
    Tesrym likes this.
unityunity