Run an IPO for blending a texture onto another?

For example, say I’ve got a base diffuse texture mapped onto my model, and then I’ve got a dirt texture (which has an alpha channel) mapped over it (mapped to stencil). So when I turn the Colour slider down to 0, there’s no dirt, just diffuse. Then I turn the slider up to 1.0 and we’ve got dirt and diffuse. I know how to make the texture blend, but when hooking it up to an IPO actuator, it doesn’t work, any idea why or how I could make it work?

Cheers guys!

I know what you want that for :stuck_out_tongue:

Haha… giving it away a bit! Though I’ve been stuck on this for days, so if anyone can help I’d be hugely grateful!


it could be possible with python… but unfortunately i am not programmer, so the only way i would do it - copy the same model, make it a little bigger and map it with dirt material and change Alpha value in IPO. But it increases polycount…

ok i found somethig…

Go to Ipo Curve editor and change Ipo Type from Object to Material and you can change everything there, from specular color, normal-map strenght and col value… so i think you should try that. I suggest you should also make a dirt normalmap and increase it when car gets muddier.

…but kinda dont work for me. Looks like MatIpo is not working in Game Engine

Thanks buddy, I’ve been working with the material IPOs but they seem very inconsistent, many times no IPO curves are added at all… will keep working on it anyways, thanks for the help!

Maybe look into using a stencil texture that is animated from black to white.

Or if the transition doesn’t need to be super smooth you could use edit object/replace mesh to step through the transition

yeah, it doesn`t add a curve when just pressing “I”, you have to press on selected channel (for example ColR - Color Red) then press “N” - Transform properties and there press “Add Driver” button and only then press “I” - insert curve - default one-to-one mapping and “remove Driver”… at least thats how i do it.

Yeah… I don’t think material IPOs work in the game engine… it works with a render, but not realtime, which is really annoying… I may PM one of the coders, I can’t see that it would be too much trouble to implement. I’m afraid that this means I’m not going to be able to enter TURBO in the current GE contest, or at least not until this bug is sorted…

i think you should use this method - create separate mesh for dirt or mud… or both and texture them. when car drives longer it gets dirtier, and when drives through mud-puddle - mud property raises and so Alpha Ipo. Here i made you a car material with mud :slight_smile:

Download .blend

Nice one mate, I shall have a go at that. Will prove difficult, however…

That’ll spend lots of frame rates though.

OMG that’s totally awesome! The detail is crazy… i love bump mapping!!

If you’re not adverse to being restricted to GLSL you could use nodes. I’m not sure if this will work, but you could use the ipo for the object colour which I believe does work in the GE. Then use the red, green or blue channel as the mix value between a dirt and a base material. Alternatively, you could create a video fading between the two textures and use the new video texture functionality to set the dirt level.

I don’t know if you’re interested in one more suggestion, but you could probably set up an animated blend texture in Python by using two UVs. Use one for both the car texture and the mud, then use a second UV layer for the texture blending layer. Use Python to get the second UV layer and animate it (use an tileset type animatable texture for this, adding a bit more muddiness with each step). The downfall to this over martinsh’s method is that you probably couldn’t use bumpmapping.