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.
Discussion in 'Assets and Asset Store' started by jbooth, Aug 9, 2017.
I have found my problem- it works if Max Texture Count=Eight and up
Oh, interesting- that kind of makes sense- because in some modes of distance sampling it only samples top 2 most weighted samples. But in 4 layer mode it doesn't sort the samples into the four highest, because there is no need to cull samples - when you switch to Max Count 8 it does the sort, and then everything works. Ok, I guess if distance resampling is on I'll sort the list even in 4 texture mode..
This will be fixed in the next patch..
4 textures height offset blend working great in Microsplat. I just cannot get results like this with any other asset ive tried. Works great. Last picture is roots that use displacement. 8 textures total in this scene.
Looks cool !! what resolutions are your textures ?
We wanted to add some extra detail to our terrain for a mobile game, so we tried implementing Microsplat with the LWRP plugin, as we're currently using LWRP.
Problem is, in the build, when Microsplat is added to a terrain (currently just using two textures, for grass & roads), the game grinds to a ~30fps for modern phones and ~10fps for older ones. The test scene consists of a camera, a small (100x100) terrain with painted on textures using Microsplat and some objects (trees, rocks and whatnot). We've made controls to enable/disable vsync and change the FPS cap dynamically, but it never goes over ~33 FPS.
We're guessing it has something to do with LWRP, as building the scene in Standard pipeline seems to work just fine in capped 60fps. It is possible for us to change to Standard, but we'd rather use LWRP for now.
Also removing the terrain completely from the scene causes the build to jump back to 60fps.
Could you have any pointers to what the problem might be? We've tried building the scene in both Unity 2018.4.11f1 (our current main Unity version) with LWRP version 4.6 and Unity 2019.2.11f1 (LWRP version 6.9), but both resulted in ~30fps builds. I noticed the LWRP plugin seems to support LWRP up to 5.13. We've yet to try with 5.13, would that help? Not even sure which version of Unity supports 5.13, as 2018.4.11f1 only goes up to 4.6.0 and 2019.2.11f1 only seems to go as far down as 6.9.0.
Thanks in advance! Other than our current dilemma, the plugin is great!
Hmm, I would not expect the LWRP wrapper to make much difference in performance from standard to LWRP. Essentially the LWRP module spits out a shader with the required passes, packs up the data from LWRP into surface shader format, and calls into the same code. Since shaders don't really have structures, this all gets stripped out by the compiler, and should result in extremely similar code on both, as the LWRP is very similar to the forward renderer in the standard pipeline. As for versions, I have no idea- the bulk of my work with LWRP involves updating MicroSplat to run with new versions.
Have you checked it out with a GPU benchmarking tool like Instruments (OSX) to see where it says the bottleneck is? Instruments can actually tell you how long the shader is spending in each part of the code.
Thanks, so LWRP should be good to go then. We'll try profiling a bit more. I don't currently have access to OSX, so I can't try Instruments. :/
I'm sure it's got something to do with the terrain, so I'll try to fiddle around with the terrain settings a bit to see if something there is causing the problems.
I did profile a bit through Unity (only CPU side, Android debugging doesn't support GPU AFAIK), and it seems Gfx.WaitForPresent is taking around 60% when FPS cap is set to 60, and -- as expected -- WaitForTargetFramerate is doing the same when FPS is uncapped (which defaults to 30 on Android). The former I'm not sure about, but I guess it can be caused by a lot of different things...
Thought I should note we're getting a bunch of errors in the Editor like these:
I'll report back if I get this solved, could be just something related to our project setup too...
so what’s calling blit with the terrain shader? Sounds like something is using the terrain shader that shouldn't be. I agree with your overall analysis though- but without getting onto a device and looking at what the GPU is doing it's hard to know what the issue is.
I don't want to build my game with Substance plugin, it's causing Bitcode issue.
When I remove the plugin, Microsplat complains with file TextureArrayConfig.
Anyway I can use Microsplat on 2013.3 URP without that file ?
substance has left defined in your build settings; remove the define as other tools use that to know to compile in substance code.
A few announcements:
First, the HDRP module has been submitted. It still has a few issues that I'm working on, mainly that tessellation doesn't work yet and the Terrain Blending doesn't quite match at the seems like it should. But as far as I know everything else is working fine, so it seemed like the time to release it and find out. It will be in the store whenever Unity approves it..
Second, I'm looking for screenshots of the terrain in your projects to use for marketing. I need them 2k in size or greater, with whatever logo's or credits you'd like to have on them (I'll do the compositing, as different uses have different guidelines about where text and logos can be). If you have shots showing off particular features of MicroSplat, that would be extremely helpful as well. Thanks!
I am getting the following warning on Android:
"'ETC2_RGBA8' is not supported on this platform. Decompressing texture. Use 'SystemInfo.SupportsTextureFormat' C# API to check format support."
I guess its from the texture arrays Microsplat creates. Is there a way to choose our desired Texture Format?
Yes, in the texture array config. Though I thought ETC2 was supported on all android devices openGLES3.0 or above?
Not sure, was this a change in the newest update? Microsplat was working prefectly fine till now on openGLES2.0
MicroSplat has never worked with openGLES2.0 - that doesn't support texture arrays.. And nothing has changed with texture code in a long time- latest update was all to add compiler support for HDRP..
Bizarre cause ive been using it on openGL2.0 for a while with no issues. Clearly I need to get a better handle on the situation, appreciate the info / help.
Ok so just in case you were curious, Microsplat runs fine on openGLES2.0 as long as parallaxing is on. No idea why, but I had turned it off to reduce the texture array samples and my terrain was all white, clicked it back on and rebuilt and poof, working again on openGLES2.0.
So, some hardware may have supported the texture array extension before it was approved and required by OpenGLES3.0, but even so it seems surprising to me since OpenGLES2.0 does not support a lot of additional features, but maybe that particular device has all the 3.0 extensions? Why parallax would make a difference is also a complete mystery.
Hi! We need previous version of MicroSplat - 2.68
Do you have GitHub or something like that?
Can you send a link of 2.68 in PM please?
99% of the time someone requests this it's because they pirated some of the modules, updated core, and now don't have compatible versions of the modules.
Programmer with all that MicroSplat stuff has left our small team.
So we need previous version to continue our work.
Ok, we'll try to find a solution anyway.
Thanks for great terrain shader system!
Legally the Unity Asset Store license requires one seat per user for all editor tools, so right now, agree with it or not, you are illegally using my tools.
Yes, I see now
We'll buy it again then.
Thanks again for great stuff!
It this still the case? no mesh support only terrain?
Because I have some tools that can convert my terrain to mesh and it would be nice if I can use the MicroSplat on that.
Look about 4 posts up..
I knew it
I'm trying to get tesselation to work on mac, build platform ios and metal as the render mode in default renderpipeline
is this supported?
I'm getting strange artifacts when zooming close.
That's really odd- I dev on mac as well. What version of unity? And have you tried in a fresh project?
In a clean project it works !
Unity version 2018.4.12f1
I'm using it mapmagic, and perhaps I use some wrong settings,
I will check how to reproduce in the clean project ( if I can )
Ok found the issue, the terrain base map distance was not on zero.
Edit: still not sure if its working how it should
I will check more
So, the base map distance is used to set the shader to switch at the end of the tessellation- MS outputs two shaders, one with and one without tessellation, and uses unity's base map as the non-tessellated one.. The base map distance should be set by the MicroSplat component on the terrain.
I got some more digging done
New project 2018.4.12f1
- platform macOS
- import microsplat
- import tessellation
- open tessellation demo scene
- enable Draw instanced in terrain setting - stops working
Can you confirm if draw instanced is supported or not?
Draw Instanced doesn't work with Surface Shader tessellation (this is a Unity bug in surface shaders which they will likely not fix, considering they are trying to push everyone to SRP). The newer version of MicroSplat should turn off draw instanced when tessellation is enabled though, but if you're having MapMagic manage everything it might be going through its own code paths..
Do you know if there is a big performance difference between Draw instanced and not instanced?
Do you have a case number for the bug?
I see you mention it here
They closed mine as fixed when it's clearly not. Several people have bug's on it, but no motion. Basically they don't copy the instance ID between some of the tessellation stages correctly, and is most likely a very easy fix- you can in fact see the bug in the output shader code if you display it. But getting someone to do it is the issue.
Perf wise, draw instance is a big help on the CPU, so if your CPU bound it can make a nice difference.
Does Microsplat or any of its modules support height/slope based auto-painting?
i.e, if the terrain is flat I want grass, if its a slope I want a mountain side, and so on, basically allowing me to skip manual painting, and unlocking the ability to do proper runtime alterations to terrain that will auo-paint. I watched your entire video but did not find any reference to this.
Runtime Procedural Texturing
Have you checked out https://www.assetstore.unity3d.com/en/?stay#!/content/143039
Awesome, didnt know the name for it
With this plus the LWRP module this should work fine for LWRP yes? Always a bit worried about installing external shaders nowadays.
Think Ill just buy Megasplat, looks like a great product. Will assume it works with LWRP since microsplat does
EDIT: Crap, saw in the reviews that its not supported. Microsplat it is.
Don't assume too much too soon...
Supporting an SRP is a pretty massive undertaking unless you build all your shaders in Unity's shader graph or ASE and they've effectively done the work for you- but it's simply not possible to do the kind of work I do in a shader graph, both complexity and performance wise.
- HDRP module has shipped to the store. Currently the only thing it doesn't support is tessellation, and currently the normal doesn't blend quite as well when terrain blending as the surface shader one does.
- LWRP has been re-written from scratch to be much closer to the HDRP module, which will make it easier to support. Currently no tessellation and the normal in the terrain blend is a bit off, but several lighting bugs with shadows were fixed in the process and overall it's a lot better than it was.
- Mesh Terrain module has shipped to the store and is waiting for review.
- Added a emission boost option to Lava
- Added custom presets to the Procedural module, so you can quickly select stuff like "Put this on cliffs" and such. Should greatly help with user confusion..
The HDRP module has shipped:
Hi, i noticed in the asset description requirement for HDRP 6.9 !
Is only working with that version or it suppose to work with 7.1.5 ?
I haven't tested in 7.1.5 yet, that's only for a Unity beta right?