Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualNEXUSKill

Posted 29 May 2013 - 11:19 AM

There are two big considerations to have when optimizing render systems, my knowledge is PC based but for all I know mobile devices are subject to the same bottlenecks.

 

First is graphics device states, the configurations of how the graphics card should do things, changing these settings, such as Wireframe vs Solid fill mode, or which shader to use is expensive on its own, but also kills pipelining, in case you don't know what that is, think of it as assembly line process, as long as a buch of objects require the same processes, you don't need to wait for one object to finish completely before sending the next one, if the process has 5 steps, you can have 5 objects going through the pipeline at the same time, which saves A LOT of time.

So with that in mind, objects should be grouped toghether based on how similar their rendering process is, Textures are important, specially the large ones, but in my experience shaders and render states are more important.

The other thing to keep in mind is that while the graphics card will skip content that it resolves not to be within the drawing area on its own, the objects need to be in the graphics card for that to be evaluated and that is already a lot of wasted time, it is your responsibility to give the graphics card the least possible number of out of scope objects, this is whats called Potentially Visible Set optimization, and Space Partitioning structures are the fastest way to do it (as far as I know), you should read up on that. Doing it object by object in the CPU is almost as wastefull as letting the GPU do it.

A third thing you might want to be carefull about is clipping, when an object is only partially visible, that is, a part of it is within the view cube, the graphics device must cut the mesh to include only what is within the cube and ignore the rest, this is because if it didn't do so, the pixel shader would likely go through a hell of a lot of pixels that aren't visible anyway. Small objects are not a problem, since they are likely to fit within the view or be completely outside of it most of the time, but large objects, as say a mountain cliff, are likely to be partially visible a LOT, sometimes its better to make these meshes in such a way its easy to discard most of them. I haven't really dug into this concern myself, but you might want to read up on it, I think Polygon Clipping or Trimming are good search terms.

UPDATE: I've asked around with some engine developers, apparently the biggest bottleneck in consoles and PC right now, is texture size and count, however states may still be a big deal on mobile platforms.


#1NEXUSKill

Posted 23 May 2013 - 11:07 AM

There are two big considerations to have when optimizing render systems, my knowledge is PC based but for all I know mobile devices are subject to the same bottlenecks.

 

First is graphics device states, the configurations of how the graphics card should do things, changing these settings, such as Wireframe vs Solid fill mode, or which shader to use is expensive on its own, but also kills pipelining, in case you don't know what that is, think of it as assembly line process, as long as a buch of objects require the same processes, you don't need to wait for one object to finish completely before sending the next one, if the process has 5 steps, you can have 5 objects going through the pipeline at the same time, which saves A LOT of time.

So with that in mind, objects should be grouped toghether based on how similar their rendering process is, Textures are important, specially the large ones, but in my experience shaders and render states are more important.

The other thing to keep in mind is that while the graphics card will skip content that it resolves not to be within the drawing area on its own, the objects need to be in the graphics card for that to be evaluated and that is already a lot of wasted time, it is your responsibility to give the graphics card the least possible number of out of scope objects, this is whats called Potentially Visible Set optimization, and Space Partitioning structures are the fastest way to do it (as far as I know), you should read up on that. Doing it object by object in the CPU is almost as wastefull as letting the GPU do it.

A third thing you might want to be carefull about is clipping, when an object is only partially visible, that is, a part of it is within the view cube, the graphics device must cut the mesh to include only what is within the cube and ignore the rest, this is because if it didn't do so, the pixel shader would likely go through a hell of a lot of pixels that aren't visible anyway. Small objects are not a problem, since they are likely to fit within the view or be completely outside of it most of the time, but large objects, as say a mountain cliff, are likely to be partially visible a LOT, sometimes its better to make these meshes in such a way its easy to discard most of them. I haven't really dug into this concern myself, but you might want to read up on it, I think Polygon Clipping or Trimming are good search terms.


PARTNERS