Blend texture not generating a proper gradient

By a proper gradient I mean a linear white to black gradient. Surely this is just user error. There is no way this severe bug has gone unnoticed since 2.61.

On the left is a UV mapped image I generated with Photoshop. (Simple two color linear gradient.) On the right is a Blender blend texture. I tried all kinds of settings but none produced an identical gradient to the Photoshop one.

These are the settings I used. The gradient type is linear but the gradient produced is clearly not linear.

it is linear - but to get the result you want, you may need to grab the stop for the black and drag it to the right. Oh, and photoshop gradients aren’t automatic, so it all depends on values you choose and where you place your tool on the canvas before dragging.

the color ramp you have in blender is a pretty basic representation of what your output will look like - and from looking at it, that is pretty much what your picture on the right from blender looks like.

I am aware. Perhaps this image will help you understand the problem here. Both gradients are exactly the same as on the rendered image in OP.

I don’t think this a bug, but a different implementation than what you expect. Adobe implemented theirs one way, Blender implemented theirs another. What result would you get if you add a stop in the middle of the PS ramp, get that hex#, and then add a stop to blender’s and change it to the same hex#?

If I am wrong, then it might be good to report it as a bug once you have enough data to support it. I don’t know the math or code behind either implementation, and I have always just used mapto Object with an empty named for manipulating blend textures. I haven’t used them in Cycles yet, except once and I had to get help from Proxe to map it correctly then.

Hmm… it looks like Blender’s “Linear” progression is actually quadratic, and vice versa. May be a bug.

Changing the blend texture progression to quadratic makes the gradient match the Photoshop one better, but still not exact.

Okay, we are talking two different places. The first example showed linear from the stops interpolation, but yes, if you change to Quadratic in the Blend Progression setting below, then you get something closer to what Demian is looking for. Good call, Stan. I wouldn’t call it a bug exactly, since Photoshop doesn’t offer something other than linear, radial, angle, reflected, or star. I mean, unless someone can show me where I missed the choice between linear and quadratic in photoshop…

Well, it’s not, and it’s not. I forgot to check color management settings :slight_smile:

Only with color management turned off (Display device: None) we can see “pure” interpolation effects. So linear is linear and quadratic is quadratic :slight_smile:

Look here:

Left to right: linear gradient from Gimp, original Photoshop gradient by Demian, Blender’s linear gradient. So the difference with Photoshop comes from how exactly the gradient was applied there.

So this would be more visible in something rendered in DPX for use with HDR… yeah, I rarely think to look at what is going on with color correction, I assume it is just ‘working’ correctly.

Well this is just great. Now I don’t know who to blame anymore. I guess I’ll just go with the majority vote and say that both Photoshop and Blender are wrong. Who knows what’s right anymore.

Edit: I just noticed. Turning the smoothness down to 0% (You can see the box in the image I posted a few messages up) creates a gradient identical to the other three programs. Thus, Blender is wrong here. The Photoshop gradient looks different due to this slider, which can be changed.

Nobody is “wrong” here. Please reread my previous post. Discrepancy is due to Blender employing color management (i.e. color correction better suited for arbitrary color space).

Download attached blend file and render it out. You’ll get the same 100x512 image that you get in other programs.

EDIT: hmmm, this actually brings me to thinking… If I want to use linear blend texture to perform color/material mixing, color management may mess things up. Hmm… better make some tests before I make a thread about that.


gradient.blend (636 KB)

That certainly works. I had no idea such a thing existed. Thanks.