Point Sprite size issues

Started by plummew, July 17, 2007, 11:08:32

Previous topic - Next topic

plummew

Hi,

Here's the problem (Which has been discussed on this forum and elsewhere on the web but I've yet to see a solution)
If you use point sprites in opengl on a newish Nvidia card,  the max allowable point size
(around 60 pixels) causes upper size clamping when using distance attenuation.

Visually, the problem manifests itself as follows:

A particle effect (say fire) looks nice at a large distance as the distance between
each particle is small/overlapping compared with the size of each particle.

However whan you move close to the effect, the distance between particles becomes
noticable compared to the particle size (as the max size is clamped)

Is this simply a limitation of Nvidia's implementation?

and if yes, is the only solution to use cpu-driven billboarding or write a shader?

If I have to render as billboards, any comments on the most efficient technique?
e.g
1) create individual quads
2) create a vertex array and use textured triangles?
... any other techniques?

.. any other comments?

Fool Running

QuoteIs this simply a limitation of Nvidia's implementation?
ATI cards should have a similar limitation. There isn't much you can do about it.
Quote...is the only solution to use cpu-driven billboarding or write a shader?
If you want it to look correct when close-up, then yes, those are the ways to do it.
Quote...any comments on the most efficient technique?
The most efficient way to do it is to do it all in a shader. This might require implementation-dependent extensions, though, I don't remember, and will require newer hardware. This is, of course, the hardest to implement. ;)
The way I do it in my engine (not the best/fastest way, mind you, but relatively simple for a first time) is to use a vertex array and render using billboarded quads. VBOs might be an even better alternative to that on newer hardware.

Hope that helps ;D
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

plummew

Cheers.

It's always worthwhile having one's suspicions confirmed.