Is it just me, or is the Unity 6 terrain painting tool exceptionally buggy? I currently have about 5 terrain layers in my palette, and it will work a little bit after first load, but at some point (like within 2 minutes) it stops working, and will only paint a single terrain texture from the palette, no matter what palette texture I have selected. Am I doing it wrong, or is Unity 6 terrain painting just broken?
Actually, I just figured it out.
The interface has 2 separate selection contexts for the same list. There’s the checkboxes, and then there is the row selection. Both are apparently selection behaviors but intended for different reasons.
You have to use the row selection to select which texture to paint. I didn’t realize you could select rows at first.
The only possible use the checkboxes could have, then, is for if you are removing multiple textures at the same time. Is there some other use? Initially, I thought that was how you selected the paint texture. Especially since that is how paint details (grass) works (you click the checkboxes to select what to paint). So two very closely related features behave differently.
Some important context I left out. I forgot I had installed the Terrain Tools 5.1.2 package. It’s a Unity package but not installed by default. You don’t have a Layer Palette unless you install the Terrain Tools. So if you are wondering what in the heck I am talking about in my previous posts, that might be why.
Same issue here, terrain painting is almost completely broken after updating to 6.1
Weirdly it seems fine for like, every 0th and 3rd texture… eg if I have 8 textures, I can paint with 0, 3, 4 and 7, but the others are painting incorrectly.
It seems like the textures paint correctly for one brush stroke, eg if you click and release without moving the brush. However when moving the brush, every 2nd stroke seems to clear/undo the first one so your brush ends up disappearing/appearing with every 2nd brush stroke.
I’ve tried with and without the terrain tools package, and in a brand new unity 6.1 project as well.
I think this is a bug in how unity handles+updates cbuffers, possibly when using their old GL.DrawQuads etc API. (Which the entire terrain tool library uses ofc)
Weirdly enough, adding #pragma enable_d3d11_debug_symbols to the TerrainLayerUtils shader fixes the issue for the layers that weren’t previously working, however it breaks for the others.
Hardcoding the correct mask value into _OriginalTargetAlphaMask in the shader works, eg should be (1, 0, 0, 0) for layer 0, (0, 1, 0 0) for layer 1 etc. My guess is that whatever value is attempting to be set from the C# side isn’t making it through and it ends up as some incorrect value when the shader renders.
I have no idea what is causing this but I’m guessing some kind of internal engine bug. I think my best bet at this stage is to just write my own functionality to update the terrain textures. Pretty annoying, but it’s less work than writing an entire terrain painting system from scratch..
I’m not sure why but holding ctrl fixed the issue for me?