Archived

This topic is now archived and is closed to further replies.

BS-er

Point sprites vs. billboards

Recommended Posts

BS-er    181
Well I''ve reached the point where it''s time to add cool weapons to my game. Basically I will implement photon torpedo style weapon rounds. I''ve studied several DirectX examples that use point sprites. The one that comes with the SDK, and an example from "Special Effects Programming with DirectX" which uses textures, but the latter does not work at all. I get no particles when running the examples from that book (I have DirectX 8.1), which suggests that point sprites may be problematic. Anyway, it will be important that the photon torpedos be sized correctly, and that they be z-buffered so as to appear behind other objects as appropriate. I plan to use a texture for the photon torpedo. Am I sure to get the right behavior with point sprites? If I choose a billboard approach, then I don''t think I''ll need to worry, but if point sprites have a speed advantage, I''d like to use them. Does anyone have some pointers for someone who is at such a crossroad? I just don''t want to spend weeks on the wrong approach. Value of good ideas: 10 cents per dozen. Implementation of the good ideas: Priceless. The Battlezone Launch Pad

Share this post


Link to post
Share on other sites
Moe    1256
Personally, I would use both. Be very careful using pointsprites because there are some odd things that can happen if you don't have full hardware acceleration (eg: reaching a maximum size of 50 pixels on the screen).

EDIT - if everything is done correctly, there really isn't a huge performance hit.

Moe's site

[edited by - Moe on June 8, 2002 3:18:00 PM]

Share this post


Link to post
Share on other sites
DrunkenHyena    805
quote:
Original post by Maverick the divider
Use point sprites.
You wont have to perform humongous calculations to rotate each quad to the camera, and GeForce2+ supports this feature in hardware. Saves CPU time a lot.



Transposing your view matrix is hardly what I''d call humongous calculations.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
crrrazydan    208
Use Billboards! Use Billboards!

Thats my personal opinion, but I have expirimented with both point sprite particles and billboard particles for my game.

Basically if you are trying to simulate, with the use of particles, something made up of millions of particles, such as smoke or mist, use billboards. But maybe point sprites would be better for things like sparks.

The thing that makes billboards so much better is using DDS alphablended textures on them, and the fact that you can scale them, and control the alpha transparency of them, which is not really possible with point sprites.

Plus its a lot easier to have lighting affect your billboards and stuff like that, because you have more control.

So if you want a smoke trail coming out of the rocket you just fired from your rocket launcher, go with billboards.

Here's some proof that it will look good. This is 10 billboarded DDS textures with scaling and alpha adjusting, in my game:





Visit TransfiniteGames.com for updates on Snowboard Assassins!

[edited by - crrrazydan on June 8, 2002 3:40:30 PM]

Share this post


Link to post
Share on other sites
RapidStunna    122
Moe''s right. Use both. In my tests, I found point sprites to be very useful for small particle effects(i.e. sparks, dust). When it comes to smoke, rain, or other larger effects, a vertex buffer and vertex shader work very well together to create nice billboards. You can also operate on the world matrix instead of a vertex shader. They both will yield about the same results.

Share this post


Link to post
Share on other sites
BS-er    181
Thanks for the replies. It looks like using both is a good idea. Glowing particles may be best as point sprites, and smoke and explosions might be a good use of billboards. It can''t hurt to learn both ways.

Value of good ideas: 10 cents per dozen.
Implementation of the good ideas: Priceless.

The Battlezone Launch Pad

Share this post


Link to post
Share on other sites
BS-er    181
Well I went with Direct-X style point sprites, but I guess I should've listened to crrrazydan and gone with a billboard approach.

When rendering vertices as a set of point sprites, you have some control over scaling, but it is frustrating and confusing, and apparently there is a maximum sprite size that can't be exceeded. The result is that you can't judge the general direction of your fast-moving point-sprite.

I guess it's all part of the ill-logic that is DirectX. Anyway, Direct X point sprites may useful ffor something, so it's not a total waste.

Value of good ideas: 10 cents per dozen.
Implementation of the good ideas: Priceless.

The Battlezone Launch Pad

[edited by - BS-er on June 9, 2002 10:40:27 PM]

Share this post


Link to post
Share on other sites
Shannon Barber    1681
That''s not illogical; point-sprites are designed for particle effects - like small glowing dots.

Billboards are techniques to save some polygons going down pipeline and/or ensure the surface always faces the camera. Like the trees in the graphics above.

For a photon toredo, I think I''d use a small polygon model for the core, along with some texture coor. animation to make it look like a swirling shot of plasma. After that, you could attach a flashing-star billboard to it to make pulsate.

Share this post


Link to post
Share on other sites