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
    You can't do the first thing, period, there's no "discount one asset when you purchase another" system in the UAS. There is also no "Make one asset free when you buy another" system. The only thing the asset store has is an upgrade system, which allows you to create an upgrade from one asset to another, but you can't do this retroactively. So you can't, say, create asset A, then create asset B and make asset A a free upgrade to asset B. And it's also a 1:1 thing, so you can't make 7 assets the upgrade of another asset, or vice versa. This is all publicly available knowledge if you bother to look, instead of demanding that others spend their time explaining the way of the world to you.

    There is also the new bundle system, which the Ultimate Bundle uses, which allows you to package up a bunch of different assets as a single asset (but multiple download) - the terrain collection was created long before this system was in place.

    If you want to ask someone for something, ask it- but don't go and down rate their work as a way of demanding their attention. That's incredibly rude. That would be like me knocking on your door and saying "Hey, you suck!" and punching you in the face and then expecting you to be nice to me and cater to my needs.

    Also, your accusations that I bundle to manipulate the asset store algorithms is just insulting. By creating those bundles, I split sales across multiple project skews that reduce placement in the store listing - it actually hurts me to offer bundles at a 25%/30% discount to people who would prefer a bundle. And offering the core module for free means it will never be on the front page or featured by Unity. And by making my system modular, I split ratings and rankings across 20 packages instead of 1, but allow people to buy only what they need. It's also a royal PITA to have to upload 20 different packages every time I do a patch- but it offers a ton of benefits to users. If you don't like it and think I'm trying to trick people because you can't seem to know what you've purchased, then by all means go with another system.
     
    Last edited: Dec 16, 2020
  2. Nanofus

    Nanofus

    Joined:
    Sep 27, 2012
    Posts:
    12
    Hi again! I'm trying to use the Tessellation and Parallax module in VR, but I'm getting the following errors:
    upload_2020-12-16_3-15-26.png

    In the game view, the terrain around the player doesn't get rendered (further away it does). Tessellation seems to work fine in the scene view. The only configuration I did was enable the Tessellation checkbox. I have multiple terrains using the same material.

    I also have other modules, Snow and Trax, enabled, but disabling them doesn't have any effect.

    I'm running MicroSplat 3.53 and Tessellation and Parallax on DX11, URP 8.3.1, Unity 2020.1.17.
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Well, could be a ton of different things, actually. First, can you repro on URP 7 series to make sure it's not a URP version thing? I see hooks for UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO and UNITY_VERTEX_INPUT_INSTANCE_ID in all the right places in the code, but it may be that something has changed on 8.3.1.

    Also if you could show what the code is around those line numbers, that might help..
     
  4. Nanofus

    Nanofus

    Joined:
    Sep 27, 2012
    Posts:
    12
    Hi! Unfortunately 2020.1.17 doesn't let me install URP 7, and downgrading my project to 2019 is not possible. I didn't notice that the URP plugin only officially supports 7, I should have checked that sooner :)

    EDIT:
    This trick from earlier in the thread worked!
     
    Last edited: Dec 16, 2020
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Ok, good- been a while since I've shipped a patch, and don't want to release a massive update during the sales, so that fix is already in the next patch..
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You can go look at the publicly available information to see what is and isn't possible, if you want me to sit here and answer your questions for you, I'm $150/hr..
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I didn't ask you for money, I asked you to stop wasting my time. Move along.
     
  8. mohi86

    mohi86

    Joined:
    Oct 23, 2020
    Posts:
    2
    Hi,

    I've purchased the HDRP support to use the Microsplat core and anti-tiling, etc. in my project but I'm getting these errors:

    upload_2020-12-17_12-41-24.png
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Seems like tour using an unsupported version of HDRP, I only support LTS versions, and they removed the ComputeScreenPos function in the latest versions..
     
  10. Skymx99

    Skymx99

    Joined:
    Dec 12, 2015
    Posts:
    11
    Hello,

    I am having an issue with texture channels not updating when I swap out substance files in the microsplat config. I added a substance and was not happy with the one I chose, so I loaded in a different one. I clicked update and all the maps changed to the new one, but the scene is still showing the old one. I restarted unity and no luck. I cleared the channel entry in the config file and loaded in the new substance file but the old one remains. Any ideas? I hope this made some sort of sense.
     
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Most likely you are not updating the same config that is producing the arrays your material is using. Check the diffuse/NSAO arrays on you material, and see if they come from the config you are editing.
     
  12. Skymx99

    Skymx99

    Joined:
    Dec 12, 2015
    Posts:
    11
    That was it. Thank you very much. Dumb mistake on my part. I probably never would have noticed. lol
     
  13. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    besides the parallax blending error ... thanks
     
  14. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    251
    Hi
    I am creating a farm game and i need to plow the field.
    you think "MicroSplat - Trax" can help me this that?
    Thanks
     
  15. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    949
    Might want to make it more clear on the store page that this asset doesn't work in the latest version of Unity then. I can't exactly use LTS either - it's a garbage fire on Series X. What do I do now?
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Maybe read the description that clearly states which versions of the SRP are supported, instead of expecting asset store developers to chase after unity on their daily quest to break SRP versions on every tech/beta/alpha release that you insist you can't live without?
     
  17. Nanofus

    Nanofus

    Joined:
    Sep 27, 2012
    Posts:
    12
    Hi!

    I'm using the Tessellation, Snow and Trax modules. I'm trying to set my player character's movement speed based on how thick the layer of snow is in their position.

    I noticed that TraxManager contains the GetBufferAtPosition function, but I don't understand the values it returns; when I put the player's position into it, it returns a value in the range of around 30-100 that seems dependent on the terrain height, and doesn't seem to be affected by the thickness of the snow (I tried putting a thick area of snow next to an area without any snow, and they return the same value).

    What would be the proper way to do this? Thanks!
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    it returns the workdPos.y of the buffer, or a really large value if the buffer is not depressed in that area. You’d have to compare it against the terrain height to determine how far the depression is. Also, the objects in it will write values slightly lower than the actual terrain, such that it’s like they are intersecting with it when the physics is actually keeping them above it.
     
  19. Nanofus

    Nanofus

    Joined:
    Sep 27, 2012
    Posts:
    12
    Thanks for the reply! I tried doing some experiments, and am still pretty confused:

    I created a perfectly flat area on my terrain with 0 height in world space. I painted it with a texture with a flat heightmap, so no tessellation was applied to it (marked in the picture with red). Still, sampling the buffer with GetBufferAtPosition() on the perfectly flat area returns a seemingly random number between 0-5, as it does on the area with some tessellation (marked in green).

    Additionally, snow does not have any effect on the value; the snowy area (marked in blue) also returns those same kind of values. The Vector3 I give the function is in world space, y = 0.
    upload_2020-12-20_20-22-9.png

    Here are my settings:
    upload_2020-12-20_20-23-22.png

    Examples of the sampled values:
    upload_2020-12-20_20-28-54.png

    What could be going on here? Thanks!
     
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    the buffer is initialized at very high values, then when things are rendered, they’re depth value is written into the buffer if it’s less than the existing value. So a sphere sitting on the ground would leave sphere shaped values around it. It has nothing to do with the tessellation or snow height- that is all computed in the shader.
     
  21. Nanofus

    Nanofus

    Joined:
    Sep 27, 2012
    Posts:
    12
    Ah, ok, thank you for the explanation! I misunderstood how the tracks work. Is there any way to figure out tessellated snow height at any given position, or should I come up with some workaround?
     
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You'd take the original world position of the terrain, then add the tessellation offsets from the snow/terrain. However, to do this accurately, you'd have to sample the height maps with whatever blending and effects the shader is doing, so if you need it exact you'd basically have to rewrite the shader's tessellation code for the CPU. But if you just need an approximation, then you could just use some values comparable to the average offset.
     
  23. olavrv

    olavrv

    Joined:
    May 26, 2015
    Posts:
    515
    @jbooth Unity 2020.2.0f1 is now out, with release of HDRP 10.2.0. Would be fantastic with Microsplat support, does not currently work with HDRP 10.2.0. Merry Christmas :D
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I only support LTS versions of SRPs. Unity breaks things too often to do otherwise.
     
  25. Jinkel92

    Jinkel92

    Joined:
    Apr 12, 2018
    Posts:
    5
    Why does this happen to the material, I can't find any solution. It looks specular or something at a distance.
    Jbooth the gachas.jpg
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Make sure you have latest- there was a bug a while back that on some platforms the last mip was white.. But that was at least a few months back.
     
  27. Jinkel92

    Jinkel92

    Joined:
    Apr 12, 2018
    Posts:
    5
    I have the latest version. This bug sounds like something to me, since unity 5, I think I had a solution but I no longer remember.
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Oh, I believe if you have unity reducing texture sizes through quality levels you can also get stuff like this- as you end up getting different values for the mip map count when you pack textures. So make sure you have quality level set to not reduce texture resolution when you pack the textures.
     
    Jinkel92 likes this.
  29. KristianF

    KristianF

    Joined:
    Jul 19, 2012
    Posts:
    15
    Hey, I ran into the same problem with the "Stochastic Height Sampling Node" asset. Is there a fix coming or can I easily fix it myself?

    Thanks in advance
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yeah, ASE fixed it on there end a while back, so you should just have to grab the latest ASE..
     
  31. KristianF

    KristianF

    Joined:
    Jul 19, 2012
    Posts:
    15
    thank you
     
  32. KristianF

    KristianF

    Joined:
    Jul 19, 2012
    Posts:
    15
    After your fast help I would have another question. Would it be possible for you to make your "Stochastic Height Sampling Node" support Texture Arrays?

    Similar how the "Texture Sampler" works in ASE?

    So if you connect a Texture it behaves like it is currently.
    If you connect a Texture Array you also can specify the index.
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I have no plans to do this at this time.
     
  34. Zimnel

    Zimnel

    Joined:
    Apr 23, 2015
    Posts:
    83
    Hi, this is a question about Mesh Workflow's vertex paint feature. Would that work on voxel meshes created and not locked in Mudbun or in Clayxels?
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Assuming they are just meshes on game objects with MeshRenderer's, it should work..
     
    Zimnel likes this.
  36. Zimnel

    Zimnel

    Joined:
    Apr 23, 2015
    Posts:
    83
    Thanks for the fast response : )
     
  37. Styval

    Styval

    Joined:
    Feb 4, 2014
    Posts:
    8
    Hi,
    I own MicroSplat - Decals and I have an issue when downloaded :

    Code (CSharp):
    1. Assets\MicroSplat\Decal\Scripts\MicroSplatDecalReceiver.cs(38,11): error CS0246: The type or namespace name 'MicroSplatObject' could not be found (are you missing a using directive or an assembly reference?)
    There is no MicroSplatObject component in the package. Can you help me please ?
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    you need to install microsplat's free core module..
     
  39. Styval

    Styval

    Joined:
    Feb 4, 2014
    Posts:
    8
    Thanks jbooth and merry christmass !
     
  40. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello Jason,

    I have owned Microsplat with all its extensions for a while and I love it! My question now is that I have this new job where I have to create a terrain to run in Unity's WebGL, and I wonder if this will run nicely in this platform... Could you advise me on this? I appreciate your input.

    Regards,
    Carlos
     
  41. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Should work..
     
  42. Chosko

    Chosko

    Joined:
    Jun 24, 2017
    Posts:
    8
    Hi Jason,

    apparently there's something wrong going on with the specular workflow. I saw others in the forum complaining about its shiny look, and maybe I have found something. The only way I can make the MicroSplat shader match exactly the "Standard (Specular setup)" shader is the following:

    * Standard (Specular setup) uses a sRGB-exported Specular Map, imported in Unity as sRGB texture.
    * MicroSplatConfig uses a linear-exported Specular Map, imported in Unity as sRGB texture.

    Here is a screenshot when using the sRGB-exported/sRGB-imported texture for both shaders (the square on the right uses Unity's shader, all the rest is rendered with MicroSplat)
    View attachment 762550

    Here is a screenshot when using the setup explained above (sRGB-exported/sRGB-imported for Unity's shader, linear-exported/sRGB-imported for MicroSplatConfig)

    View attachment 762547

    There's still something different (look at the darkest leaves), but it looks definitely much similar. Maybe the difference is related to the alpha channel (used as smoothness) that is also affected by this problem? Just supposing though...
     
  43. Chosko

    Chosko

    Joined:
    Jun 24, 2017
    Posts:
    8
    Something went wrong with the attachments... here are the images

    First screenshot
    upload_2020-12-28_17-14-2.png

    Second screenshot
    upload_2020-12-28_17-12-58.png
     
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    MicroSplat doesn't use alpha for smoothness- by default it packs it in with the normal in the R channel, from whatever texture you are pulling the data from. Looking at the code, it looks like it's packing the specular array as a linear texture, not sRGB, so I should likely switch that to be sRGB.. (if you search TextureArrayConfigEditor.cs for specularArray = new Texture2DArray you can change the last parameter to false)
     
  45. Superjayjay

    Superjayjay

    Joined:
    Mar 28, 2013
    Posts:
    69
    This didn't work for me, the terrain is still reflecting way too much light. Is there any other way? I've already spent hours upon hours on this and playing around with various values when I feel a simple color picker or something along these lines would fix the issue immediately.
     
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    A color picker for what? The "shininess" of the terrain, in a metallic workflow, is controlled by the smoothness value and GGX lighting model for fresnel. If you look in the docs there's a section talking about this, allowing some alternative lighting models if you don't like Unity's GGX model.
     
  47. superkratos

    superkratos

    Joined:
    Sep 4, 2017
    Posts:
    112
    Hi, Jason. Did you receive my PM about HDRP light baking issue with a re-pro project a few days ago? A little response would be appreciated :)
     
  48. Chosko

    Chosko

    Joined:
    Jun 24, 2017
    Posts:
    8
    Hi Jason, thank you very much, that did the trick!

    With this change the shininess problem completely disappeared also... I was wondering why exporting a substance material using the metallic workflow everything looked great, but if I tried to export the very same material converted to specular workflow everything looked super shiny... this might be the reason...
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This change is included in the patch that went out this morning, btw.

    Yes, just haven't had a chance to look at it yet- just shipped 3.6 this morning..
     
  50. Superjayjay

    Superjayjay

    Joined:
    Mar 28, 2013
    Posts:
    69
    I meant a color picker for the specular color, similar to how the standard material works. Ideally I'd use the metallic workflow though, however the smoothness slider doesnt do it as even at -1 it's still way too shiny. The problem could be fixed right there and then, no need to hack around with lighting models or be forced to use the specular workflow and the more expensive performance mode. Is it possible to edit the editor script that limits the slider from going any lower than -1? Would that even work? If so which script is it?
     
Thread Status:
Not open for further replies.