Suddenly my unity models are behaving weird.. If I use terrain generator to place trees and I place too many other details nearby like grass,plants etc, the model of tree becomes blur and pixelate ..If i look at them in certain angle they appear ok but immediately on lowering the angle, they go back to blur..There seems to be a threshold ..Like if I place more than 20 assets nearby (grass,flowers,plants etc) , then it goes bad..else its fine.. If I drag and drop the prefab this problem doenst occur but I cant use that method for placing a lot...
Unity Models lose details when too many are placed( Pictures included)
Moderators - Reputation: 3354
Posted 18 March 2013 - 07:30 AM
Unity trees placed by the terrain system are not just any model; they're specifically designed to change into less resource-intensive forms so that you can have more of them. The less resource-intensive forms obviously look worse because they need to use fewer polygons - in these cases, it appears they are 'billboard' trees (ie. a picture of a tree rendered as a sprite).
You get to control some aspects of when Unity changes the full tree meshes into billboards. Check out the terrain settings in the Inspector - http://docs.unity3d.com/Documentation/Components/terrain-OtherSettings.html - and specifically at the 'Billboard Start' value and the 'Max Mesh Trees' value. You may need to increase one or both of those to ensure more of your trees stay as meshes. But note that you will lose performance this way as rendering a lot of trees as meshes is expensive.
Edited by Kylotan, 18 March 2013 - 07:31 AM.
Members - Reputation: 116
Posted 18 March 2013 - 07:50 AM
Hey thanks a lot ! Your answer was spot on and solved the problem ! I was in this issue since yesterday and since I was learning unity, I was totally demotivated because of this.. thank you!
Increasing the "max mesh tree" value from 50 to 500 solved the problem! I got a few questions regarding this :
1.Im wondering how much performance will this impact ? What would be a good value to keep this setting at ?
2. The problem seems to be because I am implementing grass as a game object( just because it looks more detailed )rather than grass texture thereby it takes up a lot of mesh. Is this the right approach or should grass always be implemented as texture ?
Moderators - Reputation: 3354
Posted 18 March 2013 - 08:03 AM
Yes, grass is the same as trees - Unity will try and use billboards when it can to save rendering time. Meshes look better but cost much more, so the idea is that you use billboards at a distance where you wouldn't be able to appreciate much of the benefit of the mesh. I recommend using Unity's terrain grass rather than placing them as game objects, but you have to make your own decision about performance vs. appearances.
How it affects the performance will depend a lot on what platform you run on, how powerful the machines are, but also on the viewpoint of your game (ie. how many of each thing you can see at any one time). You can watch the stats at the top right corner of the game view which will tell you how many draw calls you're making and how long each frame is taking. I suggest setting up some test scenes that represent the kind of environments you want to have in your finished game, and tweak the values until you get a good compromise between performance and visuals.