Texture distribution using Cycles nodes

Hi,

I’m trying to learn how to set up materials using nodes in Cycles. What I want to do is to have a base material over which some other texture is overlaid, with the distribution of that texture being controlled by another texture. For example dirt patches on some concrete that appears only in a few places.

I’ve got this working, but only in one file. Here’s a screenshot of my node setup in the working file :



And here’s the .blend file :
https://drive.google.com/open?id=0B9LcUk_mUmUnSndLMlpaU091eE0

Play with the the “scale” parameter in the dirt distribution setting and you can watch the size of the areas populated with “dirt” patches change as you’d expect.

But here’s the weird thing. I tried to re-create this in another file, and it doesn’t work. As far as I can tell the settings are identical. Here’s a screenshot of the nodes :



And the .blend :
https://drive.google.com/open?id=0B9LcUk_mUmUnNmJ0R2prQWxoSmM
This time if you play with the scale parameter, nothing much happens.

I’m at a loss as to what’s different about the two files. Maybe a fresh pair of eyes can spot something obvious.

Thanks !

I didn’t check your files, to be honest, but the Dirt and Dirt Distribution textures don’t specify which kind of texture coordinates to use. Which means that they default to using UVs - and if the respective object is not UV unwrapped…

Thanks IkariShinji, but I already tried adding texture coordinate nodes to the textures and it doesn’t make any difference.

Preview the outputs from the color ramps using built in node wrangler addon. Currently rendering so unable to check.
I’ve never used alpha like that (never even considered you could), and I try to use fac output of noise when I can. Currently it doesn’t matter, but in next version fac output will be faster if you only need one channel.

Some progress… maybe.

It seems the order in which the nodes are created matters. Whichever one I create first affects the large-scale variation and whichever is second controls the smaller details. It doesn’t matter which alpha is plugged into which slot of the Multiply node, it really seems to be their creation order. But that seems extremely strange to me, since the values are being multiplied…

If you can reproduce it, and have others reproduce it, submit a bug report. A couple of times I have experienced “broken nodes” (and yes, it was the noise node), where it didn’t seem to produce expected output (I wasn’t using alpha). Recreating it using the same input and settings fixed the issue. But I was never able to figure out how on earth that could happen or recreate it.

Good idea. I’ll check this a few times to make sure the order matters (or prove there’s an inconsistency - either would constitute a bug, I guess) and post a bug report.

Not at all! The second file acts as expected, no bug involved. I suggest you to watch some node tutorials, since your are work a bit randomly right now

Would you mind explaining why the second file behaves differently to the first then ? I’m pretty sure the node setups are identical, so I don’t understand why they behave differently. If you can recommened a good node tutorial that would be really helpful !

One thing where your setup clearly deviates from the original setup is the color ramps - subtle changes here can have pretty strong effects.

Try to move both markers of the top color ramp farther to the right - as in the original node setup.

Oh, you’re right !! Thanks so much ! I guess I did not play around with that enough, I didn’t think it would have such a dramatic effect.