1
$\begingroup$

I am using an object's 3D position to apply a diffuse colour. I have a selection of objects that are different Z positions and hence have the colour ramp applied to them. As objects merge back into their final places I would like them to retain their colours.

The position of the plates when exploded will not be as they are now so I cannot just simply reduce the scale of the ramp when they contract back in. I need them to "remember" the value of their Z displacement for the colour ramp to use that data.

Basically I need a node (or some way to do it with what I have) that can be key framed to "freeze" it's output value.

H

Node Setup

Colour when spread apart

$\endgroup$
0

1 Answer 1

0
$\begingroup$

You can use "baking" for this. Colors can be written on image texture.

1) First, setup UV for all objects. Select all objects, press Space and search for "Smart UV Project".

2) Next, connect what you want to bake to emission shader. Add an image texture and put it on node setup like this:

enter image description here

3) Find "Bake" section in render settings, select type to "emit" and press "Bake"

enter image description here

4) If you will do everything right you will get an image like this, save it.

enter image description here

5) Finally, connect image node to your node setup

$\endgroup$

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