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

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Done. Bug report to Unity is sent.
     
    Last edited: Nov 28, 2021
    jbooth likes this.
  2. gtox

    gtox

    Joined:
    Apr 23, 2013
    Posts:
    25
    Is Microsplat URP 2020 compatible with Unity 2021.1.15f1? I have Microsplat Core, and I bought Microsplat - URP 2020 Support, but I can't import it. I get an error on import "An error occurred while resolving packages" and "microsplat.urp2020 has invalid dependencies or related test packages:"
    Edit-the Microsplat core defaulted to an earlier version in the package manager, after updating to 3.94, the issue is resolved.
     
    Last edited: Nov 29, 2021
  3. fp-liulie

    fp-liulie

    Joined:
    Nov 8, 2021
    Posts:
    1
    Did anybody encounter this problem?
     
  4. Dante20011

    Dante20011

    Joined:
    Mar 3, 2015
    Posts:
    34
    Hello, I am having problems adding the class "TraxManager" to a gameobject. It says "Can't add script component 'TraxManager' because the script class cannot be found. Make sure that there are no compile errors and that the file names and class name match"
    I obviously did not edit the script and just downloaded it. I use Unity 2020.3.19f1 in the stock pipeline (not HDRP nor URP). What can I do?
     
  5. Dante20011

    Dante20011

    Joined:
    Mar 3, 2015
    Posts:
    34
    Nevermind, I updated Microsplat core and it works now
     
    protopop likes this.
  6. Mynameismow

    Mynameismow

    Joined:
    Sep 11, 2017
    Posts:
    4
    Kia ora!

    It seems as though the Digger Integration Module seems to no longer work with the most recent Digger Pro (haven't tested digger standard) version?

    It looks like the digger integration shader is no longer talking to the digger module correctly?

    When creating the digger shader variant of my main microsplat shader it looses all information from the original shader.

    Microsplat textures are no longer being recognised by Digger...

    Anyone else experiencing issues with this?
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I have not heard of anyone having this issue yet. The MicroSplat module just generates the shader - the digger code actually handles the synchronization between Digger and the materials, so you might want to check with them about that.
     
  8. Mynameismow

    Mynameismow

    Joined:
    Sep 11, 2017
    Posts:
    4
    Will do! thanks for the lightning-fast reply!

    I'll also get a video when I can in case you are still interested in how things are currently operating.
     
  9. scottylewin

    scottylewin

    Joined:
    Apr 25, 2014
    Posts:
    4
    Hi Jason,
    We are on HDRP 2020.3.13
    I have a bit of a showstopper with the texture cluster module or more specifically the stochastic clustering.
    I am part of a dev team for Trackman golf and our workflow requires a bottom layer on the terrain to be the satelitte image of the golf course thus not requiring stochastic clustering. Unfortunately when disabling the module on the per layer property we get a broken shader as per the image. Often it just flashes. Once the stochastic is re enabled the issue ceases.
    This module is just brilliant for what we do so a resolution would be great.

    Many thanks
     

    Attached Files:

  10. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I'm not sure I follow. The usual workflow for something like this is to use a global tint map for the golf course image- but in your case you have it in the texture array as, say, the first texture, and so stochastic is disabled on that texture, but not the others? I just tested this setup and everything seems to work fine, so there's some detail that's missing here.
     
  11. scottylewin

    scottylewin

    Joined:
    Apr 25, 2014
    Posts:
    4
    Hi Jason,
    Yes the first texture is the golf course image and stochastic is disabled. All other textures will have stochastic enabled.
    Do you mind explaining the global tint map workflow. Perhaps this is a better solution.
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It's part of the "Global Texturing" module, which you can read about in the docs included with the core module- basically it lets you blend an albedo/normal/etc map over the entire terrain, with splats being blended with this, and per texture strength for it as well. Usually the resolution of these types of global images is too low, so blending it with the splat map lets you give it local detail.
     
  13. scottylewin

    scottylewin

    Joined:
    Apr 25, 2014
    Posts:
    4
    Thanks Jason,
    This is exactly what we need!!
    I’ll grab the module.
    Cheers
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Also:

     
  15. SDC2X

    SDC2X

    Joined:
    Apr 4, 2017
    Posts:
    8
    need help, i have and use Gaia, Mfps , Gena, etc.. need help for integrate it .. ty.
     
  16. Quittern

    Quittern

    Joined:
    Oct 9, 2018
    Posts:
    19
    Didn't see any compile error in the build log. I ran it through android logcat and I found these warnings about missing scripts. Do you have any guess to why that would happen?
     

    Attached Files:

  17. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I would try with a clean project and work back from there, and maybe try a library clear as well to make sure it's not library corruption.
     
  18. jpfjord

    jpfjord

    Joined:
    Dec 19, 2017
    Posts:
    8
    Jason, I'm using Core 3.9.6, Mesh Terrains 3.9.0 and URP 3.9.0 modules in 2020.3.21f with URP enabled. My workflow is sculpting and painting on a Unity terrain, converting to Microsplat shaders, then the final step should be to convert to mesh. Conversion to shaders works perfectly, and I love the extra control I get with blending. I'm using a non-square Unity terrain. When I convert to mesh terrain, Microsplat sort of "extrudes" my terrain out to clearly square dimensions. The splats are then stretched across all that extra geo. Does Mesh Terrains not convert non-square Unity terrains, or is there a setting somewhere I've missed? I've read the included docs, watched the vids and searched for this same issue without success.

    Screenshots of pre-mesh terrain (with baked lighting) and the resulting converted meshes (no baked lighting, but you can see the splat is there, just stretched across the new geo)

    Thanks,

    JP
     

    Attached Files:

    Last edited: Dec 6, 2021
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yeah, pretty sure it's expecting square terrains right now, but that could be fixed..
     
  20. jpfjord

    jpfjord

    Joined:
    Dec 19, 2017
    Posts:
    8
    Ah, ok that's a bummer! I *think* I can get around it for now by exporting the resulting mesh to FBX, cutting off the extra and adjusting the UV's in Maya. Not a non-destructive workflow anymore but it should work?

    When I import in the adjusted FBX, is there anything I need to worry about MS-wise? Other than maintaining the FBX structure with chunks and the top parent node having the MS Mesh Terrain script, it's just a matter of assigning the MS material created in the conversion process to the chunks themselves?

    Thanks for the help!

    EDIT: I just did a test by exporting ther MS generated mesh from Unity to FBX. adjusted mesh and UVs in Maya. Re-exported. Have the top\parent node with the same MS script component. Applied the MS generated material from the conversion to the child objects. And, it appears the splat and tiling data isn't being applied to the FBX the same way the MS converted Unity object does. Guessing there's something under the hood I can't replicate?
     
    Last edited: Dec 7, 2021
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The UV's are laid out from 0-1 on the mesh, so when you take it into blender and chop it, you now have 0.5 to 1 or 0 to 0.5..
     
  22. jpfjord

    jpfjord

    Joined:
    Dec 19, 2017
    Posts:
    8
    Yeah, sorry if my reply was confusing. I corrected the UVs in Maya before I exported the FBX back into Unity. When I applied the MS material that was created when converting from Unity Terrain to MS Mesh Terrain to the individual chunks and the MS script on the parent of the FBX has all the same stuff loaded as the MS Mesh Terrain, The result doesn't show the splatmap doing any blending, and the over-all texture tiling isn't the same. I'm wondering if something important happens to the chunk mesh renderers when the terrain is converted in the first place to a MS Mesh Terrain.....something that is lost in exporting that out and back in using FBX.
     
  23. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It's just a basic mesh with UV's, normals, and tangents. The actual splat map data is exported into textures which should be in the MicroSplatData directory with the mesh terrain's shader, etc..
     
  24. jpfjord

    jpfjord

    Joined:
    Dec 19, 2017
    Posts:
    8
    Ok, awesome, then I have something set up incorrectly. I'll give it another shot tomorrow and report back. REALLY appreciate the help\replies.

    --JP
     
  25. jpfjord

    jpfjord

    Joined:
    Dec 19, 2017
    Posts:
    8
    Update: Ok, so the only difference I can find between the FBX and the MS generated Mesh Terrain is that the MS generated sub objects are using an instance of the template material. If I input the material created by the Mesh Terrain converter, then I get no blending, which is the same thing that happens when I input the material to the FBX sub objects. In the attached pic, the middle is the freshly converted Mesh Terrain, and other than the non-square issue we already figured out, the splat map is doing its job. On the right is my fbx, generated by that same Mesh Terrain with the UV's adjusted (and confirmed in Unity with a test material with the splatmap input) and the MS converted Mesh Terrain material input by hand into the sub objects material slot AND the parent with copy and pasted script attributes from the Mesh Terrain. On the right is a copy of the Mesh Terrain but instead of the imbedded instance material, I dragged the template material directly into the sub object material slots.
     

    Attached Files:

  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You can't just use the template material directly - you have to use the MeshTerrainComponent and it has pointers to the splat map on it, which generates the instance of the material with that data applied.
     
  27. jpfjord

    jpfjord

    Joined:
    Dec 19, 2017
    Posts:
    8
    OMG, just realized the ONE thing I didn't update on the parent node.....The Mesh Terrain inputs. DUH. Changed the circled element size from 4 to 2 and input the correct sub meshes from the FBX and all is well.

    Thanks again for the support Jason, it's much appreciated
     

    Attached Files:

  28. BLInformatique

    BLInformatique

    Joined:
    Oct 12, 2015
    Posts:
    19
    Hello, I have you send you the information requested on my purchase Microsplat - Puddles, Streams, Lava & Wetness who are:[mod: removed] But no access to discord and no answer to my question, why the puddles And the ground does not wet? Unity 2021 and 2020. Thank you.

    mod edit: please do not post personal information.
     
    Last edited by a moderator: Dec 11, 2021
  29. MAXFORCE

    MAXFORCE

    Joined:
    Mar 4, 2014
    Posts:
    51
    I think you need to send private message, not public. Eraze you Invoice number.
     
  30. Smileys

    Smileys

    Joined:
    Feb 27, 2014
    Posts:
    81
    Hey - i bought the whole Microsplat Package (even though i just needed terrain blending) but i am just not able to create a pleasing result. Out of the box, the blending effect just smears the terrain texture along the intersection area as seen in the attached screenshot. When i now enable Triplanar, i get really weird results. In the best case, the Terrain does not render anymore and there seems to be a small "belt" where the effect is smeared and then it looks fine (see attached). Worst case the Terrain just shows Unitys Pink shade.

    Second question would be regarding LODs. The "MicrosplatBlendableObject" script seems to grab just the material of the current GO it is attached to. Is there any contraint that prevents me from adding LOD support? I am thinking of grabbing all sub materials if this component is added to a GO that also has the LOD component on it and then just loop through those materials instead of the single one.
     

    Attached Files:

  31. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    I guess try to use triplanar
     
  32. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Use triplanar.

    You can, but then you're paying the cost of blending on really far LODs, which can be undesirable. That's why I do it per object.
     
  33. Smileys

    Smileys

    Joined:
    Feb 27, 2014
    Posts:
    81
    I am using Triplanar. The rendering problem went away after hitting the Play button and returning to the Edit mode. The smeared "belt" around the objects however was still there.
    I modified the component and added a Y-Offset slider to it so that i can adjust the position where the intersection happens. That fixes it for pretty much every asset i have.

    Theres just one problem remaining. If i now enable POM, the whole parralax effect breaks. I cant get the effect to ignore the terrain normal direction (tried it in the "Per Texture" settings as well).

    Also added the LOD lookup functionality with a variable to control how many LOD levels are "blended". It was easy to implement and is really convenient because i have a lot of LOD setups where at least level 1-2 are pretty obvious and close to the camera.
     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    POM is going to break blending, as it can't be replicated on the blended objects - you might get it to look ok within some reasonable settings though.

    as for the LOD levels:

    https://forum.unity.com/threads/psa-a-general-rant-on-model-lods.859201/
     
  35. YetNeele

    YetNeele

    Joined:
    Dec 12, 2019
    Posts:
    7
    Hello there, I just added MicroSplat, MicroSplat - Ultimate Bundle and MicroSplat - URP 2020 Support to a copy of our project.

    I was getting it started but when I got to the point of converting the material to URP I found out that the Render Loop option isn't showing up below Name.
    upload_2021-12-16_2-47-38.png

    I'm using Unity 2020.3.6f1 and URP 10.4.0

    Is there something I'm missing? I looked around in the documentation and in the forum but I didn't manage to find anything.
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Maybe try a right click reimport on the URP package? This has come up before from time to time and usually something like that fixes it.
     
  37. YetNeele

    YetNeele

    Joined:
    Dec 12, 2019
    Posts:
    7
    It's solved now, thanks! What solved it was reimporting the URP Support folder and then restarting Unity.
     
  38. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    I was considering buying the URP 2020 package for a current project but wondered if there would be a 2021 version that we will eventually need to buy. I know 2021 isn't officially supported but wondered if we bought the 2020 version, would we eventually be able to use that for 2021 or will we need to buy another product?
     
  39. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    New version, was submitted almost 2 months ago but Unity's hamster wheel that powers asset store reviews seems to have died..
     
    GCatz and hopeful like this.
  40. uberbax

    uberbax

    Joined:
    Jul 20, 2014
    Posts:
    2
    Good day !

    I was recently downloaded free version of MicroSplat from Asset Store (with intention to buy modules if everything's fine). And while in editor it shows outstanding perfomance, when i tried to build for Android it shows an Error :

    Shader error in 'Terrain': 'tex2D': no matching 2 parameter intrinsic function; Possible intrinsic functions are: tex2D(sampler2D, float2|half2|min10float2|min16float2) tex2D(sampler2D, float2|half2|min10float2|min16float2, float2|half2|min10float2|min16float2, float2|half2|min10float2|min16float2) at line 2360 (on gles)

    etc. lines 6786, 11154, 15579

    So, is there any workaround or fix for that ? In editor in works amazing. I'm using Unity 2021.2.7f1 MicroSplat-Core 3.9.0
     
  41. uberbax

    uberbax

    Joined:
    Jul 20, 2014
    Posts:
    2
    As it turns out i've added OpenGLES 2.0 Graphics API in Android Player Settings, removing it solves the problem. Maybe it helps someone)
     
  42. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Yea I deal with that a lot submitting games these days. Since there's a sale on, I'd like to go ahead and purchase URP support but wondered if there will be an upgrade path for 2021? I would get the 2021 version if it were available but don't want to have to rebuy it when the new hamster arrives.
     
  43. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,267
    MS POM & Trax in use:

     
    hopeful likes this.
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It's a $10 upgrade from any previous SRP adapter to the same one of a different year.
     
  45. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    276
    Ok so I guess I should hold off buying 2020 then since the price on sale plus upgrade cost will likely be the cost of just buying it outright.
     
  46. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    hi.
    as your Stochasting Hight Sampling node asset dont have forum node, ill try to ask here.

    is there a way to not include StochasticSampling.cginc in build? i thought compiled shader is enough for working shader, used that node.
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    no, not the code is in the cginc - without it you wouldn’t have the code.
     
  48. ibernd

    ibernd

    Joined:
    Jun 24, 2019
    Posts:
    16
    Hi!
    i have a problem with snow trax (with tesselation).
    The trail looks strange for a few seconds until it is properly rendered.
    Do you have any idea what the problem is?

    Screenshot 2021-12-22 142203.jpg




    Im using Unity LTS 2020.3.25 with URP
     
    Last edited: Dec 22, 2021
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461

    Increase the number of buffer blits in the trax manager. Essentially the buffer is smoothed each frame, and more buffer blits will smooth it more per frame.
     
  50. romaxl30

    romaxl30

    Joined:
    Aug 16, 2020
    Posts:
    5
    Hi. Jason - Microsplat is a very cool thing - I was happy to buy it) But I had one question based on the work I do - I have Mesh Terrain and SECTR - trying to combine them in the field of CHUNK there are some problems with their synchronization - because PROXYMESH is created and is removed at runtime and I can not synchronize it with the MicroSplatMeshTerrain script so that the material fits properly on the created PROXYMESH - maybe you can advise a solution. Thank you in advance)
     
Thread Status:
Not open for further replies.