17
$\begingroup$

I want to add a gradient background to my render, but within the compositor (not with the actual background world setting of the scene). I would also like to don't have to use an image (neither external nor internal) to achieve that.

I rendered my image with transparent enabled in film section of render panel. Then I tried to add a ColorRamp node with an Alpha over node, but now I'm stick on how to give a Factor to this color ramp.

My thought is to give it some coordinates corresponding to Y axis of the image, but I can't find a way to.

Is there a node that give some image coordinates ? (like mapping node in materials)

$\endgroup$

3 Answers 3

14
$\begingroup$

Add a Texture Node with a blend texture and color ramp. You can adjust the gradient using the Color Ramp in the Textures panel. (See image)

Node Setup

$\endgroup$
4
  • $\begingroup$ Not my question but from what I read, this was not what I was expecting as it uses a texture. A good answer nonetheless. $\endgroup$
    – iKlsR
    Dec 12, 2013 at 20:09
  • $\begingroup$ Well, it actually does the trick, so I'll accept this one. Considering that a "Blend texture" isn't exactly an image... :P Thanks @rioforce!! $\endgroup$
    – Polosson
    Dec 12, 2013 at 22:55
  • $\begingroup$ @Polosson I am glad I could help you. :) $\endgroup$
    – rioforce
    Dec 12, 2013 at 23:08
  • 1
    $\begingroup$ Makes you wonder why every node editor in Cycles has the gradient node available except the compositor... $\endgroup$ Dec 30, 2016 at 15:52
17
$\begingroup$

You can generate a Gradient by displacing a RGB node with a white value on the Y axis, and using that as a factor to mix two colors (Note the Wrap Value on X axis on the Transform node).

enter image description here enter image description here

To soften the edge between the two colors apply a Blur node. enter image description here

Then just mix it with your rendered image.

enter image description here

All done within the compositor, with total control on the placement and softness, and no need for additional textures or images.

enter image description here enter image description here

$\endgroup$
0
$\begingroup$

I don't think such a node exists. However, you can create a gradient fairly easily if you bring in an external image, convert it to BW, move it around and crop it, then blur it.

For example:

enter image description here

Node setup:

enter image description here

$\endgroup$
2
  • 2
    $\begingroup$ Good answer but I think OP was looking for something inbuilt, not external, the amount of nodes you used to blur, why not just import a gradient image or use the world settings. ;) $\endgroup$
    – iKlsR
    Dec 12, 2013 at 17:58
  • $\begingroup$ @iKlsR yes, you're right I was looking for something inbuilt, not using an external image (nor internal :P). Thanks for the answer BTW @CharlesL! $\endgroup$
    – Polosson
    Dec 12, 2013 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .