Fix Black Terrain Grass After Baking in Unity
When terrain grass turns black, first identify how Unity renders that detail. Grass textures, Grass meshes, Vertex Lit meshes, and GPU-instanced meshes use different material and lighting paths, so changing global bake settings before checking the detail mode can hide the actual fault.
Isolate one affected detail prototype and verify its render mode before generating lighting again.
- Confirm whether the terrain surface or only the painted detail is black.
- Open the detail prototype and record its type, render mode, texture, prefab, colors, and instancing setting.
- Correct that render path, clear the old baked data, generate lighting, then run a local VRChat build.
Open the world through VRChat Creator Companion and keep it on VRChat's currently supported Unity version. Upgrading the editor independently can make an uploaded world incompatible.
Identify What Is Black
Inspect the scene in both Scene and Game view and hide the terrain details temporarily.
| Observation | Inspect next |
|---|---|
| The terrain surface remains correct when details are hidden | The affected detail prototype and its render mode |
| The terrain surface is also black or blotchy | Terrain material, terrain layers, baked lightmaps, and Lighting Settings |
| Only one grass type is black | That prototype's texture, prefab, material, and color settings |
| All non-static objects are dark | Dynamic-object lighting and Light Probe coverage |
| Unity looks correct but the local VRChat build does not | Build platform, shader behavior, and generated lighting assets |
Do not repaint the entire terrain during diagnosis. Create a small patch containing one affected prototype and one known-good prototype so the comparison survives each bake.
Check the Terrain Detail Mode
Select the Terrain, open Paint Details, choose the affected detail, and open Edit Details. Unity terrain supports these detail paths:
| Detail path | How Unity renders it | Relevant checks |
|---|---|---|
| Grass Texture | Textured quad meshes, optionally billboarded toward the camera | Texture alpha, Healthy Color, Dry Color, width, and height |
| Grass mesh | Non-instanced mesh with simplified grass lighting, upward-facing normals, and wind motion | MainTex, color tints, mesh orientation, and alpha |
| Vertex Lit mesh | Non-instanced mesh combined into larger batches with simple vertex lighting | MainTex, mesh normals, and color tints |
| Instanced mesh | Prefab mesh rendered with its assigned material and shader | Prefab material, shader, texture assignments, and GPU-instancing support |
The correct fix depends on this selection. A material change that repairs an instanced mesh might have no effect on a non-instanced Grass or Vertex Lit detail.
Fix Grass Texture Details
A Grass Texture detail creates terrain-managed quads from an image. The unused area of the image should be transparent, with alpha set to zero.
Check the prototype:
- Open the source texture and confirm the grass pixels contain visible color rather than only alpha.
- Inspect Healthy Color and Dry Color. Unity interpolates between these colors to tint individual instances.
- Temporarily set both colors to white. If the grass becomes visible, rebuild the intended tint from neutral values.
- Disable Billboard briefly if the fault appears only from certain camera angles.
- Compare the prototype against a new test detail using the same texture.
Dark texture pixels multiplied by a dark prototype tint can produce grass that appears black even though the alpha silhouette is correct.
Fix Grass or Vertex Lit Mesh Details
For non-instanced Grass and Vertex Lit mesh modes, Unity's terrain detail renderer reads the texture assigned to the material's MainTex property. Unity documents that other material properties are not considered for these non-instanced detail modes.
Use this test:
- Open the detail prefab and its material.
- Confirm the visible texture is assigned to the shader property exposed as
MainTexor the built-in pipeline's main texture slot. - Replace the material temporarily with a simple compatible test material.
- Set Healthy Color and Dry Color to white.
- Repaint a small patch and compare it before generating lighting.
If a custom shader stores its color texture in another property, the ordinary mesh may look correct while the terrain-managed non-instanced detail renders without the expected texture.
Fix GPU-Instanced Detail Meshes
When Use GPU Instancing is enabled, Unity uses the material and shader assigned to the prefab. Healthy and Dry Color variation no longer affects the detail.
Confirm that:
- The prefab has the intended Mesh Renderer material.
- The shader supports GPU instancing and the current build target.
- The shader's textures and color inputs are assigned on the prefab material.
- The result is acceptable without instanced light-probe or lightmap lighting.
Unity does not support instanced light-probe lighting or lightmap lighting for terrain detail instances. If the material depends on either path, replace or adapt the shader rather than repeatedly changing the scene bake.
Rebuild the Lighting Data
After correcting the terrain detail, rebuild the scene lighting once so the test is not mixed with an earlier bake.
- Save the scene and note the assigned Lighting Settings asset.
- Open Window > Rendering > Lighting.
- Use Clear Baked Data.
- Confirm the intended Lighting Settings asset is assigned to the scene.
- Select Generate Lighting.
- Inspect the resulting lightmaps in the Lighting window before changing more settings.
A Lighting Settings asset stores the scene's baked global-illumination configuration. Changing Lighting Mode, indirect settings, lightmap resolution, or ambient occlusion changes the bake itself; those settings should be adjusted only when the terrain surface or other baked objects show the same problem.
VRChat recommends baked lighting and Light Probes for mobile worlds, but transparent grass can create heavy alpha fill-rate cost. Check density and visibility on the Android build instead of assuming the PC result represents both platforms.
Test the VRChat Build
Use VRChat SDK > Show Control Panel and resolve relevant Builder warnings. Then use Build & Test Your World or another local build option from the SDK panel.
Compare the same grass patch in four conditions:
| Check | What it isolates |
|---|---|
| Unity Scene view | Editor visualization and scene controls |
| Unity Game view | Active camera, fog, and post-processing |
| Local PC build | PC shader and generated world data |
| Local Android build | Mobile shader and platform-specific rendering |
If the local build differs, return to the detail's material and shader before changing the bake. If both Unity and the build are black, continue testing the prototype itself.
Video Companion
The original akalink tutorial demonstrates terrain baking and a black-grass fix in Unity. Use the written render-mode checks above when the current Inspector differs from the interface shown in the video.
Troubleshooting
The terrain is lit correctly, but every grass detail is black.
Inspect the shared detail path first. For non-instanced modes, verify `MainTex` and reset Healthy and Dry Color to white. For instanced details, test the prefab with a simple instancing-compatible material.
Only one painted grass prototype is black.
Compare that prototype's detail type, render mode, source texture or prefab, color tints, and instancing option with a working prototype. The scene bake is unlikely to be the only difference.
The grass mesh looks correct as a GameObject but black as a terrain detail.
A non-instanced Grass or Vertex Lit terrain detail uses only the material's `MainTex` texture property. Move the texture to that slot or use an appropriate terrain-detail material.
Changing the bake settings does not affect instanced grass.
That matches Unity's documented limitation: instanced terrain details do not support instanced light-probe or lightmap lighting. Check the prefab shader and its own lighting path.
The black result returns after generating lighting.
Confirm the intended Lighting Settings asset is assigned, clear the previous baked data, and generate lighting once. If only terrain details fail, return to their render mode instead of increasing global bake values.
The grass is correct on PC but missing or wrong on Android.
Test the material and shader on the Android build target, then reduce reliance on transparency and verify that GPU instancing is supported by the shader. Keep a small comparison patch while iterating.
Official References
- Unity 2022.3: Grass and Other Terrain Details
- Unity 2022.3: Lighting Settings Asset
- Unity 2022.3: Lighting Data Asset
- VRChat Current Supported Unity Version
- VRChat Creating Your First World
- VRChat Android Content Optimization
- VRChat World Creation and Optimization Tips