Particle systems and physics.

Started by
7 comments, last by Antony52 20 years, 10 months ago
I want to ask how complex are the graphics and physics of a particle system.Thanks.
Advertisement
As complex as you want them to be.
Do you know of any books that talk about them?
I could just say, as advanced as you make them. But I'll be nicer than that.

Most particle engines use simple gradient blobs for particles. But you can however use pretty much any shape or size you want. Then use additive alpha blending for rendering them, but again, depending on what you'll use them for, you can use whatever you wish.

Physics only need to be very basic to look good, but can be extended to infinity.
I use GRAVITY, wich is global, same as I use for sprite animation and everything else (Im in 2D here...)
Then I use WIND, wich is basically gravity sideways. On top of that, I added a MASS variable, wich works with gravity and wind, a particle with small mass will be less affected of gravity than a particle with high mass.
Think lead bullet and a feather...

this is very basic, I dont do any collision detection for my particles, they are alive generally less than a second, so what if they fly through a wall or a floor. But proper Collission detection can fairly easily be added.

That's a pretty basic particle system with no more physics than you need to make it look real enough to fool most players. This system can also easily be made 3D, the concepts for 2d and 3d are very similar.

Hope this helps.
//Martin

[edit]
If you are very new to particle systems I'd recoimmend Tricks of the Windows Game Programming Gurus by andré LaMothe, it's very basic, but it will get you started, and it works great.
(also this book is simply awesome for learning the basics of game programming)
[/edit]

The more I think, the more confussed I get.

[edited by - Bad Maniac on June 3, 2003 1:30:48 PM]
JRA GameDev Website//Bad Maniac
quote:
I added a MASS variable, wich works with gravity and wind, a particle with small mass will be less affected of gravity than a particle with high mass.
Think lead bullet and a feather...


Mr. Newton would slaughter you with a railgun my friend



[edited by - LowCalorieSoftDrink on June 3, 2003 12:23:37 AM]
quote:Mr. Newton would slaughter you with a railgun my friend

Indeed.
Just to further detail what LowCalorieSoftDrink means:
For a constant-mass object:
Force = mass * acceleration

Which means: for a constant force (e.g. gravity), acceleration is inversley proportional to the mass. In other words, heavy objects are less affected (in terms of acceleration).

Think of a 1kg stone cube and a 100 kg stone cube. For the same force, the 100 kg gains less acceleration.

The bullet/feather case is completely different. (The feather is rather flat, experiencing a larger upthrust force from the air, slowing its fall)

Are you crazy or what???

When you are talking about gravity, and only gravity (that means that the only force applied to an object is its weight), mass has nothing to do with acceleration of the object.

Coder you touched it but you didn''t hit it!!!

F = m * a (1)

where F = Weight = -m * g

Substitute...

-m * g = m * a => a = -g. Voila!!! It doesn''t matter how much heavy is your object!!!

What you are trying to say, if i understood right, is applied when one more force is applied to the object. This is air resistance. This is what happens in real life!!! Air resistance isn''t analogous to the mass but the square of velocisty. (Fair = k * u^2).

With that in mind, equation''s (1) F is equal to :

F = Fweight + Fair = k * u^2 - m * g = m * a

Here, you can''t just kick mass out of the equation. This is, mass has something to do with acceleration, only when other forces, than the weight, are considered.

I didn''t meant to offend you, and forgive my terrible english!!!
I hope that helped...

HellRaiZer
HellRaiZer
erm, I think you''ll find that gravity is considered as acceleration. It is measured in m/s/s ( metres per second per second ) which are the SI units for acceleration. If you ignore air resistance a 1kg block and a 100kg block will both accelerate at the same rate under gravity. They will exert a different amount of force though.

Now, if you''ll both just line up while I load this railgun....
Ok, lol, man, I have to say something about that "think lead bullet and feather". I just can''t resist.

So, first off, howmany hundreds of years have you gone back by thinking this way? I''d just like to let you know that unless the masses are, well, massive, then the differential gravitation pull on them is insignificant.

Neglating air resistance, yes, if you took a lead bullet, and dropped a feather at the same time, than the accerlations would be SLIGHTLY different. So different that it would not be measurable. However, if you dropped the earth and a lead ball at the sun, you will notice the earth hits a lot faster.

Ok, so physics 101 >, air resistance is what makes a feather drop slower than the ball. Do not think it is their masses.
"I once thought I was wrong, but then I was mistaken." - A4

This topic is closed to new replies.

Advertisement