Could anyone help me to create this effect?

Hi everyone.

I want to achieve a special effect in Kanya dance, which you can see in this picture. Under the feet of the girl, there are particles flying up from that cicle, and fade out after it reach a certain height. The spawners of those particles keep randomly changing.

I thank you in advance.

this might help:
How to: create fire and smoke with BGE particles (and other special effects). It is old, but still valid.

EasyEmit (see resource section) might make this easier for you.

Basically you animate position, color, scale and transparency over time.

I’m sure there are other “tricks” too.

I would use sprites esp. if it is for a video game. No need to use actual particles. A simple plane with an animated particle on alpha background. Set the plane to always face the camera.

thanks Monster and brent

You can use easy emit addon. Also John Hamilton has a tutorial on manual particle creation.

Or you could use the animated UV script and have a plane face the camera and have the “streaks” move by changing the speed of the y movement.

from bge import logic
import random

cont = logic.getCurrentController()
own = cont.owner
scene = own.scene
obs = scene.objects

spawner = obs["sparker"]
inac = scene.objectsInactive
sp = inac['spark-element']

def main(cont):
    for sens in cont.sensors:
        if not sens.positive:
    #sp2 = sce.objects['spark2']
    for i in range(0, 1):
        #objects to add
        ob = scene.addObject(sp, spawner, 100)

        #object color
        R = random.random()
        G = random.random()
        B = random.random()

        ob.color = [R,G,B, True]
        ob.scaling = [random.random(),random.random(),random.random()]
        #object spawn
        ob.applyForce((0, 1, random.randint(500, 1000)), True)

if __name__ == '__main__':

thanks everyone

I made the python code above to spawm the sparkles. There is one empty that will rotate another empty, which is the spawner. The color and size of sparkles is also set randomly. The circle below is an animted texture with 16 frames.

If all your particles are coming from the same Z height, you could have their transparency based on their z worldposition, to have them fade out as they go up.

HEIGHT = 3.0    #the height particles fade to 0
Z = ob.worldPosition.z / HEIGHT + ((1.0-ob.localScale.x)*0.4)    #vary fading by scale (thinner particles fade slower?)
ob.color = [R,G,B, Z]

From my experience though, altering the alpha levels of several objects tends to get expensive fast, so use with caution :wink: