On 6-Oct-06, at 1:14 AM, Jeff Quan wrote:
On Oct 5, 2006, at 7:52 PM, Lars Jensen wrote:
Question: would it substantially improve performance if each particle
were only one triangle instead of two?
(I'm not sure how UVs work yet so I didn't try this myself.)
While it's true that one triangle is faster to update than two, if
you did just use triangles, then in order to fit an image onto that
triangle, the triangle would have to be VERY large. Having large
triangles that are mostly transparent will present you with another
performance bottleneck -- the drawing of transparent objects in
front of others. Plus it'd be a bear to try and center the image in
a single triangle as it's spinning.
An example: in my earlier tests with the trimesh particles, I could
launch about three times as many if the particles were opaque (ie:
non-alpha masked) over transparent. More concretely, I have a test
where I had 2400 opaque particles on-screen with nary a hiccup in
performance.
In Quesa's case fewer larger triangles would probably be better.
Quesa does a per-triangle sort for transparent objects and renders
using slow immediate mode vertex calls, so fewer triangles is almost
always faster. Big, but mostly 100% transparent triangles can also be
sped up significantly using early fragment rejection (alpha test) in
combination with blending, but I can't recall if it's possible to
trick Quesa into using this technique (would likely be a simple hack
in the C code however).
The real kicker is that sorting isn't actually needed for scenes like
this since additive blends look the same regardless of drawing order.
Unfortunately Quesa doesn't have a means to control when and how
transparent objects are drawn.
Frank.
<http://developer.chaoticbox.com/>
<http://macgameblog.com/>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|