[solved] Particles - ColourInterpolator affector issues

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Bogdan
Gnoblar
Posts: 2
Joined: Mon Nov 03, 2014 1:20 pm

[solved] Particles - ColourInterpolator affector issues

Post by Bogdan »

Hey all,

I want to have a particle system where i fade in / fade out the particles. To do this i've used ColourInterpolator affector. Here is the script:

Code: Select all

particle_system sparkle_1
{
	material sparkle_1
	particle_width 4	
	particle_height 4
	quota 2
	billboard_type point
	billboard_rotation_type vertex

	emitter Point
	{
		angle 0
		emission_rate 1
		velocity_min 0
		velocity_max 0
		time_to_live_min 4
		time_to_live_max 5
	}

	affector Rotator
	{
		rotation_speed_range_start 50
		rotation_speed_range_end 70
		rotation_range_start 0
		rotation_range_end 180
	}

	affector ColourInterpolator

	{
		time0 0
		colour0 1 1 1 0

		time1 0.3
		colour1 1 1 1 1

		time2 0.75
		colour2 1 1 1 1

		time3 1
		colour3 1 1 1 0

		}

}

And here is the result ( the particles are in the bottom right corner ): [youtube]NIkrfz92FvQ[/youtube].

As you can see, it looks like when the particles are spawned, it goes from alpha 0 to 1 to 0 in a fraction of second and after it behaves as intended .

Anyone knows what the problem might be ?

Cheers,
Bogdan
Last edited by Bogdan on Tue Nov 04, 2014 9:46 am, edited 1 time in total.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Particles - ColourInterpolator affector issues

Post by Kojack »

Try adding colour 1 1 1 0 to the particle emitter, to start it off transparent. It looks like the colour interpolator isn't taking effect until after the particle system has been rendered once.
Bogdan
Gnoblar
Posts: 2
Joined: Mon Nov 03, 2014 1:20 pm

Re: Particles - ColourInterpolator affector issues

Post by Bogdan »

Kojack wrote:Try adding colour 1 1 1 0 to the particle emitter, to start it off transparent. It looks like the colour interpolator isn't taking effect until after the particle system has been rendered once.
That worked. Thank you very much !
Post Reply