2
$\begingroup$

I'd like to remap colours in Cycles the way one would have done in Blender Internal, such that I could take the output of the shader/material and change the range of colours to something else, say from a ramp. This was how Blender Guru was able to change the texture map on his Realistic Earth so that the dark side of the planet had one texture, while the other did not. Such a technique could also be used to affect the fac input on Mix Nodes, as well as parameters, such as Glossy 'Roughness'.

I've tried many things without achieving the results I desire, but I'm still new to Cycles.

$\endgroup$
5
  • $\begingroup$ for the earth night map, i used a BW night texture with emission, can only be seen where the planet is not illuminated by the sun. Works if the planet moves or rotates. but if static, you can use a vertex color map/texture as a factor $\endgroup$
    – Bithur
    Feb 14, 2015 at 18:39
  • $\begingroup$ I'm not sure what you mean, as you can use a Color Ramp's output as a factor for anything, out of the box. Could you clarify as to what is not working, exactly? $\endgroup$ Feb 14, 2015 at 18:46
  • $\begingroup$ for a planet rotating, the ground texture has to follow but the "night" is on the dark side, relative to light's direction. A color ramp can map the dark side but doesn't know where the light comes from, and will follow the rotation/movement of the planet. $\endgroup$
    – Bithur
    Feb 14, 2015 at 18:54
  • $\begingroup$ this is not a problem if the planet/sun is not animated. just put a color ramp on your UV coordinates and use it as factor for day/night textures (or vertex color map) $\endgroup$
    – Bithur
    Feb 14, 2015 at 18:58
  • $\begingroup$ What do you want to do? $\endgroup$
    – Bithur
    Feb 14, 2015 at 19:00

1 Answer 1

4
$\begingroup$

It looks like what you are looking for its the color ramp node.


enter image description here

The color ramp node can take any value between 0 and 1 (values outside this range will be clamped to 0 or 1) in it's fac input socket. And it will output the respective color from the gradient specified by the color swatches just like in BI.

  • Use the + and - buttons to add more swatches.
  • Use the <-> button to flip the order of swatches.
  • The color (and alpha value) of the selected swatch is set with the large color strip at the bottom of the node.
  • You can adjust the exact position of the selected swatch with the pos spinner.
  • The alpha gradient is outputted through the alpha output socket.

So it could, as you mentioned, be used to adjust the affect of an image texture on a mix shader (the image texture could just get plugged directly into the mix shader if no color adjustment is needed though).

enter image description here

$\endgroup$
2
  • $\begingroup$ damn, you're right, i just misunderstood... :) $\endgroup$
    – Bithur
    Feb 14, 2015 at 19:22
  • $\begingroup$ I just tried this node setup that you posted, however it does not perform as expected 9ie: changing the blend factor according to luminance of the object/geometry itself). What am I missing? How does the image texture work as a factor? Also, what I need is interactive with the shader/material output, rather than an image texture. $\endgroup$
    – H Petrus
    Feb 15, 2015 at 1:01

You must log in to answer this question.

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