I want the colour of stairs change according to their position, I tried obj info node with Mix RGB and got the result below, however I want to change the transition position in Z axis, colour ramp didn't help, it only changes the transition power. Stairs are not one objects, they are separete objects using same material in Cycles. thanks

enter image description here enter image description here


1 Answer 1


You can use 'object' from the texture coordinate node :

enter image description here

The object output (from texture coordinates) is decomposed into X, Y, Z. Here only Z interests us.

The math node is here to tune the overall scale (real Z variation) to fit into the ramp (0 to 1). I used divide and 12 as value because the stairs here are 12 meters tall.

On right : the stairs made with an array modifier On left : separated objects

Edit : note that the colorramp is not mandatory here. You can short circuit it.

  • $\begingroup$ for some reason I'm not getting what you're getting, here is how it looks when I try it as you described. each step have a gradient effect unlike in your screenshot they don't make a unified effect. I don't know i.hizliresim.com/aX5p3O.png $\endgroup$
    – ideorium
    Aug 22, 2016 at 11:14
  • $\begingroup$ @ideorium. That can be a scale or rotation effect (check your objects). If not, can you upload your file ? $\endgroup$
    – lemon
    Aug 22, 2016 at 11:24
  • $\begingroup$ here is the file pasteall.org/blend/43252 one other thing bothering me is, when I apply ARRAY modifier , I get each stairs have identical noise pattern as bump, hence I made them all separate objects, is it possible to have different noise for each step when array applied ? $\endgroup$
    – ideorium
    Aug 22, 2016 at 11:37
  • $\begingroup$ @ideorium, I ignore why, but it works with your file if you set the first step cube as 'object' in the texture coordinate node. I have compared with my file and it is not necessary here. For the noise pattern, same principle. Here is your file back <img src="http://blend-exchange.giantcowfilms.com/embedImage.png?bid=1808" /> $\endgroup$
    – lemon
    Aug 22, 2016 at 12:01
  • $\begingroup$ Sorry, I don't understand what you changed on the file you sent back, even though it looks same to my original file. When I try -even though everything seems same, I don't get it , and yes all objects are already connected with Object in text.coordinate. Can you please explain a bit more explicit, thanks $\endgroup$
    – ideorium
    Aug 22, 2016 at 12:15

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.