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.
So Unity confirmed it's bug and will fix it soon.
MicroSplat uses the Unity Terrain systems splat map data; so if you want to use a splat map from an external source you will need to apply it to the terrain however you’d do that normally.
Thanks for the reply, I do use a script provided by WM for the import of the splatmap. Now the issue I have is, when I convert the Terrain to microsplat, the general distribution of the textures seems to be taken into account but I loose all the details (errosion, waterflow). I hope the screenshot comparison helps, is there a way to preserve the detail? I'd love to use your tools but when I loose all the detail I worked to get from WM, I'm basicly starting from scratch. I'm new to world design so I dont know if that workflow Im proposing is feasible or not. TIA.
Nevermind, Height Based Blending needs adjustment all works fine!
I have a little problem with microsplat. I added microsplat to one terrain and it works ok but next I added it to second terrain and it looks like some of textures have correct brightness and contrast and some of them have washed out colours. The same textures work well on first terrain.
I'm using linear color space and on first terrain all textures looks great but on second terrain some of them look like linear color space and other look like gamma color space. All textures are imported in correct way. Unfortunatelly I can't post any screenshots because I can't spread this kind of data.
Hi! Thanks for your work! I'ts incredible and so easy to use.
I have a cave entrance model that uses same rock texture as my terrain. How to give him the same look as MicroSplat shader? It's possible with standard shader? If not, can you create a shader for meshes without textures array? I just want the same look, not a paintable mesh (i know you make a new module thats make that but i not need that)
You likely want to select both terrains and convert them together, otherwise you'll have two sets of textures/shaders/materials for each instead of one. Why one would look different than the other, I'm not sure- I would expect them to work the same, unless you added the additional maps (smoothness, etc) only to one of the texture array configs you generated.
The easiest way would be to use the terrain blending module and blend them.
It's a specific case to have 2 terrains which must have different settings for textures etc.
I don't have any other additional maps beside height and normal. It isn't look like some textures have additional maps or not, it rather looks like some of them use gamma color space and other uses linear :/
I'm finally using the mesh tool, and it's working very nicely! But is there a way to save the generated meshes in the scene as meshes or prefabs or assets or something, so I can copy-paste them into another scene?
It doesn't generate new meshes, so you should be able to prefab them just fine.
Sorry, that's what I was trying to say -- there is no mesh if I make a prefab -- the Mesh Filter component is empty.
You mean like it goes away? It should just reference whatever mesh you were using, which I assume is an FBX or something on disk, right?
sorry, i mean when I use the Terrain to Mesh converter -- those generated meshes.
Pretty sure they get written to disk. I'll test and see if the reference clears for me, maybe something isn't being dirtied that should.
Hello. Is there a limit in the size of the splatmap for the terrain? Is it posible to make it bigger than 2048x2048?
The splat maps come from the Unity Terrain system, so it’s limited to whatever they generate (the shader will work for any size)
I select a folder in the project for the converted files to be saved to, and the splat/control maps are generated there, but no meshes -- at least not in several attempts I've made.
Hi @jbooth ,
We see news from Unity about its terrain system to optimize how it's been processing: https://blogs.unity3d.com/2018/10/10/2018-3-terrain-update-getting-started/
Will Microsplat take advantage on this news? Creating Indirect Instance to use GPU?
Thanks in advance
@jbooth I've been getting endless copytexture errors in the latest few 2018.3 betas and Microsplat appears broken. I think you said Unity had broken something? Any guess when that might be fixed? Cheers.
Image invalid format!
UnityEngine.Graphics:CopyTexture(Texture, Int32, Int32, Texture, Int32, Int32)
JBooth.MicroSplat.TextureArrayConfigEditor:CompileConfig(TextureArrayConfig, List`1, String, Boolean) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1379)
JBooth.MicroSplat.TextureArrayConfigEditor:CompileConfig(TextureArrayConfig) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:1538)
JBooth.MicroSplat.TextureArrayPreProcessor:OnPostprocessAllAssets(String, String, String, String) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayPreprocessor.cs:48)
JBooth.MicroSplat.TextureArrayConfigEditor:CreateConfig(Terrain) (at Assets/MicroSplat/Core/Scripts/Editor/TextureArrayConfigEditor.cs:359)
MicroSplatTerrainEditor:OnInspectorGUI() (at Assets/MicroSplat/Core/Scripts/Editor/MicroSplatTerrainEditor.cs:67)
I submitted a bug to them about it- so no, I have no idea when they are going to fix it.
I have a couple of questions. I'm running on Mac, latest 2018.3 beta 7, but the problem has existed for a very long time and in much earlier versions.
MicroSplat works very well, except for one thing: when I save the project, no matter whether there are changes or not, all terrains go from this:
That is, MicroSplat is disabled and all terrains (there are several) revert to the standard shader. I have no idea why, and there's no special code that I know of in the project which could cause it. I'm also wondering about that warning.
Running the project fixes this, but there's no way to revert back to MicroSplat in the editor unless you do it manually.
The second question has to do with the new instanced terrains. Enabling "Draw Instanced" disables drawing of the terrain entirely. It's just not visible.
Is this particular to Metal on Mac, is it due to the beta status of 2018.3, or is Draw Instanced terrain mode not supported by MicroSplat yet?
Thanks in advance.
I think there's code in OnDisable that reverts the terrain, this is so people can switch off MicroSplat and compare vs. regular terrain. Is this causing an issue?
Instance Terrain Mode is supported, but written for 2017.3. I personally cannot get MicroSplat to work on the latest 2018.3 betas because of a CopyTexture bug Unity introduced in Beta 5, so I'm surprised it's working at all for you in 2018.3.7
Cool. Is there somewhere we can upvote your bug report?
(post deleted) ups wrong thread! xD
Well, if the OnDisable code is triggered in connection with a save and thereby disables MicroSplat, then yes. Why would I want to see my terrains in regular render mode after a Save? Especially if there's no way of switching them back except by running the app again? But I'm perhaps misunderstanding something.
It works just as it always has in the latest betas. Perhaps the bug doesn't manifest on Mac?
I also voted.
Well, then something in your code base is disabling it and not re-enabling it after the save. A save doesn't trigger the disabling of components.
I dev on a Mac..
I'll PM you about this, as there are no non-standard components in the code base.
it is somehow possible reduce terrain SplatAlpha0, SplatAlpha1, .. files which are compressed as ARGB 32bit (21.3MB each)?
My scene consist from 16 terrains, each 2k size and for now I am using 6 textures, so size of the build is around 1GB.
If it is possible force unity to compress SplatAlphas with DXT5 it will be significant reduction in build size. I dont need super quality in texture blending, so DXT5 should be OK.
I tried Source Texture Size set to K32, but I am not sure if this option is affecting SplatAlpha terrain files.
Funny, I just added a feature that might make this possible. Source texture size does not affect the Splat maps; those are generated by Unity and passed to the shader automatically.
In the latest version, I added a feature so you can use external splat maps instead of Unity's. What you can do is export the splat map data (no tool for that included, but easy to write) and compress it however you like. Then set MicroSplat to use the external splat maps and assign the output splat maps. Finally, you can set the terrain's alpha map size to 16 or something so that Unity's ones are tiny. This would be a destructive operation, but if you do it at build time and don't rely on the alpha map data for anything, it should work fine and allow you to compress those textures.
I was already using custom splatmaps, but this part of workflow I overlooked in terrain options. Now the build size is reduced. Thanks for help.
I'm on a Mac as well and getting the same issues as @jbooth in 2018.3b7 (since about 2018.3b4 I think).
Unity broke CopyTexture in 2018.3b4, so until they fix that I wouldn't expect the beta to work.
Yep. Cheers. I've upvoted the issue... https://issuetracker.unity3d.com/is...o-a-texture2darray-for-certain-textureformats
if I enable tessellation with Use custom Splatmaps, my terrain turns white from camera position to max tessellation distance and unity throws shader error: "undeclared identifier '_Control1' at line 725 (on d3d11)".
In MicroSplatConfig I am using 6 textures , packing mode fastest, PBR.
MicroSplat material: packing mode fastest, max texture count 8.
Both tessellation and custom splat maps options ON are working only if I set max texture count 4. All other options 8 - 32 throws error and white terrain. Parallax + custom splat maps are working OK.
Ah, I’ll check it out and upload a patch; I think I know what I missed.
Anyone figured out to fix the texture array bug until the official release come?
This is my only error with Unity BETA 2018.3.0b7
Nope, waiting on Unity as it's in their code..
Is is possible to implement mipmaps streaming for texture arrays, or we need to waint first for unity implementation?
Crunched DXT compression(in texture arrays) - is there some performance drop compared to the default DXT?
How far is development of Microsplat for mesh module?
Unity would have to implement that- not sure if texture arrays even support that kind of a thing anyway. I haven't experimented with crunch much, but my understanding is that it's entirely a loading optimization and completely uncompressed to DXT by the time it gets to the GPU.
Mesh module has been done for ages- I just haven't made the marketing images and such..
Hi, Early this year i used to have some artifacts on textures using Microsplat (on my old 660 ti) i did a test in U2018.2.13 with the last update of your asset !! and now everything seems fine!
Glad i bought the anti tile module a long time ago! I'm gonna dive into MicroS now! It performs real fast considering my needs!
I have a general question, considering my low end GPU, do you think using U2018 instead of U5.6 is gonna make me lose Some fps in my project? (wich seems to be the case but not much)or maybe improve? (which i doubt a lot).
I'm thinking of MicroS to balance this general fps lose.
Edit: And BTW is there any issue with VS Pro version? The author says it was rewritten so maybe things are different now...??
I wouldn't know about unity versions and speed- you'd have to test. As far as I know everything is fine with VSPro- if there are issues, Leonart and I would fix them.
Many thanks for your prompt answer! Great news!
It's hard to say without examining each device under a profiler- android devices are really wacky and have a ton of inconsistencies in terms of how they are actually built, though I would expect a pixel and S8 to both have fairly decent hardware. Some things to check:
- Make sure the texture arrays are being compressed into the correct texture format (ETC2); if for some reason they aren't, then they'd end up being uncompressed, which will destroy memory bandwidth.
- Try reducing texture res to see if it helps- this will only help if your memory bound, which is usually not the case.
- Can you post your material settings so I can see which options you have on?
- Using LOD sampler mode can speed things up a bit, but will cause some blurriness in some cases.
- Make sure blend mode is set to Quality when using max 4 textures. If it's not set to quality, then it still has to sort the samples, which can be expensive on mobiles.
Do you have a shader profiler for android? Because that would be the best way to track it down. I normally do mobile optimizations on Instruments, because it can show you how long you are spending on each section of the shader code, which is incredibly useful, but I'm not sure if something like that exists for Android because the architecture is so varied. Likely it would come from the GPU manufacturer for that particular device. However, if your getting other artifacts it might not be MicroSplat at all, because it doesn't really mess with rendering order and such, it's just a surface shader.
Actually, after some more testing, I think your suggestions on the material settings helped quite a bit. It turns out that I also had some accidental high aniso settings for the texture arrays that I think were also affecting performance. I think the MicroSplat material still performs better on iOS than Android, but now the performance is much closer, and usable on Android. Also, I was completely mistaken about the aforementioned artifact: It was purely due some bugs in my app code.
Really sorry about the misleading posts, I have now deleted them.
Do you have documentation on how to do this?
I managed to adjust the base shader to accept my Rendertexture and integrate it into the streams code.
Looks great btw
But how can i make this a module that integrates into your system?