Animating material ipos (RGBA) need to reset material properties each time.

Now this is really starting to tick me off so I come to see if there is another way.

So I have a material, the material has Obcolor enabled to allow animating the material ingame. That all works fine and dandy BUT after quitting the game the colour and alpha of the material is set to where the current frame line is.

Take the example that where the current frame cursor thing is, the animation is red, and the alpha is 0.
This means I must reset the colour in the material back to white, because otherwise it seems to modulate the colour of the material (which has now been set to red) by red and that results in a very dark colour.

Same with the alpha, must be set back to 1

I can workaround the rgb problem by setting VColPaint which will make the base colour white.

I cannot work around the alpha though.

Going through all your animated objects and reseting them every time you test again is real pain.

Here is an example (i’m Using 2.49b)
-Press P to play, the cube should fade in while fading from red to blue.
-quit the play/ Esc
-select another object (camera for example) this will update the cube.
-press P again, the cube will not appear!!
-esc again
-fix the material on the cube by setting the colour to white and the alpha to 1
-cube works again
-repeat every time and for every material.

You could also try only resetting the alpha, watch the cube fade in to dark red.

Surely there is a better way? Am I doing something wrong?


animateprob.blend (215 KB)

Try setting a material color/alpha key on frame 1, then you won’t need to reset anything.

That’s a good idea! although creates a problem when the object flashes white for one frame if the object is added, then the ipo starts next frame when the logic of that object is computed. :confused:

I wonder if there is a way to activate an ipo on an object without having a link to its actuator.

There shouldn’t be a flashing problem if you reset the material first so it’s how you wanted it in frame 1 to begin with (like you have been doing) before creating the key

If it is there then you would go to the IPO editor (F-curve editor in 2.5), zoom in a bit, then move the keyed values to where there’s not such a sharp change in the curve.

This is what I mean by flashing if the object is added.

-Press space to show the cubes and start the animations. fade red to blue

-The left cube has been added with an add object actuator, it has an always sensor attached to it to start the animation as soon as it can.

-The right cube has been set to visible, and the animation started at exactly the same time.

You will notice the left cube flash.
I don’t ever want to see the white, the material must have a white base colour for the animation to modulate it correctly.

I guess you could have a tiny white texture applied to the alpha and colour.


animateprob2.blend (220 KB)