Page 1 of 1

[Solved]The colour affector of ParticleUniverse plugin seems not work.

Posted: Thu Apr 11, 2019 4:39 am
by niubaty
Ogre Version: master
Operating System: win10
Render System: GLv3

This is the particle universe script:

Code: Select all

        affector                                Colour 
        {
            time_colour                         0    1 1 0 1
            time_colour                         1    1 0 0 0
        }
This is the manual sample:

Code: Select all

    affector ColourInterpolator
    {
        time0                   0
        colour0                 1 1 0
        time1                   0.5
        colour1                 1 0 0
        time2                   0.9
        colour2                 0 0 1
    }
I am pretty sure there must be something wrong with the affector, but I don't know where to start to handle the problem, any hint?

There will be error if I change the affector to ColourInterpolator

Code: Select all

Error: ScriptCompiler - invalid parameters in mp_torch.pu(36)

Re: The colour affector of ParticleUniverse plugin seems not work.

Posted: Tue Apr 16, 2019 4:41 am
by niubaty
I found that the "colour affector" seems worked fine.
It should have something to do with the material itself.

origianal material script:

Code: Select all

material mp_fire_02
{
    technique
    {
        pass
        {
            lighting off
            scene_blend add
            depth_write off
            texture_unit
            {
                texture mp_fire_02_2x2.dds
                tex_address_mode clamp
            }
        }
    }
}
after add

Code: Select all

            diffuse vertexcolour
to the pass

The mp_torch.pu would be colored.
All of the PU plugin samples should add the 'diffuse vertexcolour' to its material script if they have colour affector