We have a terrain that has some grass painted onto it using the foliage brush tools. The grass shows up alright in the editor. However, it never shows up in the compiled version of our application. Instead I see the following error message multiple times:
"Failed to get pixels of splat texture"
The texture splats for the main terrain textures show up correctly. However, the grass never is rendered. Note that the terrain and it's textures are stored in an asset bundle.
I've just had similar problem with procedural terrain generation: "Failed to get pixels of splat texture" and no grass.
The solution is to check the "Read/Write Enable" box in import settings for all textures used for terrain AND details. I don't understand why it works that way, but it does work.
While generating a new terrain, Unity places automatically an asset in the projects root folder. When you examine this asset in the project browser you find a ‘SplatAlpha 0’ texture inside it.
All you have to do is to place these asset into the resources folder. When you later load the asset bundle where the terrain is included, the SplatAlpha texture will be loaded automatically from the resources folder.