I have a simple plane and a cycles material as shown in the image. (Blender 2.68a)
I extracted the R channel from the ‘texture coordinates’ node to get the uv coordinates in the horizontal direction.
As you can see the grey gradient is not linear from black to white. For comparision I created a linear gradient using Gimp (see red arrow).
My question now is why the gradient is not linear and how to make it linear?
I need this to change e.g. size of a texture depending on uv coordinates, but I need it linear.
I don’t understand the problem or the tools well enough to give you an explanation but there still might be a solution available to you by trying some of the following adjustments.
(i)Instead of using the generated coordinates, you might instead try UV mapping the plane and then using the UV coordinates to drive the RGB node.
(ii)Try using some math nodes to scale it to what you want. It looks to me like white is greatly overpowering black so I’d start with dividing the coordinates by 10 to see where things end up. If that’s backwards change the multiplier to 10 instead of 0.1.
UV coordinates might be from the range 0.0 - 1.0, that’s how GPU shaders do things, but I’m not sure with Blender. Since a default plane in Blender is 2 units, the model might be 2x bigger than the coordinates.
Comparing your results against GIMP was a great idea. You might want to take screen captures with all the different methods you try and paste then in like you did with the GIMP gradient up above. Maybe you will start to see a pattern that you can hone in on.
@marc dion: similar ideas I had already myself, but I need a 100% linear result not on which is close to 100% linear so I need some more backgrounbd information why it is not linear and how to solve it or convert it to linear.
@spaced: sorry I don’t know what is your result now. I don’t want to create an image gradient and feed it into the R input of ‘Combine RGB’ node. I want to take the R output of ‘Separate RGB’ and work with that. So how can I make it linear? Can you please make it more clear to me?
talking about using the gradient node in cycles it should have a better linear output!
now from another point of view by using the math power function in your nodes set up it might help to correct the curvature and get a more linear gradient if needed
Ignore the displayed gradient, the conversion from UV coordinate value to color value is not 1:1, but the coordinate values ARE linear.
As it is already linear, it should be able to do what you want. If it isn’t working, please post a pic and explanation of what your texture resizing looks like.