Keith opened this issue on Jul 21, 2009 · 23 posts
dasquid posted Wed, 22 July 2009 at 2:21 AM
Quote - So I'm working on a character and want to add a tattoo via the blend node. Now, this isn't as difficult as it can be, even with extremely complicated Material room setups, because I've created a base node setup that can take any texture and combine it with whatever I want with a minimal amount of work. So I take a look at the skin node setup and sigh because it means I have to haul out my blend setup instead of simply using one or two blends for the texture and bump. And just before I load up my shader, I pause because something catches my eye that seems a bit odd.
There's a connection from the texture that goes into a math function node, and then out. But all the math node is doing is multiplying the texture by 1. Nothing else. And multiplying something by 1 gives you what you started with.
Not believing someone would do something so silly, that there had to be a reason for it, I bypassed that node and rendered. Nope, zero difference.
So then I started looking deeper. There was a color ramp node being fed a diffuse node. All four colours in the colour ramp were black. Hey, do you know the kind of gradient you get between black, black, black, and black?
And then, amusingly enough, that fed into a colour math node. The creator took the skin texture, fed it through that math node that did nothing which I'd noticed at first, and then connected it to the value_1 of the node, and the output of the ramp into value 2. And set it to multiply.
When you multiply a colour by black, you are multiplying it by zero. I assume most people learn what happens then around the same time they learned about multiplying by 1.
And then, just to add insult to injury, they set the colour of value_2 (receiving a value of zero, remember) to...black. Which is zero. Which means their math node is multiplying the zero that's incoming from the ramp with another zero. And then using that zero to multiply with the texture and, obviously, outputting a zero to the Alternate_diffuse (which was, of course, set at another colour).
Long story short, I was able to rip out about half of their node setup that was doing absolutely nothing.
Now, i can see that sort of thing happening when you're experimenting, but if you're going to sell it, i think it sort of behooves you to clean the thing up.
And thus endeth today's rant.
So they multiplied by zero several times?
Well at least they didnt try to DIVIDE by zero :P