- Home /
Terrain Grass and Asset Bundles
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.
We quite have a similar problem here.The difference is we put the textures in a shared asset bundle and the terrain asset directly in the scene asset bundle. When we load the scene additively, we get the same error, though it's about the textures splat map.
One thing that should be pointed is when we call the LoadAll method on the scene asset bundle, the returned Object array is empty.
Answer by Nevermind · Jan 02, 2011 at 06:36 PM
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.
We had the same problem and this seems to work. Thanks a lot for this tip.
This doesn't appear to work in Unity 5.6.4p2. Any other known causes of "Failed to get pixels of splat texture" error?
Having the same problem in 2017.1 after adding some new grasses to my terrains. They aren't loading and are throwing the errors only in build. I tried putting them in Resources, all marked as read/writable, but they aren't showing up and the error is spammed twice per procedural terrain loaded.
Answer by Klaus-Eiperle · Aug 30, 2015 at 12:24 PM
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.
Your answer
Follow this Question
Related Questions
How can a look up of grass height at a position on terrain be done? 0 Answers
Grass not getting original texture, generating grass in a good way? and more 0 Answers
Forward rendering shadow flicker glitch (with video) 1 Answer
Asset Bundle load/unload problems 2 Answers
shake grass randomly method 0 Answers