- Home /
Unity terrain trees dispear in front of me way to fast
I have created a mesh object that is a piece of grass, I then use the terrain to draw this grass. Both in play mode and in the editor view they seem to disappear quite rapidly on viewing them instead of rending within range and just disappearing at a great distance.
I created a prefab of my grass to see if my mesh and material was the issue, placed a chunk of it front of me and it always did render without an issue, never disappeared. So I have concluded this is a terrain issue, but I have no idea what settings can fix that. I've nearly tweaked every range bar I could see to get some result and nothing.
Here is an image when I hit play, there's grass actually drawn all around my capsule but it only renders it at that range. The little chunk is the prefab I created.
I then move my character forward and you can see the prefab location and how the rendering gets cut out.
Answer by BrettCroomo · May 14, 2020 at 12:59 PM
Hey @Robstao
This looks like Dynamic occlusion and a camera conflict with culling.
.
The odd behaviour may simply be because you have a camera in your capsule? Then you have a second camera following the capsule?
.
The capsule camera probably has higher priority (or same) as the camera following the capsule and the Terrain and dynamic occlusion is working from the first camera's frustrum/FOV. So try to change the change camera depth in the capsule to 1 instead of 0!
.
Also check to make sure you don't have two cameras following the capsule. One may have a smaller frustrum/FOV to the other?
. worst case... you can turn off Dynamic Occlusion - if you really want - per object inside the prefab. (see screenshot) Dynamic occlusion is good for performance though - so think twice if making a game.
.
Your answer
Follow this Question
Related Questions
Terrain grow up when get close to it. 1 Answer
Horizontal Slider Rendering 0 Answers
How do I set the MaterialPropertyBlock for terrain grass? 0 Answers
Parts of terrain going invisible after building the game and changing ingame resolution 0 Answers
HDRP Terrain Shader issues in Standalone Build Only 2 Answers