Particle systems

Discussion forum for Celestia developers; topics may only be started by members of the developers group, but anyone can post replies.
Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 16 years 9 months
Location: Seattle, Washington, USA

Re: Particle systems

Post #21by chris » 07.08.2008, 16:47

ANDREA wrote:
chris wrote:...Here's yet another version of Tvashtar's plume, this time with a particle system instead of a cmod file:
http://www.youtube.com/watch?v=fHj4jcmGRDY
This work is experimental, and will not be ready for Celestia 1.6.0. In fact, there needs to be some discussion about whether particle systems belong in Celestia at all. The videos in this thread are demonstrations of what's possible. Used carefully, some phenomena can be simulated realistically with particle systems; abused, they can turn the Solar System into a disco :)--Chris
Chris, IMHO it looks very promising, but exists the possibility to reduce the evidence of single particles, I mean making them very smaller? :oops:
Or this would need a too big amount of memory and/or graphycal power?
Thank you.

Memory isn't a problem, because the particles are all generated dynamically during each frame. However, using a lot more particles will make the CPU work harder, so you should strive to get the effect you want with the lower possible particle count. In the case of the Cassini video, it should be possible to simply use a 'softer' texture to nearly eliminate all traces of individual particles.

In the videos, the Io volcano has 3000 particles, the Cassini main engine thrust uses 1000 particles (500 per engine), and the liftoff smoke is only 300 particles.

--Chris

Avatar
selden
Posts: 9999
Joined: 04.09.2002
With us: 16 years 2 months
Location: NY, USA

Re: Particle systems

Post #22by selden » 07.08.2008, 16:56

So it wouldn't work at all for cosmic-ray air-showers. :)

(After thinking a very little about how one might do them, I suspect software-implemented point sprites would be desirable. The individual particle trajectories would have to be implemented using ScriptedOrbits.)

It's not clear to me exactly what the particle system does.
Are the initial positions and timings of the individual "particles" generated using random numbers somehow?

If so, I think a direct way to affect those random number distributions would be desirable.
Selden

Avatar
selden
Posts: 9999
Joined: 04.09.2002
With us: 16 years 2 months
Location: NY, USA

Re: Particle systems

Post #23by selden » 07.08.2008, 17:06

Ignore my question about random numbers, since rereading the OP reminded me that it has to be an analytic and deterministic function.

So I'm confused about what the "cone" declaration actually does, and how the user specifies how many particles are to be involved. Creating 1000 ssc entries seems somewhat inconvenient.
Selden

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 16 years 9 months
Location: Seattle, Washington, USA

Re: Particle systems

Post #24by chris » 07.08.2008, 17:06

selden wrote:So it wouldn't work at all for cosmic-ray air-showers. :)

(After thinking a very little about how one might do them, I suspect software-implemented point sprites would be desirable. The individual particle trajectories would have to be implemented using ScriptedOrbits.)
For cosmic ray showers, you'd like to create a 'tree' of particles with individually defined positions and velocities?

It's not clear to me exactly what the particle system does.
Are the initial positions and timings of the individual "particles" generated using random numbers somehow?

Exactly. The initial particle positions and velocities are randomly generated, with the range of values specified via a generator. The Box generator produces values uniformly distributed within an axis-aligned box with the given center and size.

If so, I think a direct way to affect those random number distributions would be desirable.

You mean that you'd like to be able to specify the exact position and velocity of each particle? Or that you'd like to be able to use other random number distributions, such as a normal distribution?

--Chris

Avatar
selden
Posts: 9999
Joined: 04.09.2002
With us: 16 years 2 months
Location: NY, USA

Re: Particle systems

Post #25by selden » 07.08.2008, 17:19

chris wrote:
selden wrote:So it wouldn't work at all for cosmic-ray air-showers. :)

(After thinking a very little about how one might do them, I suspect software-implemented point sprites would be desirable. The individual particle trajectories would have to be implemented using ScriptedOrbits.)
For cosmic ray showers, you'd like to create a 'tree' of particles with individually defined positions and velocities?
Right. Plus some way to make the different particle types distinguishable -- size and color are the obvious ways, maybe shape.

It's not clear to me exactly what the particle system does.
Are the initial positions and timings of the individual "particles" generated using random numbers somehow?

Exactly. The initial particle positions and velocities are randomly generated, with the range of values specified via a generator. The Box generator produces values uniformly distributed within an axis-aligned box with the given center and size.

If so, I think a direct way to affect those random number distributions would be desirable.

You mean that you'd like to be able to specify the exact position and velocity of each particle? Or that you'd like to be able to use other random number distributions, such as a normal distribution?

--Chris

Yes to both. Normal and Poisson distributions are both often encountered, for example.
(Yet another different meaning for the word Normal in Celestia!)
Selden

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 11 years 1 month

Re: Particle systems

Post #26by BobHegwood » 07.08.2008, 18:40

This approach looks very promising to me personally. We have enough control of the effects to be able to create exactly what we wish to see,
that is, if I understand what I'm viewing in the code above.

May I ask though, what you are worried about in terms of "Disco"-izing Celestia? I don't see how the addition of these capabilities would be any
different from any other form of user modification. Then again, though, maybe I simply don't understand this capability in its entirety.

At any rate, I for one would be very much in favor of this approach to making Celestia capable of more realistic imagery.
As always, thanks very much for all that you do here. I know that science is not generally considered to be entertaining by the general public,
and especially by most of the youth in today's world. Your considerable effort with Celestia has HAD to have made some difference in this
area though. Look at some of teachers here. I'm certain that Andrea and Frank would agree that this is an exciting way to get young minds
interested in science. :wink:

Thanks again, Brain-Dead Bob
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

ElChristou
Posts: 3776
Joined: 04.02.2005
With us: 13 years 9 months

Re: Particle systems

Post #27by ElChristou » 07.08.2008, 20:20

Chris, in the above example, you use a cone as basic shape for the distribution of the particles, right? What kind of other shape/volume could we have?
Image

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 16 years 9 months
Location: Seattle, Washington, USA

Re: Particle systems

Post #28by chris » 07.08.2008, 20:52

ElChristou wrote:Chris, in the above example, you use a cone as basic shape for the distribution of the particles, right? What kind of other shape/volume could we have?

In the example the cone describes the distribution of particle starting velocities, not positions. What I've done is create a set of 'generators' that produce distributions of vectors. They are generic and can be used for either position or velocity. The flexibility is convenient, but I'm not convinced it's the best approach--for example, while you could use Cone for position, the names MinSpeed and MaxSpeed are very suggestive of its use as a velocity vector generator.

Anyhow, the generators I've implemented so far are:

Identical position or velocity for each particle:
Constant [ x y z ]

Box { Center [ x y z ] Size [ xsize ysize zsize ] }

Cone centered on z-axis with apex at the origin (setting MinAngle or MinSpeed to a value other than zero will actually result in a non-cone shape)
Cone { MinAngle theta1 MaxAngle theta2 MinSpeed s1 MaxSpeed s2 }

EllipsoidSurface { Center [ x y z ] Size [ xsize ysize zsize ] }

Line between Point1 and Point2
Line { Point1 [ x1 y1 z1 ] Point2 [ x2 y2 z2 ] }

The naming is likely to change a great deal before this stuff is actually released.

--Chris

Avatar
Chuft-Captain
Posts: 1765
Joined: 18.12.2005
With us: 12 years 11 months

Re: Particle systems

Post #29by Chuft-Captain » 07.08.2008, 22:15

ElChristou wrote:Chuft, try to stay on topic please.
El Christou,

As one of the key applications Chris' anticipates for this feature is specifically to render "exhausts in space" (as his cassini example demonstrates), it's certainly not Off Topic to discuss what they might actually look like in reality, particularly as most users of Celestia (including yourself I assume) value it's realism and accuracy. Any such discussion and feedback might be useful to Chris to improve the accuracy of this new feature.

What you're asking is akin to saying: "Please don't discuss the realism of the Sun", or "please, let's not discuss what Titan's atmosphere might actually look like in reality".

It's all On Topic IMHO. :wink:

ElChristou wrote:If Chris wants comments, let's comment his work.
Chris wrote:(Someone who knows more about Cassini than I do can possibly point out some inaccuracies my rendering of the engine thrust.)


:wink:
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
Chuft-Captain
Posts: 1765
Joined: 18.12.2005
With us: 12 years 11 months

Re: Particle systems

Post #30by Chuft-Captain » 07.08.2008, 22:22

selden wrote:Normal and Poisson distributions are both often encountered, for example.
(Yet another different meaning for the word Normal in Celestia!)
Perhaps then, we should stick to the word "Gaussian". :wink:
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
Chuft-Captain
Posts: 1765
Joined: 18.12.2005
With us: 12 years 11 months

Re: Particle systems

Post #31by Chuft-Captain » 07.08.2008, 22:41

Chris (L),

I assume that you're already aware of Perlin Noise algorithms:
http://freespace.virgin.net/hugo.elias/ ... perlin.htm
http://en.wikipedia.org/wiki/Perlin_noise

Regards
CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 16 years 9 months
Location: Seattle, Washington, USA

Re: Particle systems

Post #32by chris » 07.08.2008, 23:27

Chuft-Captain wrote:Chris (L),

I assume that you're already aware of Perlin Noise algorithms:
http://freespace.virgin.net/hugo.elias/ ... perlin.htm
http://en.wikipedia.org/wiki/Perlin_noise

Yes, I am. In fact, Perlin noise is used in Celestia for generating the (almost completely obsolete) cms meshes. It's useful for clouds and such, but I don't think that we need it for the first version of particle systems.

--Chris

Avatar
Chuft-Captain
Posts: 1765
Joined: 18.12.2005
With us: 12 years 11 months

Re: Particle systems

Post #33by Chuft-Captain » 08.08.2008, 00:11

chris wrote:
Chuft-Captain wrote:Chris (L),

I assume that you're already aware of Perlin Noise algorithms:
http://freespace.virgin.net/hugo.elias/ ... perlin.htm
http://en.wikipedia.org/wiki/Perlin_noise

Yes, I am. In fact, Perlin noise is used in Celestia for generating the (almost completely obsolete) cms meshes. It's useful for clouds and such, but I don't think that we need it for the first version of particle systems.

--Chris
I agree. Keep it simple for the 1st iteration. I was thinking long term.... with good OO design ( which I'm sure you will do :wink: ) it will be a piece of cake to override your "generator" function with a Perlin function (or any other approach) in the future. (Perhaps this could also be accessed from (or even written in) "LUA" at some future time.

Just a few thoughts.

CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

ANDREA
Posts: 1527
Joined: 01.06.2002
Age: 74
With us: 16 years 5 months
Location: Rome, ITALY

Re: Particle systems

Post #34by ANDREA » 08.08.2008, 00:30

chris wrote:Memory isn't a problem, because the particles are all generated dynamically during each frame. However, using a lot more particles will make the CPU work harder, so you should strive to get the effect you want with the lower possible particle count. In the case of the Cassini video, it should be possible to simply use a 'softer' texture to nearly eliminate all traces of individual particles. In the videos, the Io volcano has 3000 particles, the Cassini main engine thrust uses 1000 particles (500 per engine), and the liftoff smoke is only 300 particles.
--Chris
Thank you, Chris, I understand.
But, considering an average CPU (let's say a 2.0 Ghz single core) what do you think may be the maximum particles number that would not affect performances?
Just for curiosity. :wink:
Thank you.
Bye

Andrea :D
Core 2 Quad Q6600 G0 3.8 GHz- 8 GB DDR2
DELL 2709W 1920x1200- WIN 7 64 bit- ASUS P5K-E-
8800 GTX 768MB- 6xSATA II, total 7.5 TB-260.89- Celestia 1.6.1
Celestia1.4.1_patch3- Vincent's LUA Edu Tools 1.2

ElChristou
Posts: 3776
Joined: 04.02.2005
With us: 13 years 9 months

Re: Particle systems

Post #35by ElChristou » 08.08.2008, 08:10

Chuft-Captain wrote:
ElChristou wrote:Chuft, try to stay on topic please.
El Christou,

As one of the key applications Chris' anticipates for this feature is specifically to render "exhausts in space" (as his cassini example demonstrates), it's certainly not Off Topic to discuss what they might actually look like in reality, particularly as most users of Celestia (including yourself I assume) value it's realism and accuracy. Any such discussion and feedback might be useful to Chris to improve the accuracy of this new feature.

What you're asking is akin to saying: "Please don't discuss the realism of the Sun", or "please, let's not discuss what Titan's atmosphere might actually look like in reality".

It's all On Topic IMHO. :wink:

ElChristou wrote:If Chris wants comments, let's comment his work.
Chris wrote:(Someone who knows more about Cassini than I do can possibly point out some inaccuracies my rendering of the engine thrust.)


:wink:

Chuft, see your PM please!
Image

ElChristou
Posts: 3776
Joined: 04.02.2005
With us: 13 years 9 months

Re: Particle systems

Post #36by ElChristou » 08.08.2008, 08:34

chris wrote:In the example the cone describes the distribution of particle starting velocities, not positions. What I've done is create a set of 'generators' that produce distributions of vectors. They are generic and can be used for either position or velocity. The flexibility is convenient, but I'm not convinced it's the best approach--for example, while you could use Cone for position, the names MinSpeed and MaxSpeed are very suggestive of its use as a velocity vector generator...

So in your Cassini example, the initial position of the vectors is a box but in this case more a square of 0.012x0.012, right? then the initial velocity are vectors distributed in a cone of 5°, so the particles will be dispatched into this cone with an acceleration from 0.8 to 0.12... is that right? Now question, the fact of using a square shape as initial position influence the shape or not?
Image

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 16 years 9 months
Location: Seattle, Washington, USA

Re: Particle systems

Post #37by chris » 08.08.2008, 16:49

ElChristou wrote:
chris wrote:In the example the cone describes the distribution of particle starting velocities, not positions. What I've done is create a set of 'generators' that produce distributions of vectors. They are generic and can be used for either position or velocity. The flexibility is convenient, but I'm not convinced it's the best approach--for example, while you could use Cone for position, the names MinSpeed and MaxSpeed are very suggestive of its use as a velocity vector generator...

So in your Cassini example, the initial position of the vectors is a box but in this case more a square of 0.012x0.012, right? then the initial velocity are vectors distributed in a cone of 5°, so the particles will be dispatched into this cone with an acceleration from 0.8 to 0.12... is that right?
Almost--replace 'acceleration' with 'velocity' and you've got it right.

Now question, the fact of using a square shape as initial position influence the shape or not?

In this case, not that much--the random variations in velocity tend to erase the square shape. It might be look slightly better right near the engine if I used a circular emitting region instead, but elsewhere there's no evidence of 'squareness'.

--Chris

ElChristou
Posts: 3776
Joined: 04.02.2005
With us: 13 years 9 months

Re: Particle systems

Post #38by ElChristou » 08.08.2008, 17:06

Looking again at your defs in the previous page I'm wondering if the InitialPosition define the position for all the vectors at once... What is their repartition at time 0 on this surface? (I ask to know if we can have, for example, a higher density in the center of the square (in the case of the Cassini exhaust))
BTW, how (where) is define the number of vectors/particles?
Image

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 16 years 9 months
Location: Seattle, Washington, USA

Re: Particle systems

Post #39by chris » 08.08.2008, 17:14

ElChristou wrote:Looking again at your defs in the previous page I'm wondering if the InitialPosition define the position for all the vectors at once... What is their repartition at time 0 on this surface? (I ask to know if we can have, for example, a higher density in the center of the square (in the case of the Cassini exhaust))
Not right now, but this is planned--that's what the discussion of normal (or Gaussian) distributions earlier in the thread was all about.

BTW, how (where) is define the number of vectors/particles?
[/quote]

The rate is the number of new particles spawned each second. The lifetime is the number of seconds will be visible after it is spawned. So, the total number of particles visible at any time is the rate times the lifetime.

--Chris

ElChristou
Posts: 3776
Joined: 04.02.2005
With us: 13 years 9 months

Re: Particle systems

Post #40by ElChristou » 08.08.2008, 17:22

Ok, I thought the distribution discussed above was at any moment and not precisely at time 0.
Image


Return to “Ideas & News”

Who is online

Users browsing this forum: 5 guests