Crystal Space
Welcome, Guest. Please login or register.
April 25, 2014, 10:54:43 am

Login with username, password and session length
Search:     Advanced search
8990 Posts in 2037 Topics by 7636 Members
Latest Member: Robertsolnq
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  General Crystal Space Discussion
| | |-+  particle independence
« previous next »
Pages: [1] Print
Author Topic: particle independence  (Read 3153 times)
Jonathan
Guest


Email
« on: February 01, 2006, 08:14:55 am »

How do I make particles independent of their emitter in terms of position? What I mean is, if I move the emitter, I don't want the particles that have already been spawned to move with it.

Jonathan
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1704


View Profile
« Reply #1 on: February 01, 2006, 08:32:20 am »

How do I make particles independent of their emitter in terms of position? What I mean is, if I move the emitter, I don't want the particles that have already been spawned to move with it.

Jonathan

I'm afraid that at this moment this is not possible yet. At least as far as I know. Perhaps the particles mesh could be extended to do it but I don't think it can do it right now.

Greetings,
Logged
Jonathan
Guest


Email
« Reply #2 on: February 01, 2006, 12:12:27 pm »

OK how do I get to the individual particles in my code? I need to know position for each.
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1704


View Profile
« Reply #3 on: February 01, 2006, 12:19:53 pm »

OK how do I get to the individual particles in my code? I need to know position for each.

That is also not possible I'm afraid sad

Sorry I can't be more helpful here but in general the particle systems in CS are pretty closed models. There is no interaction possible with the individual particles.

The only thing I can recommend is to make your own particle system that allows that kind of interaction. A bit of work though.

Greetings,
Logged
rvl_
Newbie
*
Posts: 27


View Profile
« Reply #4 on: February 01, 2006, 11:25:03 pm »

It is not problem to make particles independent. Most of them (emitter, fire, snow, explosion, spiral) use Sprite2D as particle object which can be extended to support independence.
The big problem is to get effect what we want. A particle at the moment of creation must get its start speed from base object + emitting speed. But at the moment we cannot know from base object its speed. At least there no good API-way to make this. Of course we can compare previous pos & current pos and divide delta by elapsed time, but that's very rough approach.
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1704


View Profile
« Reply #5 on: February 02, 2006, 06:23:38 am »

It is not problem to make particles independent. Most of them (emitter, fire, snow, explosion, spiral) use Sprite2D as particle object which can be extended to support independence.
The big problem is to get effect what we want. A particle at the moment of creation must get its start speed from base object + emitting speed. But at the moment we cannot know from base object its speed. At least there no good API-way to make this. Of course we can compare previous pos & current pos and divide delta by elapsed time, but that's very rough approach.

Note that all the particle systems that depend on Sprite2D are deprecated and will be removed at some point. They are too slow.

If we need particle independence it is better implemented in the new and fast 'particles' mesh.

Greetings,
Logged
rvl_
Newbie
*
Posts: 27


View Profile
« Reply #6 on: February 02, 2006, 11:53:43 am »

When I've took a look on protomesh sample a wish of writing new mesh vanished Smiley
Logged
res
Develazyoper
CS Developer
Full Member
*****
Posts: 206


View Profile Email
« Reply #7 on: February 09, 2006, 10:58:53 pm »

One way to gain control over particles is to write your own "particle physics" plugin for the "particles" system...
Logged
dingobloo
Idle Extrordinare.
Global Moderator
Full Member
*****
Posts: 125


View Profile WWW
« Reply #8 on: February 11, 2006, 04:00:21 pm »

I was under the impression that this was already the case for the 'particles' mesh... (not the emit or specific particle meshes)
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1704


View Profile
« Reply #9 on: February 12, 2006, 09:14:57 pm »

I was under the impression that this was already the case for the 'particles' mesh... (not the emit or specific particle meshes)

Perhaps if you use it with the ode physics plugin but certainly not with the default plugin.

Greetings,
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.174 seconds with 15 queries.