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

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    950
    I understand your frustration but the question was polite. Nobody insulted you.
    Calling them a 'script kiddy' for updating to a release that runs natively on their CPU architecture was unwarranted.
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    That wasn't directly aimed at them only, rather the fleet of people who seem to think upgrading the the latest beta or alpha release of Unity is absolutely required for them to work with, and send sentiments exactly like this one to me nearly every day. The reality is that anyone who actually ships products on Unity doesn't do this, and generally works on LTS versions or moves to tech releases very early in the development process and accepts the pain which comes with that choice.Insinuating that I'm some how not supporting my products or being lazy because I don't want 150% of my development time spent supporting SRPs instead of the current 70%, just so they can play with new toys, is not a quick way to get on my good side, and I'm more than happy to lose a customer who thinks those kinds of comments are somehow warranted.
     
    Rastapastor likes this.
  3. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    I combined MicroSplat Global Texturing with my Gradient Picker, in case anyone has use for it. Looks like this:

     
  4. Zenchuck

    Zenchuck

    Joined:
    Jun 2, 2010
    Posts:
    297
    SImple question here, I am trying to use the decal plugin and find that on import the example assets are not loading into the project. How can I fix this?
     

    Attached Files:

  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's a walkthrough of how to install the samples in the core documentation.
     
  6. tolosaoldfan

    tolosaoldfan

    Joined:
    Sep 14, 2012
    Posts:
    92
    Concerning the "freeze" of the Unity team, maybe you can give the possibility to your customers to download your 2021 beta, like the author of Beautify does. It could unlock some situations.
     
  7. JamesHorn_AbsolutelyGames

    JamesHorn_AbsolutelyGames

    Joined:
    Jul 5, 2021
    Posts:
    2
    For anyone with a similar issues this was resolved by upgrading to latest microsplat version
     
  8. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    950
    What's the recommended way to disable tessellation during runtime?
    I haven't tried anything yet but I can either try modifying material properties or swapping the material out.
     
    Last edited: Jan 11, 2022
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Create a new MicroSplatData folder for each variation you want (high, medium, low, whatever), copy your keyword file into each of them, create a material and microsplat shader in each (and assign the shader to the material), then edit the settings to generate an alternative version of the shader. At runtime, swap the keyword file on the MicroSplatTerrain component, set the new shader on the template material, and call MicroSplatTerrain.SyncAll();
     
    Wolfos and Recon03 like this.
  10. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845

    ( Not just directed at you) comments like this, is why many vet developers won't release any thing...or they abandon good assets..

    .... As it is, Jason and other developers work there ass off, for little to no money.... I really wish I would see some of you release your games and WORK for nothing... or next to nothing..

    . Asset developers, have ZERO CONTROL over when its released.... Unity also for most assets, its been months even when they submit months ago.. (SO yell at Unity )

    We need to be fair to developers like Jason, and stop the bitching.. and be respectful.. if it wasn't for him, you all would be having to make this stuff your self...( Be glad its not people like me, I would of told users that are rude to make it them selves.

    ( Makes me annoyed) when people are rude, to hardworking developers).
    You guys get AAA work for less than indie cost... so people should be greatful. ( just saying)
     
    TapCrush and Willbkool_FPCS like this.
  11. mpa7ster

    mpa7ster

    Joined:
    Jul 6, 2020
    Posts:
    4
    I had to click on one of the shaders to show it in the inspector window and then click "Pack all in Project"
     
  12. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    950
    Thanks. Oof, seems like a lot, but it's workable.
     
  13. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    Does anybody knows why this happens?



    After converting it into microsplat some features of the textures disappears, as the reflection with the water on the pavement.
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You need to add the smoothness textures.
     
    matiasges likes this.
  15. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    Ok, thanks.

    Something else: when I scroll down in 'Paint texture' on the terrain it gives me a "DivideByZeroException" warning. So it goes automatically up and it doesn't allow me to change settings like brush size, etc.
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    That's unity's editor, not mine..
     
  17. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    950
    Are you using the terrain tools package?
     
  18. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    Yes. But it doesn't happen anymore, I don't know why... it comes and goes
     
  19. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    950
    Sounds like a bug in terrain tools then. This has only recently gone out of preview with Unity 2021, so you're likely using a preview build still.
     
    matiasges likes this.
  20. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    Hi, one more thing: when I replace a texture in the Microsplat Texture Array it conserves de previous normal map, even when I replace the previous normal map with another one.
    Example: I replaced a mud diffuse map, normal, height, smoothness and AO, the diffuse shows right but the normal is the same as the previous one.


    It should be like the one on the left:


    The one on the right is with a normal strength of 1, if I increase it, it looks completely wrong, with exactly the normal map as the previous texture.
     
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Somehow I doubt this- the array is created from scratch every time, there's no way it could hang on to the original normal. Most likely, you have the wrong normal array assigned to your material.
     
  22. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    I don't know but anyway I fixed it. I changed the packing mode to 'fastest' and now it has the right normal and smoothness.
     
  23. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    That's because you changed that control without reading the documentation on what it actually does. Had you done that, you would have known it outputs to a different set of arrays with the normal and smoothness/ao in two texture arrays, not one. So many "support issues" can be avoided if you read about things before you randomly change them.
     
  24. matiasges

    matiasges

    Joined:
    Jan 24, 2021
    Posts:
    142
    Okay. I actually read the documentation, I probably didn't understood it completely on that point, and I had an issue that I couldn't get an answer on this thread, but that's what support is for (one is not an expert with an external asset, even with the documentation), specially when on the options it shows 'fastest' and 'quality' is a bit confusing.
    Nonetheless I achieved some great things with the asset, besides the lights not being baked and the quality of the pictures not the greatest:



    Cheers.
     
    Willbkool_FPCS likes this.
  25. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Hi,

    Took some time to read the documentation core + the FAQ just to make sure I wouldn't be that annoying dude asking questions that can be answered by "please read the docs I spent thousands of hours doing" :p

    Our setup uses a LOT of terrains and we're doing scene/asset streaming because we can't load all the terrains at once for obvious performance reasons. In fact, we don't even load all the terrains in the editor. We only load parts of the world that we want to work on, then save them. It's simply because there's too many terrains to load them all without crashing the editor, out of memory.

    So I was looking at the microsplat workflow for multiple terrains so that all of them share a single reference material. How would I go and setup these in my use case? I am used to running scripts that will cycle through all my terrain scenes and run something in each of them. So ideally I'd cycle through all my scenes and convert them to microsplat with a single shared material, through scripting.

    Do you suggest I convert one terrain first, then use this material for all the other ones? Thanks in advance for the advice.
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yeah, assuming they all share the same layer layout, you can just add the component to each and press sync.
     
    marcrem likes this.
  27. Dante20011

    Dante20011

    Joined:
    Mar 3, 2015
    Posts:
    34
    Hi! Asset is awesome!! One question: Any advice to make the snow and the dirt mix well on the borders? This is with Trax!
     

    Attached Files:

  28. boehmi1988

    boehmi1988

    Joined:
    Jul 14, 2020
    Posts:
    2
    Hey everyone,

    i have a strange problem when building for Android (tested on Galaxy S6 Edge).
    Already contacted the publisher, but he can't really help me... maybe one of you had similar issues and can help.

    I created the microsplat terrain following the core docs and did not add or modify any further settings on the shader / config texture array - see attachment.
    In the Editor/Playmode on MacOS everything looks nice and as expected but on the Android phone terrain textures are flickering in a strange way and some "squares" are visible (see videos below). Also the textures seems to be in a different order - compare video with editor screenshot below.
    When changing some settings of the shader (for example Max Texture Count) - the flickering just changes it's style or affecting other/more areas.

    example video (untouched default settings):


    another example (just changed Microsplat Max Texture Count from 8 to 16, no further changes):


    this is the editor (+settings) where everything always looks fine:
    Bildschirmfoto 2022-01-26 um 14.27.48.png

    Steps to reproduce:
    - Create new project
    - Switch to Android Platform
    - Import Microsplat package https://assetstore.unity.com/packages/tools/terrain/microsplat-96478
    - Open Microsplat Terrain example scene
    - Do not change anything
    - Build and Run Scene (on Galaxy S6 Edge) -> flickering textures
    - Play around with different settings of the microsplat Material/Shader
    - Build and Run again -> different kind of flickering

    Microsplat version 3.9.9
    Unity 2020.3.17f1 (MacOS)
    Built-it render pipeline (also tested with URP - same result)

    No compile/shader errors.

    I also tried Draw Instanced on the terrain, ASTC texture compression, switching to packing mode "Quality" (shader+array) and different Android Quality Levels without success.

    Max Texture Count is not exceeded.

    Built-in Unity terrains work fine.

    It works on Google Pixel 5 though. So hardware differences might play a role.
    But if it's broken on one device, other models might be affected too.

    Any idea how i can fix this problem or how to isolate it further ?

    Thank you!
     
    Last edited: Jan 27, 2022
  29. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    @jbooth Good evening sir, I just upgraded to the Microsplat HDRP 2021 package and also updated all other module packages, and now my terrains are not drawn. I re-generated the shaders and texture arrays...

    Appreciate any input from you to solve this, thanks!
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Just not drawn? Are the materials set to HDRP2021?
     
    olavrv likes this.
  31. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    It was not set correctly, but now working fine! Thanks for quick response, appreciated!
     
  32. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    I've got an editor script that copies a Unity terrain and all it's Microsplats data to another one with selected modifications (for generating different seasonal variations off a master copy). However, the duplicated propdata isn't working. The duplicated Per-Texture properties exposed in the terrain material editor don't match the source data, AND the shader appears to be ignoring the data and using default settings instead.

    I am duplicating the propdata asset, assigning it to the MicroSplatTerrain.propdata, calling ClearPreviewCache() and then SyncAll(). Should I be linking or refreshing something else first? Going to the MicroSplatsConfig asset (which I also duplicate) and clicking Update to rebuild the shader doesn't fix it.
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You likely don't have it assigned to the material.
     
  34. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    Good evening Mr. Booth, I have another issue I am hoping I can get your indepth knowledge to resolve; I get these "non-textured" areas at close zoom levels at runtime, but they disappear when camera is at a certain distance.

    Please check attached screenshots for reference. Probably something I am doing wrong, but I am a bit stuck...
     

    Attached Files:

  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I'd a/b various features and see if one of them being on makes a difference..
     
  36. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    This seems to happen when the "Base Map Dist." on the individual terrains are set to > 0
     
  37. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    MicroSplat sets base map distance to 0 when tessellation/POM and detail noise are unused, otherwise it generates the main shader w/ tessellation for up close, and the _base shader is used for further away. Does the main shader have compile errors? Are either of those features used?
     
  38. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    POM is enabled... No shader compiler errors... Switching from POM to offset makes it work...
     
    Last edited: Jan 31, 2022
  39. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    Thanks - but how is the propdata associated with the material? All I can find in the code is where it loads a propdata asset with a matching name, but doesn't seem to do anything with it. I presume somewhere it links the shader to the propdata fields because the terrain still updates when I modify the old propdata...

    [EDIT] Bit further investigation - it appears you're correct, but I don't understand how. The propData values are packed into the propTex which is assigned to the mtl for the shader to access. Everything looks correctly set up in Unity, however the Find Reference plugin tells me the autumn material has a reference to the summer propdata. Where? The only possible reference I can find is the shader referencing the propTex, but Unity's own reference tracking tells me that is referencing the autumn propTex.
     
    Last edited: Feb 2, 2022
  40. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Hello Jason Booth

    Thanks for banning from Discord and block that i can't write you at Discord direct Message i only asked some questions nothing more. Then you get so angry really? Is that how you do with customers?

    Thats allowed as customer bought you asset and payed over 100$s for it.


    So still same questions i sended you for making traks look like this,

    and one
    More if use Splitscreen with 2 or 4 players how can use Trax that everyplayer sees them not only if near the 1st player?

    Because in your documentstion stand only one Trax Manager when use 2 only 1 works,
    And when make it static in world need make world size big but then traxs looks bad.

    Again thank you this are only questions you can answer without be angry with customers aksing normal
     
  41. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's a reference to the propdata on the MicroSplatTerrain component as well as on the material (this is due to a long story about how Unity can't properly serialize a linear floating point texture without gamma correcting it and destroying the values, so having to use an object that generates the texture instead, and materials not being able to store references to textures - so the propdata needs to be looked up by name sometimes). Anyway, likely the one the terrain is finding is different than the one assigned to the material.
     
  42. Aleksandre-

    Aleksandre-

    Joined:
    Dec 1, 2016
    Posts:
    3
    Hello.

    I use unity 2021.2.8f1 in HDRP

    When I use the stream and puddles module with the tessellation module, as soon as I paint a puddle on the terrain I lose the displacement on the painted area, is this normal or how do I fix this?

    puddle.PNG
     
  43. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Puddles are flat- when you paint puddles, it fills up the height field from 0-1, so if your texture only goes to say, 0.5, the water gets higher than the texture..
     
  44. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    There is no tutorial on wet terrain, which can't be found on YouTube
     
  45. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    I want to make the terrain wet and ponding when the game is running
     
  46. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    Are stones and vegetation supported?
     
  47. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25

    Achieve this effect
     
  48. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    Can it be achieved? I can't find a good tutorial. I'm hesitant to buy it
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Do you really think 5 posts were needed to ask this question?

    There's literally a video in the asset description of every module showing how the module works, right there on the page. There's also like 40 videos on youtube, and all the documentation is available in the free core module so you can see how everything works before buying anything, and also available online. I don't know how much more obvious it could possible be.
     
    Recon03 likes this.
  50. xiaojianh6

    xiaojianh6

    Joined:
    Jan 20, 2021
    Posts:
    25
    Hi, I only found the stream and lava when running, no video of puddles and wet surfaces when running
     
Thread Status:
Not open for further replies.