Search Unity

Reducing draw call

Discussion in 'PSM' started by glaporte, Sep 9, 2014.

  1. glaporte

    glaporte

    Joined:
    Jul 3, 2013
    Posts:
    11
    Hello i have 500 draw call in my game, its heavy for a PSVITA??

    Can i batch couple of sprite which are animated?
    I mean they dont move with transform, but the animation move.(like idle state anim)

    Thank you for your answer.
    Best regards
     
    BrandyStarbrite likes this.
  2. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    500 is quite a lot for a mobile console device. Theres lots of optimisations you could do, but its hard to suggest them when we don't have the project to see exactly what can be done :) There are lots of optimisation tips for Unity projects on the internet, try googling one ^_^
     
    BrandyStarbrite likes this.
  3. glaporte

    glaporte

    Joined:
    Jul 3, 2013
    Posts:
    11
    Yeah but i have a lot of animation, for example lot of mob in idle state saying hello^^
    -So my question is animated sprite could be batched?
    -What are the recommended draw call 100 200 300?


    Thank you
     
    BrandyStarbrite likes this.
  4. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    For comparison i get 100 - 250 draw calls. But the Vita runs really fast still, so it could do 500, it depends on the rest of your scene, assets and coding.
    Try this, have your scene running, press Unitys pause button, and have the 'stats' window open showing the draw calls. Disable assets one by one, to see which is using the most draw calls.
    It maybe that your animation and sprites are fine, and its something else. :)
     
    BrandyStarbrite likes this.
  5. glaporte

    glaporte

    Joined:
    Jul 3, 2013
    Posts:
    11
    Yeah im gonna to do that , Thank you
     
    BrandyStarbrite likes this.
  6. glaporte

    glaporte

    Joined:
    Jul 3, 2013
    Posts:
    11
    Is there a way to emulate PSVITA on PC desktop to profile better?
    Thank you
     
  7. PeteD

    PeteD

    Joined:
    Jul 30, 2013
    Posts:
    71
    500 draw calls is kinda huge actually. For comparison for a UI you'd be expecting it to draw in 1 or 2 calls based on how your texture atlas' was organised. For a model you'd expect it to draw in 2 or 3 depending on effects applied i.e. passes for bump, specular etc. etc.

    500 kind of sounds like every model has a different texture and that Unity is able to do little to no batching due to no shared assets.
     
  8. jesusluvsyooh

    jesusluvsyooh

    Joined:
    Jan 10, 2012
    Posts:
    377
    And highly possible you have multiple lights and shadows ;) (try disabling them to see difference)
    Maybe some fancy shaders, like i said, just disable game objects and such to see which is using the most, thats if your not sure whats causing all the draw calls.
     
    BrandyStarbrite likes this.
  9. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
    Yeah.
    Texture Atlases really help alot to reduce Drawcalls. :cool:
    Less than 250 - 200 drawcalls sounds good to me. :p
    But then again PSVITA is sorta powerful!
     
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'm not sure texture atlases will reduce draw calls on a vita. It doesn't have dynamic batching (at least the PSN version does not).