Control appearance of two textures with a texture

I want to have one texture in BW work as a mask that controls the visibility of two other textures. BUT! I want to be able to use a slider that works like the Color Ramp that, when the slider is moved the gray-values change and at 0.000 the first texture is only shown and on 1.000 the second is shown. The BW texture makes like a flowing change in their appearance. As if the one texture is flowing over the other one. It works with a Color Ramp, but only to one side.

so what is the problem if you put a ColorRamp or a Math > Multiply between the Image Texture that you use as a mask and the factor of the Mix, and you put some keyframes of the values?

Thanks for the reply. I tried out you solutions and found following problems:
If I use a color-ramp i can only move the slider of one color and get from black to texture and from texture to white. Not from black over the texture to white. Multiply does the job with the problem that it is only black when its value is like 300. The math node set to power gives me the same result only that the black is on 50. And it’s not linear. So it starts at white at 0 and goeas to the texture at 1 and to black at 50. But I need a 0-1 slider, not an indefinite one.

Did you try vector curves or rgb curves on extend extrapolated?
For rgb curves, 0-1 range sounds sensible. But I can’t phantom why we can’t remap the area for the vector curves node. So you’d have to do a bit of manual math in order to figure out the third point to end up at 50=1.

Edit: Actually, rgb curves should be remappable too. Sometimes I need to “do stuff” in just a tiny fraction of the space, and being locked into a 0-1 range makes the editor unusable.

Well, I take that back. I’m pretty sure I’ve seen those before, but I could not find them at the time of writing so I thought they were gone. You need to do “reset view” after enabling clipping.

Does this work for you?

That isn’t working. Where do I plug in that node?

Sorry, I probably misread your intent. Even reading it now, I’m confused about the purpose, and where your “slider value” is located in your node setup. I’m sure it can be solved with maths and splitting signals, but if you found something you’re happy with I think I’m off to other things :slight_smile:

The purpose is that one texture should be replaced by another texture. Usually you do this by mixinge them and move the slider. But the way how those textures get exchanged must be controlled by another black and white texture, so values. That it looks like the one texture is flowing over the other one. In my picture i use a subtract node and the value is driven. Above under properties is a slider that is called Colorchange. That controlles the Subtract-node slider.

SSo what I found out is that the controlling texture is supposed to tell one texture to flow smoothly over the other. Like lava or paint. The gradient just defines the direction of that flow.

It sounds like you’re talking about something relatively simple. To mix between two textures, using another texture to determine the mix, you just mixRGB. Everything goes where you’d think, mix texture color into the mix factor. If your controlling texture is just black and white, there will no actually mixing, just replacing one texture with another.

If you want to animate this border, there are multiple ways to do it. I’m going to recommend a UV warp modifier. (You can also just animate a UV offset in the material if you’d prefer.)

Lava-over-ground flow has a kind of interesting thing where the border flows, the lava flows, but the ground stays still. If you want this, use two UV maps, one with a UV warp modifier and one without. The lava texture uses the warped UV, the mix texture uses the warped UV, but the ground uses the unwarped UV.

I don’t understand. The UV warp modifier is for the object. But I want it in one material. It can’t be that hard to make a greyscale image that has 1000 values for the gradient. But when i put it in the Factor input of the MixRGB node I just have the mix of both textures in the middle. But I need a slider. And probably have to increase the contrast. That tip with the UV warp is probably wrong for me.

The UV warp affects one UV map of one object. You can use that as your slider.

But alternatively, you can also just add some value to your UV coordinates in your material, using a separate XYZ, math, combine XYZ setup.

That doesn’t work. Your UV warp and the XYZ setup only affects the vector data of a texture. But I need to controld the value.

Here, look:

Nope that’s not it. You are simply sliding one texture over the other. The comparison with lava was wrong apparently. It’s supposed to spread, like it starts at one point and then on other locations and those grow until everything is covered. Like grass. Or paint that comes from below through crevices.

Same technique, different mask, scaling empties instead of translating them:

One example of integrating two different masks, each using different mapping:

I’m just using the stone texture value as a mask here, combine with the mask that gets modified by the UV warp modifier. You can combine something else, like your displacement value, if you want. And there are of course a million ways to combine the masks, using any math you’d want.

Your second attempt is almost there. Here is how I want it:

The add value was too much but the greater than is a very good idea.
Thanks for the help.