8
$\begingroup$

Blender render has a nice vertical gradient for the background. I cannot find a vertical gradient background in the cycles render, only a horizontal gradient. How can I use a vertical gradient as the Cycles world background?

Cycles render horizontal gradient:1

Vertical blender render gradient:

2

$\endgroup$
6
$\begingroup$

Go to the node editor. Set the shader type to world and select Use Nodes:

enter image description here

Add a Texture Coordinate node, a Separate XYZ, two Math nodes and a Colorramp node.

Connect the Object output of the Texture Coordinate node to the Separate XYZ node, the Z output to the first math node, change the type of the math node to Add and set the bottom value to 1, connect the output of the first Math node to the second Math node, set the type of that node to Multiply, and leave the bottom value at 0.5. Connect the output of the Multiply node to the Colorramp node and connect the Colorramp node to the Color input of the Background node.

enter image description here

This will give the following result:

enter image description here

$\endgroup$
  • $\begingroup$ Thanks! This was actually the first time I used the node system. This is so much better than using the menus to get the effect I wanted $\endgroup$ – 10 Replies Aug 8 '16 at 0:38
  • $\begingroup$ Am I the only one that is still having trouble with this? This solution just makes it so the background changes colors when I look at it from different angles. $\endgroup$ – Alex Jun 29 '18 at 21:43
  • $\begingroup$ @Alex the background in this case is the sky, the inside of a sphere, and not a simple plane that is put as a background behind the object. $\endgroup$ – Ezra Jul 14 '18 at 20:05
  • $\begingroup$ @Ezra My issue was that my camera was set to orthographic projection, so I couldn't get any gradients. Still don't know how to fix! $\endgroup$ – Alex Jul 15 '18 at 22:06
11
$\begingroup$

One way to make the world a vertical gradient in Cycles is to add a Gradient texture and color ramp for your color, and rotate the texture coordinates accordingly. Here is the node setup and result of said nodes:

enter image description here

enter image description here

$\endgroup$
  • $\begingroup$ Can you easily convert it to a radial gradient? $\endgroup$ – MicroMachine Nov 27 '18 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.