Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I generally don't work on beta releases, though if I know there's a change I need to support I'll do that..
     
  2. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    everytime a code changed, assetdatabase refreshes and it takes 5-6 seconds to refresh before compiling. decided to look what is that:



    do you know why? i guess it wasnt happening before and i didnt changed anything about microsplat for a long time (afaik). Is there a way to turn it off for temporary?
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    sounds like the hash on the texture array is changed and when it rewrites it it’s not getting written. Is the file write only or something?
     
  4. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    Ok reimporting arrays fixed that.
     
  5. fusion242

    fusion242

    Joined:
    May 16, 2014
    Posts:
    17
    Just a quick note to Jason; we've implemented the HDRP module today (6.9 on 2019.2.12) and it is working perfectly. Performance is great, visuals are great. Thank you for your hard work!
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Ah, your the one who purchased it! Thanks, please review!

    I still have to get tessellation working in HDRP, but I have LWRP tessellation working now so it's all doable.
     
    fusion242, StevenPicard and Rowlan like this.
  7. fusion242

    fusion242

    Joined:
    May 16, 2014
    Posts:
    17
    I noticed that when I add the detail noise option (ticked on) the terrain around my camera disappears relative to the distance set on the detail noise distance parameter. I'll try and reinstall when I get a chance to test from fresh.
     
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I just did a quick test in 2019.3 with 7.1.5 and it seems to be working fine..
     
    Vagabond_ likes this.
  9. fusion242

    fusion242

    Joined:
    May 16, 2014
    Posts:
    17
    Great. I am still at 2019.2 at the moment so will upgrade in the near future when it drops as release :)
     
  10. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    Hello.
    Does anybody know if purchasing the HDRP module will allow me to use the terrain blending module that I already own in HDRP? Or will I have to wait for a HDRP version of the terrain blending module to be released?
     
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Currently all modules and features are supported in HDRP except tessellation. The terrain blending works, but there's still a small normal seem I need to work on.
     
  12. MrRightclick

    MrRightclick

    Joined:
    Nov 14, 2012
    Posts:
    19
    Hey Jason!
    Returning to report back on this, as we had to put using Microsplat on hold in order to get some work done on new content. We reverted back to Standard pipeline

    We're now trying to get it working again, and are currently profiling iOS using Instruments but so far nothing significant seems to pop out. iOS seems to take 51ms on Fragment Shader calculation, which is also visible in Unity Profiler as Gfx.WaitForPresent taking a heap of frame calculation time, so something weird is going on there. Newer iOS devices seem to work 60fps, but older tablets (iPad Air 2) and phones are suffering from the same FPS drop problem (15-30 fps).

    On Android, the problem persists in both older and newer devices (tested on One Plus 6 and newer).

    To answer your question about the blit thing, no idea. This error seemed to pop up on scenes with nothing but a Terrain with Microsplat and Advanced Details enabled. After returning to this problem, I also updated Microsplat and got rid of most of the weird shader errors we had before, so a step in the right direction I guess. Haven't seen the blit one pop up any more.

    I've noticed that completely disabling Advanced Details on our terrain material seems to boost up the FPS back to 60, but we need the plugin in order to reach the visual target we're aiming for. Any ideas what could be causing this?

    I can give more info if you have any pointers on what we should be looking for in the Instruments profiler.

    Thanks!
     
  13. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    Just double checking before purchase - I saw above that all features work on HDRP aside from Tess. but that is on way and works in LWRP/ (now URP?) the double check is...
    1.) Do MeshTerrains, Global Texturing and Snow work in HDRP?
    If so great job! You are the only one!

    Lastly, if we buy, "MicroSplat - Terrain Collection" it seems we will need to pickup HDRP/LWRP as an addon on. Are other things not included in the MicroSplat - Terrain Collection that we would need to pickup separately to work with HDRP?
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Currently HDRP supports everything except tessellation and some render baking stuff (bake out terrain albedo, etc), but that will be worked on soon. HDRP and LWRP are not included with the Terrain collection, the modules it includes are listed in the description, everything else is sold separately.
     
  15. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Advanced Details was written by @wmpunk, so you might want to ask him. My bet is that the type of blending he's doing requires multiple samples of the textures and that you're just running into memory bandwidth issues on a mobile GPU.
     
  16. MrRightclick

    MrRightclick

    Joined:
    Nov 14, 2012
    Posts:
    19
    Ah yes, of course. I'll try contacting him, but for now I think we'll do what we need some other way.

    Then I guess our problem is solved, as Advaced Details seems to cause horrible lag with its shader calculation.
    Thanks!
     
  17. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    Can I use the mesh terrain shader on walls meshes ? i want to use it to create some variety with dust, blood etc.
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, it's not designed for arbitrary meshes and expects the meshes to conform to the same topology limitations of terrains. A system for that may be coming in the future though, been under way for a long time.
     
    jdtec likes this.
  19. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    thanks for the quick answer. Indeed, it would be a very useful shader to have. I know many AAA games ( think of Assassins Creed) are using it to add material variation without consuming too much memory.

    The compromise is some CPU/GPU cycles but I`m sure you`ll find a way to have a version usable on highend mobile devices ;-)

    thx
    Chris
     
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Well Assassins creed's renderer actually bakes everything down to a virtual texture cache and does it's rendering in a totally different way than, say, Unity and Unreal. Those scenes are actually drawn in just a few draw calls because all the material data has been cached into virtual textures, then they draw all the triangles into a low res index buffer which stores UV coordinates into the virtual texture, then they draw the scene as a giant quad using the index buffer and virtual texture.

    But that aside, splat mapping is plenty fast for mobile devices if you keep things relatively simple.
     
  21. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    Happy Holidays,

    Just purchased the colleciton. Trying out in 2019.3.0a7 - indeed many things work. I was glad to see the addon "MicroSplat - Runtime Procedural Texturing" work. The demo scene was dark and hard to tell if it was working, so after combining it with HD core demo it worked better.

    Not sure where Mesh Terrain addon support is yet for HDRP. I bought that too. It doesn't work yet for HDRP in Unity ver. above likely doesn't work in 2019.2 either as using similar pipeline versions. I will try more thoroughly the other features and report back if anything doesn't work. No rush - enjoy the holidays.

    One Batch seems to not be related to MicroSplat, I'd assume it borrows from lessons learned creating the shaders though. Is One Batch HDRP support in works as well?

    I saw the Hybrid Render Question on the One Batch thread. It seems the idea of doing a Megacity style HDRP with One Batch DOTS could indeed work. Is this correct or am I missing something about the workflow?
    https://docs.unity3d.com/Packages/com.unity.rendering.hybrid@0.1/manual/index.html

    Thank you for your time.
     
    Last edited: Nov 28, 2019
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    They are separate product lines. SRP work is currently not being worked on for OneBatch. MeshTerrains should work fine in HDRP but I’ll test them soon. As far as I know the only unsupported features in HDRP are tessellation and render baking results.
     
    CommunityUS likes this.
  23. NathanielAH

    NathanielAH

    Joined:
    Jul 22, 2013
    Posts:
    97
    Question; there’s a separate Tessellation & Parallax MicroSplat component. The MicroSplat Collection lists Tessellation. So is that component already part of the collection, or a separate component?

    As a suggestion, it would be easier to know, if the collection listed items that are included are linked to their corresponding asset store entry.

    Thanks!

    Sincerely,
    Nathaniel Hatten
     
    CommunityUS likes this.
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    yes it includes that module; the asset store listing lists all the modules that are included.
     
  25. NathanielAH

    NathanielAH

    Joined:
    Jul 22, 2013
    Posts:
    97
    Thank you!

    Sincerely,
    Nathaniel
     
  26. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    I tried two ways, one where I select copy materials (fails likely because it doesn't know to copy as HD pipeline materials. And two where I uncheck that box and try to manually assign the material. Both as single mesh and multimesh I tried - The hierarchy of the new mesh seems to override whatever material I tried to put in to the mesh terrains - again this is only for HDRP. The result no matter what I tried was just a transparent terrain. (not purple - but clear). When I manually added the MicroSplat shader I was sure to tell it was a mesh terrain etc. However if I just added a standard HDRP lit, the mesh terrain would appear again. I am sure standard works fine. Thanks for looking into it when you carve out some time.
    I agree with Nathanial here, (since I asked) perhaps it is a way of yours to carve out customers that aren't willing to put in the effort. But it was slightly annoying to have to open two windows / tabs - one with your Collections list and the other with your publisher ID and then manually sort out what assets where in the pack. Also because the names were not clear I further had to click preview package, and see what the name of the folder was and compare that with my collection folder name as it wasn't a 1 to 1 naming convention. So again, if it is a filter mechanic I get that. If it is not intentional there be our 4 cents.
     
  27. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461


    I guess I'm just not sure why this isn't clear? Other than the mismatch of "Tessellation" vs. "Tessellation and Parallax", which I'll fix next time I update the package.
     
  28. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    It is just a simple matter that all the stuff is old hat to you. To us it is all brand new so the more clues we get to make sure we aren't double buying or buying the right thing the better. Just to provide a visual. This is what a new customer goes through - keep in mind, each time we have to rescan all the assets to find it. Omit the "MicroSplat -" from the scan so we can't just look at the first letter etc.

    This is all just to be clear, I don't think either of us are complaining. It seems you honestly don't get what we are saying so I am trying to provide that back so you have the user experience data you might care about.

    So here is what we go through.
    old-hat-trick.PNG

    That takes a good five minutes, the underline stuff each hit gives us pause. We think internally, ok 2. "MicroSplat" that must be the "Core Module" ok so that is free. 4. ok he got Dynamic and Global mixed up? or are they different. (at this point is when i decided i needed to look at the asset preview folders to be sure - but then again, I am a details person :) ) 5. ok not same order but I found the Puddles. 8. Your Tessellation note above. 10. no UVs. ok, ...

    Then we form a list thinking the rest of the stuff is addon, since you are Terrain shader man to us we think at first glance all your stuff is terrain. We might second guess that stuff once we read the descriptions. Now, only just now did I realize you are separating your MicroSplat project work by putting that at the beginning. And anything without MicroSplat at the beginning should be thought of as a separate project. now I know - but what chance would I have of divining that esp. during a Black Friday sales rush - I am not intimately familiar with your product line, so what Nathanial and I are hinting at is that we could use more clues - likely stating the obvious - so we have more certainity we are making the best informed buying choices while also taking the least amount of side work like above to do so. We don't have all these names memorized yet, we might know what they are but they are not asset names or product names to us yet.

    So like I say, what we really are looking for is a list of what is not in the Collection. And please know - all of above just comes from a place of trying to help you out. Take it or leave it. I don't want to argue about it. Was just offering you consumer data.

    Things that would help.
    - What isn't included list. Sold Separately or Specialized AddOns etc.
    - A picture in your Collection demo pics of all the logos/icons that are included. We are all visual so that would cut the matching down to like 2 minutes. At that point we would match by graphic not by name.
    - Alphabetical List of names - even though we can't sort Unity Asset store that way, at least when matching up we can have one list in our head going in an order.
    - Add "Microsplat - " to your list so it is easier to eye ball. This also begins to form idea it is its own project.
    - I know asset store provides tags. Maybe something there.
    - The ones that are bundled your branding graphic is bottom left justified for them all. The ones that aren't in the bundle/collection are bold and centered - different color logo or text etc. or vica versa.
     
    Last edited: Nov 29, 2019
    jbooth likes this.
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    So last night I matched everything up and added links to each module in case that helps (not published yet). I don't think a list of "What is not in the collection" is something I'm going to do, simply because it means I have to update that every time I release anything on the store, and if I forget then I have someone complaining that they didn't get some completely separate asset which is not listed there as included or excluded. (I have to do another pass on the screenshots of games using MicroSplat because if you don't put "assets not included" on every one then someone thinks your shipping the assets from Falcon Age with your package).

    Adding MicroSplat to each one seems excessive, but if you think it helps? The branding idea of making ones in the collection different than ones not is interesting, but I'm not sure if it would register that way. Rather maybe have an "included in the Terrain Collection" on each modules listing, with a link to the terrain collection instead - this would actually push people towards the terrain collection, which is likely good for everyone.

    Anyway, thanks for breaking it down- yeah, when I started this I thought I'd maybe have 8 modules some day - but it turns out I keep thinking up new features to add.
     
    CommunityUS likes this.
  30. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    Great! Glad to be of help.
    Yup, I've enjoyed watching these tools grow.
     
    protopop likes this.
  31. Bukyja

    Bukyja

    Joined:
    Jul 7, 2013
    Posts:
    31
    Hi, thanks to the black friday i bought Microsplat because I wanted to try an alternative to RTP since it seemed a bit slow, I must say that I immediately found Microsplat the best visual alternative
    and performing at RTP and at the shader of unity, but there is one thing that I would like to have and that probably could appeal to a few people, the tessellation of the terrain (not only textures) , to be able to maintain its shape even with a very high pixel error (just like RTP), added this possibility, this package together with VS / VS Pro and MapMagic could become the best solution for creating terrain on unity
     
    Lars-Steenhoff likes this.
  32. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    So, the thing is that's a pretty bad use of tessellation, IMO. Right now what MicroSplat does is draw the shader with tessellation out until the distance you specify in the tessellation distance setting- after that distance, a different shader is used which doesn't have tessellation at all. Just invoking the tessellation stages of a shader incurs a major cost, even if no extra triangles are created, so this is a pretty major optimization. If you were to run the tessellation stages on that distance shader, you would incur significant cost even if you had some technique to only tessellate the edges of the hills or something.

    This might be a valid tradeoff vs Unity's old terrain though, which does CLOD of the terrain, which can be expensive on the CPU. Basically, trading better CPU for worse GPU. But with Draw Instancing on, no CLOD is used and that CPU cost is removed, and the cost of having a very low pixel error is just the micro-triangle cost, which you would incur with tessellation as well. So I think moving forward this likely doesn't make a ton of sense, and a combination of a low pixel error and per-pixel normal is preferable. (Of course, it would be nice if Unity would fix the compiler issue with tessellation and Draw Instanced and surface shaders, but in an HDRP/URP world this isn't an issue).
     
    Lars-Steenhoff and Bukyja like this.
  33. Bukyja

    Bukyja

    Joined:
    Jul 7, 2013
    Posts:
    31
    Explanation more than clear, thank you, I hope to see new modules soon
     
  34. wigglypuffs

    wigglypuffs

    Joined:
    Aug 10, 2015
    Posts:
    67
    I wanted to thank you so much for supporting HDRP! I was about to buy cts 2019 and I thought, if only microsplat had support. And, I remember we had talked about it earlier in the forum and you said it was unlikely. I decided to check again and I was like holy smokes, it does now! I own all your packs and love them. :eek: Thank you! ;)

    p.s. Unity 2019.3 is important to support because Unity has decided that .3 is going to be their LTS for 2019. It's the first time they consider the 2019 branch feature complete. Saw them mention it in one of their slides.
     
    Last edited: Dec 1, 2019
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yeah, this is how they do every release now. I submitted an update for 2019.3 (HDRP) on friday, so should be out soon.
     
  36. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    240
    Getting some issues on activating terrain blending :/ (render loop unity LD is properly selected)
    upload_2019-12-1_13-35-52.png

    LWRP 6.9.1 - unity 2019.2.14

    Result: Micro Splat Blending Object still asking for terrain blending to be activated on the microsplat terrain material
    I then generated terrain data, the blending works but getting new errors
    upload_2019-12-1_13-39-17.png
     
  37. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Just tested this and cannot repro. Are you sure you have the latest LWRP module? I update it very regularly lately. If so, if you can test in a new project and send me the data if it fails that would be very helpful.
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Never mind- the default version for Unity 2019.2 is 6.9.0, which does not have this issue. 6.9.1 does, but I cannot upload a separate version for this since the asset store only works with Unity versions. So even if I fix this, there's not a good way to to make it work in both.

    The fix, btw, is the change that line to:

    o.clipPos = MetaVertexPosition(v.vertex, uv1, uv1, unity_LightmapST, unity_DynamicLightmapST);

    in the microsplat_terrain_unityld_template.txt file.
     
    Last edited: Dec 1, 2019
  39. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    240
    gotcha, thanks for the fast response!
     
  40. raidzhi

    raidzhi

    Joined:
    Jan 13, 2016
    Posts:
    32
    microsplat-terrainblending.png

    In editor , when I switch the graphics api to Vulkan(in PC setting)with platfom of android.the terrain become dark.like this picture show.
    And, without any error,or warning.
     
  41. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I'm testing this now, but one thing you might want to check is that Graphics Emulation hasn't been turned on in the editor. This can set the API level lower than what is actually supported.
     
  42. raidzhi

    raidzhi

    Joined:
    Jan 13, 2016
    Posts:
    32
    No,I tested on my phone with Qualcomm snapdragon 835. got the same result.
     
  43. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Ok, this is fixed. There were actually two issues. The first is that Unity changed the texture import settings so you can't set the default importer to an RGBAHalf texture. The platform supports it fine, but the importer settings no longer does. So what I've done is to make it set the importer settings on every platform to the proper formats and also test the format, choose half/float depending on what's supported, and throw an error if neither are (WebGL1, for instance).

    The second issue is that the default texture compression for terrain textures on Android is ETC2_RGBA8, which is supposed to be required on OpenGLES3.0+, however, for whatever reason it isn't supported on Vulkan under android, which seems odd. So now it tests to see which formats are supported until it finds one which is, or defaults back to uncompressed. It tests ASTC, ATC, ETC2, PVR, DXT formats, so that should cover the gamut.

    This will be included in the next patch. If it's blocking you send me invoices and I can update you - but I'm working on some major changes so I'll need to send you each module you own.
     
  44. raidzhi

    raidzhi

    Joined:
    Jan 13, 2016
    Posts:
    32
    Thanks for your fast response,I will wait for your next patch
     
  45. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    240
    Hm in fact, metavertex error has disappeared properly thanks to that fix, but there's still those two when they load:
    upload_2019-12-3_11-44-23.png
     
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Can you PM me the actual shader files, along with versions of LWRP/Unity/Platform your using so I can try to repro it? I'm not getting that in any of my tests on 2018.3, 2019.1, 2019.2, 2019.3 (using the default versions of LWRP/URP that those unity versions install). Got SRPs are a mess.
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    So if anyone else is getting this, what has worked to fix it for me is downgrading/upgrading to the other version of the SRP and back. What I believe is happening is that the store is pulling down some outdated dependency, and so doing so upgrades that to the correct version. Let me know if that works.
     
  48. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,557
    IMG_7538.PNG

    The Anti Tiling plugin is working great in my scene on the grass and the snow. As promised there is a really nice blend when you get far away that removes all tiling and I love it - thank you. My only problem is where my snow and rock overlap I get tiling that im having trouble removing. Im going to keep working on it but im wondering if there's any suggestions that come to mind? Maybe somehow the snow and rock are exactly matching up? Or maybe there is another setting im missing?

    Edit : I did some more testing. I have 8 textures and I am using Mapmagic, maybe that has an effect? About maybe 4 of the textures tile when I change the UV resample amount on the material, while others stay static. Maybe its because im using Biomes? or some other thing?

    You can see the effect in this video - only the grass is changing UVs:



    And my settings. Does anything stand out?

    Screen Shot 2019-12-03 at 1.45.55 PM.png
     
    Last edited: Dec 3, 2019
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461

    There was an error a while back that when Max Texture Count was set to 4 only 2 of the textures would get distance resampled. However, I believe that was fixed about a month ago, and you said you have 8 textures? So they should all get the effect. If it's not either of those, send me a repro scene and I'll take a look.

    Also, you could try putting it on Full (Thought it should be fine in Fast)- this resamples all 4 textures for the pixel instead of the top 2 highest weighted ones (which is usually all you need, but the bug described above was that in one specific case it wouldn't sort the samples, so 2 textures got resampled instead of the two highest weighted once for that pixel).
     
  50. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,557
    Thank you for your help:) You're very thorough.

    I updated from 2.6 to 2.8 and changed Max Texture count to 8 and 16 and tried full (and everything on). Those didn't work so I recreated part of the seven. Could you et me know where to send it? Im using Unity 2019.2.8

    In the scene you might have to press play for the textures to generate - sometimes the terrain textures go flat when I press save. You can change the UV Resample size in the MicroSplatTerrain texture to see the effect - the grass changes uv size but not the snow or the rock.
     
Thread Status:
Not open for further replies.