Jump to content

Terrain Not Rendering

Go to solution Solved by Peter,

Recommended Posts

Hi, I had a situation in a test environment where the Gaia generated terrain stopped working on Android, but still works on the build for MacOS. It was previously working, so some change must have had this effect, but I can't work out what it could be. Any idea what can cause the texture of the terrain not to render on Android? The terrain details and trees are visible, and the terrain can be walked on (so it is a collider), but the terrain itself is clear, and I can see through it to the Gaia water texture below.


Any help much appreciated. 





Link to comment
Share on other sites

  • Solution

Hi, I could think of the following reasons:

- The terrain is deactivated for rendering in the terrain inspector (unlikely, since it works on MacOs)
- The android device has an issue with the "Draw Instanced" setting on the terrain (also unlikely, you would have run into this issue early on in development with Gaia)
- From past experience something like this can happen when for some reason the terrain shader is not included correctly in the build. Normally when you are building a scene, unity should crawl across all the things inside and add them to the build, but it can happen that the shader is not included correctly, and those objects then do not render in the build.

You could make a development build (if you haven't already) to see if you can see any error messages popping up when running the dev build on the device.

If that does not bring any insights / improvements, you can try the following:

1. Check if it is really a shader issue by putting creating a new material using the unity standard shader and putting that on the terrain to see if it renders then.


2. Add the terrain shader you are using in the list of the "Always Included Shaders" under Edit > Project Settings > Graphics


You can find the shader used on the terrain in the terrain inspector - since it lists the material, inside the material you can find the shader.

3. You can record a "shader variant collection" to include in the build. Unity has a mechanism that allows you to track the currently used shader variants in a scene, and then store this information to force these variants to be included in the build. You can find a section about the currently tracked variants at the bottom of the graphics settings:


The saved shader variant collection then needs to go in the "Preloaded Shaders" list for the build.

4. Create a material that uses the same shader as the terrain does, then add that to a cube or something in the scene. You can hide the cube somewhere where it can't be seen, or even put it into a separate, empty scene that will never be loaded - the goal is to force a reference to the terrain shader this way so it gets included in the build correctly.

Link to comment
Share on other sites

Hi @Peter,

thanks very much for your response - I also realise it is not so much to go on that I have been able to give so far, so I do really appreciate the thought you've given here. I feel like it may be that something is being left out of the build. I will investigate further... thanks for your suggestions so far!

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

  • Create New...