Author Topic: Rain PS's particles dying above ground  (Read 2620 times)

Redman

  • Posts: 103
  • Turrets: +6/-6
Rain PS's particles dying above ground
« 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:




Thanks for reading.
« Last Edit: June 30, 2009, 03:06:13 pm by Redman »

Ingar

  • Tremulous Developers
  • *
  • Posts: 554
  • Turrets: +302/-7
    • Ingar's projects on the Web
Re: Rain PS's particles dying above ground
« Reply #1 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

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: Rain PS's particles dying above ground
« Reply #2 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.

Redman

  • Posts: 103
  • Turrets: +6/-6
Re: Rain PS's particles dying above ground
« Reply #3 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.