Turn a Quad into particles

Member
Posts: 21
Joined: 2004.11
Post: #1
I have a Quad with a texture on.
Is it possible to turn that quad into particles with the texure still attached,
The effect is to make a wall turn into particles(sand) and fall down.

tnx
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #2
You would have to switch out the single quad with a fairly highly tesselated set of billboarded quads. If I were doing it, the approach I'd take is, say, that if the wall were three dimensional, as opposed to just a single 2d quad ( e.g., like a flattened cube ) I'd *fill* it with particles, turn off the wall, and let the particles fall.
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #3
maybe he wants a more realistic look? Wink
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #4
skyhawk Wrote:maybe he wants a more realistic look? Wink

Good luck, then Wink

Uh... putting on thinking cap... perhaps instead of individual particles, you'd instead massively tesselate the wall, and treat each junction like a point in a verlet integrated system? You'd probably get "jello", but with tuning and damping it might be cool.
Quote this message in a reply
Member
Posts: 277
Joined: 2004.10
Post: #5
TomorrowPlusX Wrote:I'd *fill* it with particles, turn off the wall, and let the particles fall.

It matters what he wants to do...

(a) make the particles fall from the top...
Kinda like a dust/fall off effect...

(b) make the particles "Slide" from the bottom...
Kinda like a sand effect...

Instead of turning off the wall "cut" the wall where you want it and let
it fall/slide where the wall isn't....

But, this would mean a quad *and* a tesselated particles...

Global warming is caused by hobos and mooses
Quote this message in a reply
Member
Posts: 21
Joined: 2004.11
Post: #6
thanks for the suggestions, i will try it out soon.

I will post the final code if you are interested.
Quote this message in a reply
kberg
Unregistered
 
Post: #7
If you're going for a somewhat cinematic effect, I'd probably start with my wall texture, and then blend that into a disintegrated texture which somewhat resembles your particle system; that might produce a nice lead-in to the effect. Textured billboarded quads, or point-sprites on an nvidia card would probably work the best for the particles themselves.
Quote this message in a reply
Member
Posts: 21
Joined: 2004.11
Post: #8
I made it work!

one question, if i have more than 1500 particles, it draws very slow

is there a way to avoid this.

I'm using a for loop in my drawFrame

for(loop=0; loop < MAX_PARTICLES; loop++)

tnx
Quote this message in a reply
Puzzler183
Unregistered
 
Post: #9
If you are using immediate mode, switch to vertex arrays (and then vertex buffer objects) for this since it's dynamic.
Quote this message in a reply
Member
Posts: 21
Joined: 2004.11
Post: #10
Do you mean something like this:
Code:
typedef struct
{
   float pos[3];
   BOOL active;
   float color[3];
   float dir[3];
   float life;
   float grav[3];
   float fade;
} Particles;
?
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #11
probably nothing to do with this, but turn it into a:

Code:
typedef struct
{
   float pos[3];
   BOOL active;
   float color[4];
   float dir[3];
   float life;
   float grav[3];
} Particles;

when you would normally look at fade, instead look at color[3], which would be transparency.

It's not magic, it's Ruby.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Turn into night like Tiny Wings jncunha 1 3,594 Jun 14, 2012 09:56 AM
Last Post: Skorche
  Simple way to turn audio off? johncmurphy 0 2,545 May 2, 2009 07:45 AM
Last Post: johncmurphy
  Y value of a point on a quad evenmybird 5 3,725 Aug 6, 2006 02:32 PM
Last Post: OneSadCookie
  quick opengl 2d quad question dave05 2 3,683 Jun 9, 2005 06:09 PM
Last Post: arekkusu
  Quad Vertex Array Woes WakingJohn 1 2,401 Apr 9, 2005 07:55 PM
Last Post: WakingJohn