Search Unity

Draw call limit for PC?

Discussion in 'Editor & General Support' started by etomp10291, May 12, 2011.

  1. etomp10291

    etomp10291

    Joined:
    Jan 11, 2010
    Posts:
    108
    Hey guys,

    What kind of draw call limits should I stick to for PC racing game. I obviously would like it to be playable on a number of systems. Average about 500 calls now, with peaks at 2000. Feels like it can go a lot more, but my system is high end workstation. I want to push limits of graphics as far as I can. But not need a game rig to play.

    Wanting to use higher poly models for cars than I am now, do you think it can handle 20k poly cars? I think the next gen games like dirt and nfs use 20k cars but not sure.

    Thanks for input!
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    20k polys is fine and so is 500 draw calls for any gaming pc. Probably best to make a tech demo on web player and run it by us. Web player has lower performance so if it runs alright on there it should run well for many.

    20k polys depends on how many are on screen at a close range. 2000 draw calls is a bit excessive. You can fix that by dragging batches of objects which use the same texture/shader into an empty game object and using the combine children script on it.
     
  3. ChaosWWW

    ChaosWWW

    Joined:
    Nov 25, 2009
    Posts:
    470
    20k car models should be perfectly fine. For draw calls I'd say 2000 as a max is good for high optimization, but you could always target your game toward higher level computers and push the graphical quality. Keep in mind that even very basic computers can run your game on some level using the lower graphical settings, so if you want your game to look really good but also require a high end computer to achieve the maximum graphic setting, then I think you could push the draw call count a bit further. I don't know how much further, but probably at least 500.

    Disclaimer: I'm not an expert by any means, but from what I've heard 2000 is a good limit for a mid tier graphical game. As for the car models, game environments can have hundreds of thousands of polygons on the screen, so they can certainly handle a few cars. The only reason why game characters have a lower limit is due to skinning, which your cars probably don't have or if they do it is much more minimal then for a character. If you need a lot of cars, you can always use LOD tricks because chances are you aren't going to be right next to all the cars in the race.
     
  4. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    @hippocoder

    doesnt static batching automatically do what that combine children script does already?
     
  5. etomp10291

    etomp10291

    Joined:
    Jan 11, 2010
    Posts:
    108
    great info, thanks guys. I will get a workable demo up and running and let you guys check that out.
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Yes and no
    It does it and works fine even with occlusion culling.
    Drawback is that you can't limit the batch size which in trade can become a problem if you target webplayer / osx where high poly meshes cause over proportional performance loses on ATI gpus
     
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yep it does. But I thought he would be trying this already, so he may have different materials and shaders on very similar objects. The failure of combine children would highlight it I guess. Also you control where things are batched. Not sure its important though.
     
  8. etomp10291

    etomp10291

    Joined:
    Jan 11, 2010
    Posts:
    108
    I am using static batching now, not sure what sort of increase I am seeing, due to the fact I did it from start of project. I batched track assets, cars, and then scenery.

    I prefabbed my mockup cars, basically cloning same car and using seperate texture for each to give each different paint. It will get interesting now because new models will be seperate models.

    I will keep you posted as to how everything works out:)
     
  9. etomp10291

    etomp10291

    Joined:
    Jan 11, 2010
    Posts:
    108
    I did some research online and I see that some of the big companies build layered LOD stages in there models and then use scripting to render only visible sections of the model. So you may have a 50k model, but depending on scene and need for player to see it, certain areas of model are not rendered increasing performance..........at least that is how i took it from what i read anyway. Beyond my level of expertise unfortunately.
     
  10. ChaosWWW

    ChaosWWW

    Joined:
    Nov 25, 2009
    Posts:
    470
    If you have occlusion culling, that plus frustum culling provide that same service with very little effort on your part. Occlusion culling is a Unity Pro only feature, though.

    EDIT: If you want LODs you have to do those manually.
     
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    LOD is nothing to do with batching. And the fact you are static batching cars means that batching will not work, as you are moving those cars. Static batching is only for objects which are stationary and will not animate.

    LOD is only useful in this day and age when you are dealing with enormous polygon counts. I think 20k would qualify for it actually, if there's 20 cars on the track :) But if there's only 8 cars it probably will not make a difference on any SM3 class GPU since the bottlenecks are shaders, textures, fillrate and so on.