A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Calling all New Unity users! Join the Halloween Mods Showcase Challenge until October 31.
Discussion in 'Assets and Asset Store' started by jbooth, Aug 9, 2017.
Do you know when is the module going to be released?
No, I've got a windows only bug I need to fix in it and just haven't had the energy to deal with it. It's actually been sitting in my depot for like 5 months now
I have some planes with custom surf shader on terrains. Would it be hard to add wind effect on these seamlessly?
One way is to turn on the Terrain Blending feature, and set the blend distance up high. This will cause the terrain texturing to be drawn over your object, texturing it with whatever features the terrain has, including wind. You can paint in the vertex colors to control where the terrain is drawn as well- however, if you don't draw the terrain the wind effect won't persist there.
Another would be to copy the code out of the wind shader and implement it in your own shader.
How heavy do you think is the procedural shading on an old Intel HD 4000? If I use a terrain without micro splat and self shadow it performs at 60fps. With microsplat shaders it went down to 40,with a big spike during the terrain renderer. Didn't have the time to profile it properly as it may still be due to shadowing as well, but I suspect that the problem is the complexity of the pixel shader. Thoughts?
Completely depends on the features used- but try lowering screen resolution to see if your really GPU bound or not. I find it rare for that to be the case in most games.
Oh I did profile with Intel GPA and it's totally gpu bound also because there is just the terrain and nothing else in the scene. I just didn't have the time yet to pin it down to the shadow or the pixel shader. I was just asking about your experience and if you had suggestions in case.
Not without knowing your settings and the data your using (textures, etc)
How would I go about adding the required data to my prefabs so I can use instancing with blendable module?
Do I need to manually create a material for every mesh I want it on, remove the material property blocks and assign the needed Arrays? Do I need to pipe in the Control0 to 3 too? Are these the splat maps?
Also as a follow up, the blendable section doesn't seem to be working with postprocess stack v2 ambient occlusion Scalable ambient obscurance doesn't shadow properly. The AO is being applied underneath, making for weird artifacts. Here's a screenshot:
Ignore the white streak across.
I'm using the defered path, a directional light, no GI, Unity v2018.3.2f1.
Hello I am back with more data, but first an unrelated question:
what should I do about this warning? Are Cavity maps needed and for what scenario?
OK now back to our data:
as you can see the terrain rendering takes 8ms, and it's totally due to the pixel shader only (if I disable it it goes down to 0.9ms).
5 textures are sampled (as you can see in the image)
We use two terrains, one it's called vista and all together is much faster. The only difference seems to be the resolution of the Base Texture Res and Control Texture Res, so we are currently investigating if we can lower the resolution of these textures on slower machines
Edit: please let me know when the warning spam is going to be fixed
I just realised that micro splat doesn't work if the Draw Instanced option is enabled, will this be fixed (currently I can't see why it shouldn't work)
Edit: I also noticed this other warning today:
Stochastic breaks the transition between terrains on same texture. Do you have any solution for this? Both have same settings on shader and texture properties.
I'm using unity vers-2018.4.0f1, I got weird errors when I imported microsplat;
Binary to YAML conversion: type UInt16 is unsupported
...any idea what's going on?
Is there another way to get support, this forum thing is dead.
I understand it can be hard to wait, but I would advice a bit of patience.
I don't know why Jason is not responding this last week, but in the time i have been on this forum, i have found his support to be beyond excellent.
You could try the discord channel (link is on page 1 of this thread)
I toyed around with the terrain holes today and created a different script than the one that's linked in the description. For some reason the one in the description didn't work for me (maybe because my gameobject has colliders in the children?). Anyway, here it is in case anyone has use for it:
* Add empty gameobject.
* Add collider to it, set to IsTrigger.
* Add rigidbody, enable IsKinematic, disable UseGravity.
* Add this script and set gameobject and terrain in inspector.
public class EnterHole : MonoBehaviour
public GameObject player;
public TerrainCollider terrainCollider;
void OnTriggerEnter(Collider c)
if( c.gameObject == player)
terrainCollider.enabled = false;
void OnTriggerExit(Collider c)
if (c.gameObject == player)
terrainCollider.enabled = true;
Please note it disables and enables the terrain collider for everything, but it was good enough for my sunday morning project. This is how it looks:
I have a Problem with Microsplat:
Using Unity 2019.3.0a2
This happens when i add the Microsplat script to a terrain and press the convert button.
Systemspecs (just to be sure its not because of that):
AMD FX 8320e CPU, nVidia GTX 970, 64GB DDR3 Ram, 6TB HDD with ~1TB free as Datadisk (where the asset folder is) and a 320GB SSD as Systemdisk.
Any Idea ? Because it happens always when i try to use Microsplat :/
2019.3 is alpha (not even beta).
solution: wait 6 months.
Another lovely module has been released :
@JasonBooth : Why haven't you announced it? Where are you?
He's been active on the One-Batch forum so maybe he's not receiving that there are new replies on this one. It happens to me almost daily that one of the threads that I'm subscribed to doesn't inform me that there are new replies.
That's why I use the "Watched" link above. The "Alerts" popup doesn't show all.
You only need the cavity map if you are using the erosion or cavity features in the procedural texturing system. Now, why it's taking 8ms can be a number of reasons- first, procedural texturing must be performed before anything else can be sampled, and depending on how many layers your using it can be expensive since it is computed per pixel. Baking the result to a splat map is always going to be faster, but it really depends on your workflow. Beyond that, without knowing your setup, I would check the debug section for how many samples you are doing per pixel, as that will give you an idea of memory bandwidth usage.
The base texture is not really used by MicroSplat- it is however used by the Unity lighting system to compute GI bounce when lighting is baked.
What warning spam are you seeing?
It works fine in draw instanced mode, however, Unity doesn't currently support tessellation with surface shaders, so tessellation gets disabled when draw instance is enabled.
Another user reported this, but thats some kind of internal Unity error since UInt16 is a c++ type, not a C# type, and I don't use any uints anyway. Not sure what I can do about this, but it appears harmless.
Try waiting a moment- like, I'm a sole developer and have a right to my life, and am not bound to spend it chained to support forums for the tiny amounts of money I charge for this software. I also had my laptop stolen so am basically responding on a phone. This forum is hardly dead either, you'll see I post just about every day. You want better support, you can pay my hourly rate and put me on a retainer for faster support.
Likely it can't write to your drive for some reason- maybe permissions? That said, I don't support beta Unity versions, hard enough to deal with the breakage in official versions.
Hmm, are you using world space UVs? I would expect that if you are it would transition fine.
I'll add support for Unity's hole solution when it ships, and likely support it in the core package and depreciate holes for 2019.3 and up (or leave it for people who already have it in place). While my solution has more options and is quite usable, I think the official one will be better for most people.
Oh, I just noticed your using LWRP - I haven't tested instancing over there in a while, so will check that again. SRPs are a royal pain because it's like having to write to several different rendering engines..
I am using Microsplat with Mapmagic. I attempted to turn on Terrain Blending in the shader for Terrain 0,0 and then place an object on the terrain with the Micro Splat Blendable Object component following the instructions provided. However, the component indicates, "Terrain shader is not setup for blending"
Is there a step I'm missing? Thank you.
Yes, blending requires the terrainData to be generated, which you can do by pushing a button on the MicroSplatTerrain component to generate it. You’ll have to generate this data yourself somehow if map Magic is generating the terrain at runtime.
This is what is happening even if I hit the Update Terrain Descriptor Data button on Micro Splat Terrain component in the Terrain 0,0:
Pink is usually a shader compilation error- do you have any errors in the console? Do the shaders in the MicroSplatData directory all compile?
Only three warnings:
When I reimport the microsplat folder and also recompile the shaders:
The TerrainBlending example in the MicroSplat folder doesn't have the issue. And, even after I recompile the MicroSplatData folder in that example shaders they don't have the same stream uninitialized warnings that my other scene does.
I'm using Amplify Shader Editor, AmplifyOcclusion, AmplifyColor, VegetationStudio Pro, MapMagic, MicroSplat, Enviro, FogVolume 3, Lux Water, and Post Processing stack.
Adding a blend mat in the Debug of the Micro Splat Terrain component of the terrain for MicroSplat_TerrainObjectBlend seemed to provide partial progress because now I can see the blending shader working.
Obviously, this isn't blending the correct terrain at this height. It picked the wrong texture.
The warnings shouldn't cause any issue. You could step through the code in MicroSplatBlendableObject to see if it's grabbing the right terrain and getting the data you expect. It basically raycasts down, finds the MST component on the terrain, and grabs the data the shader needs from that.
i have 2 questions about procedural texture asset,
- is there a way to avoid an area or areas to be painted in the terrain?
- is possible to paint manually after create the layers?because i am trying to paint a river and i am not able
There’s no runtime way to combine a pre-generated splat map with procedurals if that’s what your asking. You can however bake the procedurals back to a splat map and paint from there.
Thanks, can you tell me how to do that?sorry my newbie question
There’s a button on the terrain component which will bake the procedural output back to the terrain. I’m still waiting on a replacement laptop for the one that stolen, so can’t really check right now.
I appreciate that maintaining all the pipeline must be incredibly time consuming, but we started using microsplat because it declares LWRP support. I list again our current warnings/errors:
Shader warning in 'Hidden/MicroSplat/Map_01_Terrain_Base-1057449523': 'SAMPLE_DEPTH_TEXTURE' : macro redefinition at Packages/com.unity.render-pipelines.core/ShaderLibrary/API/D3D11.hlsl(114) (on d3d11)
Compiling Vertex program with FOG_EXP _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
Shader warning in 'Hidden/MicroSplat/Map_01_Terrain_Base-1057449523': 'SAMPLE_DEPTH_TEXTURE_LOD' : macro redefinition at Packages/com.unity.render-pipelines.core/ShaderLibrary/API/D3D11.hlsl(115) (on d3d11)
Shader warning in 'MicroSplat/Map_01_Terrain': 'SAMPLE_DEPTH_TEXTURE' : macro redefinition at Packages/com.unity.render-pipelines.core/ShaderLibrary/API/D3D11.hlsl(114) (on d3d11)
Duplicate basemap name: '_MainTex'. Ignoring.
MicroSplatTerrain:Sync() (at Assets/Plugins/MicroSplat/Core/Scripts/MicroSplatTerrain.cs:141)
MicroSplatTerrain:Awake() (at Assets/Plugins/MicroSplat/Core/Scripts/MicroSplatTerrain.cs:38)
Draw instanced on (rock layer is gone):
Hi Just hit some errors when packing - any thoughts?
Invalid texture format: 29
UnityEngine.Graphics:CopyTexture(Texture, Int32, Int32, Texture, Int32, Int32)
JBooth.MicroSplat.TextureArrayConfigEditor:CompileConfig(TextureArrayConfig, List`1, String, Boolean) (at Assets/Plugins/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1503)
JBooth.MicroSplat.TextureArrayConfigEditor:CompileConfig(TextureArrayConfig) (at Assets/Plugins/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1663)
JBooth.MicroSplat.TextureArrayConfigEditor: DelayedCompileConfig() (at Assets/Plugins/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:989)
Graphics.CopyTexture could not find destination D3D11 texture object. Maybe it is a RenderTexture that is not created yet?
SRPs are a giant pain in the ass. Anyway, what version of unity and what version of the LWRP is this on, and what features are on in MicroSplat?
I was thinking about you today while I was experimenting with HDRP because I remember what you were saying about SRPs. And, I remember thinking, man that guy could actually write his own SRP and tell people he only supports that and it'd probably be better.
Have you ever looked into Unity's samples on developing a custom SRP? It looks pretty straightforward. You get full control of the pipeline. And, when customers ask about how to do xyz on lwrp/hdrp/etc you could just say I only support JBRP. xD
Unity 2019.1.2, LWRP latest version. About the features is a screenshot enough?
We had a custom SRP at my last job. It’s great if you want that kind of control over the pipeline, but unless you’ve got graphics engineers to maintain and support it it’s not viable for many teams, and certainly not something designed for an asset store based environment. It’s real advantage is customizing it for a specific game, not the kind of thing you’d want to support for all possible games.
Yes, screenshot of the shader generation settings is enough.
i press "bake procedural to terrain" button and i get this error