Hi, I'm curious of how polygons can be used and my greatest fears of gaming development is "What if it crashes?" "What if it runs sloppy" things like that, so i'm wondering how polygons are used in game development.
My example is GTA 4, The game is set in Liberty City and there is AI roaming the streets, cars, physics and a bunch of buildings.
Will you're game run sloppy if there are to many polygons in one scene? or does it run sloppy only if there are to many Polygons in the player's point of view.
Let's say you have 700.000 polygons in one scene and these are all spread out around you're map, you could have buildings, cars, AI all sorts of things and these all add up to you're 700.000 Polygons.
(Open World game, with Diffrerent towns/places)
Would a game like that run sloppy? excluding sloppy programing and physics and it could be running on a Mid-range PC.
Or would it only run sloppy if those things where jammed tight together in one area?
Thanks for reading
Ah, graphics optimisation, always a fun question. There's many factors that affect your draw rate on screen, and number of polygons is only one of them.
First there's four major items that can affect it: GPU processing, CPU processing, memory and bus bandwidth.
Now, you ask about polygons, but that's only a small part of it. Without fancy occlusion testing each polygon goes through a matrix transformation before it gets to the screen, this takes some GPU time. Then one it's on screen, there's a depth text for each pixel of the polygon and then the pixel's colour is calculated and displayed. This is where fill rate comes in. Fill rate is the number of pixels that can be written to the screen by the GPU. More polygons and larger resolution mean more fill required, and this can use up GPU processing. Avoiding drawing pixels that aren't needed, such as if they are covered up, is a good optimisation. Often it's the complexity of the scene that's more of an issue as you have shaders and transparencies causing multiple passes, or bad occlusion causing too much overdraw.
Another factor is getting the information to the card over the bus. Most applications push everything to the card at the beginning in order to not slow the card down later, but if there's a lot of texture switching or moving objects then this can affect frame rate. This is normally not an issue, as Unity generally uploads all the information for the scene to the card at the start.
There's also Draw Calls as seen in the Stats Window. This is where Unity has to tell the card to do some high-cost operations in order to change the state ready to draw some more. Too many of these slow the GPU down drastically.
So summary: it's a combination of the polygons not culled by occlusion, the number of pixels drawn to the screen, how much data is pushed to the card each frame and how many draw calls are made.
Yes. Amount of polygons sent to the renderer can negatively affect game performance.