Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Performance Problem with terrain >grass

Discussion in 'Editor & General Support' started by 001visualizer, Jul 19, 2009.

  1. 001visualizer

    001visualizer

    Joined:
    Aug 24, 2008
    Posts:
    113
    1. Issue:
    Because of this littel grass shapes, the performance brakes down to 12 fps!?!
    By comparison with the Island demo which use hundreds of bushes and trees it achieve >>180fps - on the same hardware!


    2. Issue:
    When the camera moves close to the grass it switch on and off, grass by grass near the border of the camera view. This looks very unnatural! That effect does not exists in Island demo. I use the same Terrain settings like Island demo does.

    What could be the reason for this problems?
     

    Attached Files:

  2. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Haven't we been through this issue before :p

    Last time it had to do with the extreme size of your level IIRC.

    The framerate issue could because of your Detail Resolution settings. What resolution is it?
     
  3. 001visualizer

    001visualizer

    Joined:
    Aug 24, 2008
    Posts:
    113
    Sorry but what is IIRC? And where can I see the Detail Resolution setting?

    Thanks for your help (may be with screenshots?)
    Roman
     
  4. Joe-Robins

    Joe-Robins

    Unity Technologies

    Joined:
    Apr 21, 2008
    Posts:
    430
  5. 001visualizer

    001visualizer

    Joined:
    Aug 24, 2008
    Posts:
    113

    Attached Files:

  6. Joe-Robins

    Joe-Robins

    Unity Technologies

    Joined:
    Apr 21, 2008
    Posts:
    430
    Try looking at Terrain > Set Resolution for more settings
     
    chelder likes this.
  7. 001visualizer

    001visualizer

    Joined:
    Aug 24, 2008
    Posts:
    113
    But where is "Set Resolution"? Please add a screen with a red makrer.

    I guess only this would finaly helping me...sorry!
     
  8. Joe-Robins

    Joe-Robins

    Unity Technologies

    Joined:
    Apr 21, 2008
    Posts:
    430
    Here:
     

    Attached Files:

  9. 001visualizer

    001visualizer

    Joined:
    Aug 24, 2008
    Posts:
    113
    OK. That resolution is the same like in the Island Demo. 1024.
    I used the same Grass like you have done in the Island Demo.

    But in my case (see picture upstairs) with a fraction of the among of fegetation, the scene renders with only around 16 fps?!
    (AA is by 6x6)

    There must be still another setting too, which barkes down the performance.
     
  10. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Each 64x64 chunk of the Detail Map is one draw call, so spread out over a large scene like the Island Demo not all of it is being drawn at once. However in your scene it is which could lead to 256 draw calls, which isn't a whole lot, but still contributes to the slow down.

    How about the Anti-Aliasing? What happens if you turn it off? Does the frame rate improve?
     
  11. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    That is a super-helpful tidbit Ethan, thanks!

    A related question: How does the resolution of the splat map (control texture) impact performance?

    One of our terrains has a 512 x 512 control texture, and another has 1024x1024. Both are scaled to have 2km x 2km world sizes. But the one with the smaller control texture is about 25% faster on integrated graphics.

    Could it be the control texture that's killing it, or something else I've overlooked or overloaded?
     
  12. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    To answer my own question after making a script to res down the splat map:

    A 1024 splat map does not seem to perform any worse than a 512 splat map on the terrain that is slower than our "old" terrain.

    So I'm still searching for where the hit is taking place...
     
  13. 001visualizer

    001visualizer

    Joined:
    Aug 24, 2008
    Posts:
    113
    Hi

    >The Antialiasing is set to 6x6. If AA is off, it does not encrese the frame rate.
    By the way, if I change the AA setting, it takes not affect instantely, I have to restart Unity3D..Is this normal?

    >Interesting fact: If I paint a bush (Bush 4) within the tree painting section, it does not brakes the frame rate down. But if I paint the same among of that bush within the details painting section...

    >There is also a difference by painting within the tree and the details painting section.

    >>Within the tree section: There are unfortunately no pinsel shape options. And it paints trees very diffusedly over a wide aera.

    >>Within the details section where you must paint grass over a wide area it paints smal dots with an extrem dense.
     
  14. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Yes. This is normal... it's also normal for just about every PC game I've ever played.

    Yeah, the 2 methods are very different. That's why there's 2 of them ;)

    Detail meshes are meshes that all get combined into one mesh within certain sections of the map (read my post above again please). Trees are not all combined but rather billboarded at certain distances.

    Adjust the size and opacity of the brushes. They both work fairly similarly with a few distinct characteristics. You should probably read through the Terrain documentation some:

    http://unity3d.com/support/documentation/Components/script-Terrain.html

    http://unity3d.com/support/documentation/Components/terrain-Grass.html
     
  15. 001visualizer

    001visualizer

    Joined:
    Aug 24, 2008
    Posts:
    113
    Hi again

    Thanks for your explanations.

    We still are searching that issue about braking down the frame rate.

    >Frame rate (for example) with Bush 4 painted within the Tree painter compare painted in the Detail painter.

    >Comparison: The huge vegetation in the Island Demo >>180fps, some grass in my scene 16fps.
     
  16. 001visualizer

    001visualizer

    Joined:
    Aug 24, 2008
    Posts:
    113
    OK, I will send you today my scene as a package direkt via e-Mail to Unity support.