Tremulous Forum

Media => Mapping Center => Topic started by: Redman on June 30, 2009, 12:43:58 am

Title: Rain PS's particles dying above ground
Post by: Redman on June 30, 2009, 12:43:58 am
Hi.

I have problem with my rain particle system. Some of particles die above ground, it doesn't look good...
Here's content of .particle (it's modified pulse meteorite system.

Code: [Select]
menelor/rainImpact
{
  ejector
  {
    particle
    {
      shader sync textures/menelor/rainImpact
      radius 0 16 0
      alpha  0 1 0
      lifeTime 200
      overdrawProtection
    }
    count 1
    delay 0
    period 0 - ~0%
  }
}

menelor/rain
{
ejector
{
particle
{
    model models/menelor/rain.md3

// a 512 cube around the entity
       displacement -512 -512 -512 ~1024

velocityType static
velocityDir linear
velocity 0 0 -6 0
velocityMagnitude 4000~

bounce cull
radius 0 16 0
alpha 0 1 0
lifeTime 10000
overdrawProtection
cullOnStartSolid

onDeathSystem menelor/rainImpact
}
delay 0
count infinite
period 1 - ~100%
}
}

Screenshot:

(http://img208.imageshack.us/img208/9562/rainbug.th.png) (http://img208.imageshack.us/i/rainbug.png/)


Thanks for reading.
Title: Re: Rain PS's particles dying above ground
Post by: Ingar on June 30, 2009, 08:41:58 pm
Try increasing the lifeTime of your rain particle. This will make the raindrops stay visible longer.

Check http://tremmapping.pbworks.com/Particle System (http://tremmapping.pbworks.com/Particle System)
Title: Re: Rain PS's particles dying above ground
Post by: gimhael on June 30, 2009, 09:09:43 pm
It might be a different issue:

The engine first calculates the new position of the particle based on it's current position and velocity and then checks if there are any obstacles between the current and the new position. If it finds an object, the particle is replaced by the onDeath particle system, but at this point the position of the particle hasn't been updated, so the new particle system is created at the starting position of the original particle and not at the point where it "hit" the object.

So if the particle speed is high, there may be a noticeable distance between the particle death effect and the surface it hit.
Title: Re: Rain PS's particles dying above ground
Post by: Redman on June 30, 2009, 11:01:17 pm
I've increased lifeTime from 10000 to 20000, but it didn't help.

gimhael is right. When I changed timescale to 0.1, all particles were dying on ground, when I changed timescale to 10, sometimes particle were dying meters above ground. We know what's happening, what I shall do now? I won't decrease particles' speed, it would look ugly.