Search Unity

[FREE]MicroSplat, a modular terrain shading system for Unity Terrains

Discussion in 'Assets and Asset Store' started by jbooth, Aug 9, 2017.

  1. Quittern

    Quittern

    Joined:
    Oct 9, 2018
    Posts:
    17
    I'm having the same problem that the person you replied to a while back here. Just made a build for android and getting pink terrains, and the terrain blend doesn't work on the rocks I put it on (obviously, I guess it couldn't work when the terrain doesn't). My test phone is newer though, from this year.

    I don't really understand where you can check for texture array support? Is this a setting in Unity, or something only certain phones can do?
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    Anything supporting OpenGLES3.0 or greater should support texture arrays. Usually a pink shader means a compile error, so see if there's anything in the build logs.
     
  3. m506

    m506

    Joined:
    Dec 21, 2015
    Posts:
    93
    HI, I can confirm this issue disappeared as of the latest version. Thanks

     
  4. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,488
    I have an issue that's not a game breaker, but if anyone knows why it happens it will help my workflow.

    I use microsplat with MapMAgic terrain. As long as I leave one terrain generated when I save teh scene, the terrains will load on an iPad with all the materials as expected.

    But if I save the scene without any terrain generated, then on iPad teh terrain will be black.

    I am guessing that when I generate and leave a terrain in the scene its generating the Microsplat textures or somehow adding them to the scene and compiled project?

    If so is there a way or something I need to do that could "preload" or forcibly include these micros plat terrain materials into my builds?
     
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    we’ve seen things like this when using asset bundles; particularly with draw instanced on my n Android. However, if this is happening on iOS I suspect map magic is not including some needed data; for instance, it doesn’t set the keyword file on terrains which is needed for some features.
     
    protopop likes this.
  6. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,488
    Thank you. This helps a bit. A few things, not expecting a solution straight out but including this incase anyone sees anything and as I look into it. Like I said though its not a breaker because I can keep including a microsplat terrain in my build and that solves everything.

    You mentioned draw instance. It works if I include a microsplat terrain.

    If I dont include a terrain I tested it and the terrain becomes invisible with draw instance turned on, and visible with 1 micro-last texture if I turn int off.

    In the Xcode notes I think the trouble starts here:

    WARNING: Shader Unsupported: 'Hidden/Nature/Terrain/Utilities' - All passes removed
    WARNING: Shader Did you use #pragma only_renderers and omit this platform?
    Shader 'MicroSplat/Terrain 0,0': dependency 'BaseMapGenShader' shader '/Terrain 0,0_Base808519755' not found

    I guess when I include a terrain it somehow makes sure this dependency the basemapgenshader is included? It gives me a starting point to look into it.

    These three messages dont appear if I include a terrain so I will keep looking into it. If anyone has any ideas that could help please let me know, even if they seem unrelated. sometimes an outside perspective helps:)
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118

    Well, MicroSplat doesn't use a basemapgenshader, so that error shouldn't matter much. That said, Unity just got back to us on the addressable issues with a "Won't Fix"

    https://issuetracker.unity3d.com/is...ncorrectly-when-terrain-instancing-is-enabled

    So it seems the official solution is to include a terrain in the main build or Unity is just broken.
     
  8. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,115
    Does Hdrp support all the extensions
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118
    faq
     
  10. prg-liulie

    prg-liulie

    Joined:
    Dec 23, 2017
    Posts:
    12
    Mesh Terrain material seams to receive no light in URP in Unity 2020 LTS, please have a check :)
     
  11. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,133
    I bought Trax on the sale and am trying to add it to my game, which is already using the Microsplat Terrain Collection.

    As soon as I add the TraxManager component to a gameObject, the Unity editor just hard crashes. I've reproduced this four or five times now, adding it to an empty gameObject, adding it to the Terrain object, adding it to a scene with Microspalt already enabled and without Microsplat - always the same result. I can also reproduce it when the scene doesn't even have a terrain.

    I'm doing this in a test scene which is essentially empty (camera, light, terrain and one building for scale).

    Unity version is 2021.2.4f1 on MacOS, using the built-in render pipeline.

    The last message in the editor log is:

    Code (csharp):
    1. [./Runtime/Graphics/RenderTexture.cpp line 521]
    2. RenderTexture.Create failed: colorFormat & depthStencilFormat cannot both be none.
    3. UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
    4. JBooth.MicroSplat.TraxManager:LateUpdate () (at Packages/com.jbooth.microsplat.trax/Scripts/TraxManager.cs:286)
    5.  

    ---

    Update:

    I can reproduce this on a completely new project. Create new project, import just Microsplat Core (version 3.9.4) and Trax (version 3.9.1), add empty game object to default scene, add Trax Manager component - hard crash, same log message as above.
     
    Last edited: Nov 28, 2021 at 11:47 AM
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,118

    Give it a try on an LTS version and send the repro to Unity- it doesn't crash on 2020.3LTS, so this must be some kind of regression in the tech release.. The warning you see is a warning, fixed in a newer release, but that shouldn't have any real effect except stopping that warning from being printed out.
     
  13. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,133
    Done. Bug report to Unity is sent.
     
    Last edited: Nov 28, 2021 at 8:48 PM
    jbooth likes this.
  14. gtox

    gtox

    Joined:
    Apr 23, 2013
    Posts:
    21
    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 at 10:22 AM
  15. fp-liulie

    fp-liulie

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

    Dante20011

    Joined:
    Mar 3, 2015
    Posts:
    18
    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?
     
  17. Dante20011

    Dante20011

    Joined:
    Mar 3, 2015
    Posts:
    18
    Nevermind, I updated Microsplat core and it works now
     
unityunity