Particle effect VS directional light

Hi all,

I want to implement a “rain effect” in my scene.
So I use the specific particle API :

  • Factory = “PointParticleFactory”
  • Emitter = “BoxEmitter”
  • Renderer = “LineParticleRenderer”
  • Color = “White”

The rain looks well until I activate a directional light in my scene.
The rain’s color change to black!

I’ve searched a solution on the web for hours but without success… :frowning:

Thanks

It sounds to me like perhaps the rain doesn’t have normals. Does it make sense for your rain to be lit, though? If not, then perhaps you can specify an override attribute to disable lighting on your rain using rain.setLightOff(1).

Hi,

First, thanks for your answer rdb. But this solution doesn’t work in my case.

Finally I’ve found one solution : I call the “start” method with “render2d” in attribute.

self.particleRain = Particles.Particles ('rain')
self.particleRain.setFactory ("PointParticleFactory")
self.particleRain.setRenderer ("LineParticleRenderer")
self.particleRain.setEmitter ("BoxEmitter")
# Settings the parameters...

self.particleEffect = ParticleEffect.ParticleEffect ("rain_effect", self.particleRain)
self.particleEffect.enable ()
self.particleEffect.start (render2d)

I don’t know if it’s the best way to do but it works.

Regards