XNA Game Development Forums
2012/05/21 19:13:08 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Effectively Rendering Point Sprites  (Read 4318 times)
DaphydTheBard
Jr. Member
**
Offline Offline

Posts: 55


View Profile
« on: 2007/04/30 02:28:58 »

HI Guys

Does anyone know of, or have an example of, an efficient way of rendering LARGE numbers of point sprites, prefereably using the GPU to do most of the work?

I've had a look at the Creators club example, which is pretty neat, however this does everything using a custom content processor, and loads the terrain from a mesh, and then manipulates the geometry in order to create the grass and trees.

This doesn't really suit my purposes, as my terrain is generated in code using vertex/index buffers. 

My particle system uses textured quads, which is OK for doing stuff like smoke, sparks, and the like, however I could do with some sort of method that only requires sending the centre position of the billboard to the shader, along with the texture to be rendered.

I want to scatter grass and trees over certain areas of my terrain in my racing game (dependant on height, and some other factors) but using my particle system with textured quads doesn't work - primarily because it's SLOOOOOW when you start trying to render thousands of individial point sprites.

If anyone can help, would be appreciated.
Logged
ericc59
Jr. Member
**
Offline Offline

Posts: 50


View Profile
« Reply #1 on: 2007/04/30 18:09:13 »

Take a look at this article, http://jsedlak.org/node/177.
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #2 on: 2007/05/01 00:41:23 »

Awesome Ericc59, guess you wont have to put up a particle example now Smiley
Logged
DaphydTheBard
Jr. Member
**
Offline Offline

Posts: 55


View Profile
« Reply #3 on: 2007/05/01 00:56:44 »

Thanks eric - appreciated.
Logged
ericc59
Jr. Member
**
Offline Offline

Posts: 50


View Profile
« Reply #4 on: 2007/05/01 17:45:50 »

Awesome Ericc59, guess you wont have to put up a particle example now Smiley

Probably a good thing I guess, although I would like to make a more advanced particle system.  A full-time job and finals at the same time take quite a bit of my time away though Smiley.
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #5 on: 2007/05/02 12:08:59 »

HOLY COW!

Look at the FPS! This is 1200 particles created using the example Ericc59 gave from that link!
This is running on my crappy laptop to! I am truly stunned!

AWESOME!

I am such a noob... :Smiley

[attachment deleted by admin]
Logged
DaphydTheBard
Jr. Member
**
Offline Offline

Posts: 55


View Profile
« Reply #6 on: 2007/05/07 15:11:49 »

LOL...

Nemo, we'll have to post our TQ version of this that we've been working on soon.

My code needs some cleanup, but I can render 100,000 textured quads without affecting framerate now.

Point Sprites suck.  Tongue

No offense.  Tongue
Logged
Krisc
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #7 on: 2007/05/14 00:45:27 »

LOL...

Nemo, we'll have to post our TQ version of this that we've been working on soon.

My code needs some cleanup, but I can render 100,000 textured quads without affecting framerate now.

Point Sprites suck.  Tongue

No offense.  Tongue

Would you be willing to share how you achieved this?

Thanks for the link above, my code is admittedly slow. I was just getting into particle systems at the time and gave up soon there after.
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #8 on: 2007/05/14 02:42:13 »

If I get time, I will post the particle system.
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #9 on: 2007/07/27 12:43:16 »

Well I have been busy on my blog and have now posted up a PointSprite particle class. It is not written to be bolted strait into the HM engine or a flavor of it, but it should be easy to put it in.

It is a little bit better than my last post here on a point sprite system as I have it managing about 10K of particles on my poopy laptop and the FPS is still between 65 and 70.

Here is the link to it on my blog, there is also a dowloadable sample project to
http://randomchaosuk.blogspot.com/2007/07/generic-xna-3d-pointsprite-particles.html

Please let me know what you think of it as it is this community that has given me 90% of my XNA knowledge.

[attachment deleted by admin]
Logged
mikeschuld
Administrator
Sr. Member
*****
Offline Offline

Posts: 389


View Profile WWW
« Reply #10 on: 2007/08/03 12:12:33 »

lookin good Nemo. We are going to have to have a discussion about architecting a version of this that can fit in with a scene editor later on (so we can save particle emitter parameters into the scene files and edit them with fun sliders and things).

I wish I had the time right now to get down on some projects like this!!
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #11 on: 2007/08/05 11:37:33 »

This should be pretty easy to do Mike, the system I have put up is very simple and can easily be modified to fit how ever you like Smiley

Give me a should when you want to do it, as ever I am happy to contribute Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Tutorial 3 :: More Rendering Complexity - Shaders and Cameras Tutorial Discussion « 1 2 3 4 » mikeschuld 52 17444 Last post 2009/12/12 17:04:40
by Mikeske
Depth buffering and order of rendering??? Hazy Mind XNA Engine 5parrowhawk 1 1439 Last post 2007/02/28 08:02:01
by mikeschuld
Point Light Shader General Discussion Nemo Krad 0 2040 Last post 2007/03/18 07:18:13
by Nemo Krad
I can't see anything on tutorial 4 More Rendering, Vertices and Indexes Hazy Mind 3D Engine moonsvista 5 2906 Last post 2007/03/30 14:37:05
by moonsvista
How to show 2D Sprites in HMEngine? Hazy Mind XNA Engine Arkcann 2 1682 Last post 2007/03/25 05:54:32
by Arkcann
Rendering to Background General Discussion inbreed 1 1598 Last post 2007/05/02 00:13:17
by Chr0n1x
Creating and Rendering a Planet (XNA HM Engine) General Discussion Suzume 7 6190 Last post 2007/09/02 08:48:14
by Suzume
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.132 seconds with 18 queries.