1
$\begingroup$

I am animating a chess game, and every time a piece eats another piece, I want an effect similar to Chess Titans where the piece fades out of existence. The only problem is that all the chess pieces of one team are using the same material, so I cannot animate the material of it.

I know I could make a separate material for every piece, but I was wondering if there was a way to animate an objects transparency regardless of material. Thanks in advance!

$\endgroup$

2 Answers 2

4
$\begingroup$

Using pass index

You can use the object 'pass index' from the 'object info' input node.

Pass index is an integer. But you can divide it by a given 'scale' value to have a progressive transparency:

enter image description here

So that:

enter image description here

Note: pass index will animate (keyframes) in render mode only.

Using object proximity

Another way can be testing the proximity of an object/empty to the mesh:

enter image description here

In this case, the node setting can be using object texture coordinates from both the mesh itself and an empty.

Then we take the difference and test it on X, Y (eventually Z), then multiply (will make like a ponderated logical 'and' then divide by a tuning value).

enter image description here

$\endgroup$
1
$\begingroup$

There must be a more intelligent way (Lemon just gave it), but you could create a node group with your wood material, then create a Mix shader that mixes this wood material group with a Transparent one. When you create a new chess piece, just duplicate this material with the Add a new material button. This way, any change you could make in the wood node group will be replicated within all the materials.

enter image description here

$\endgroup$

You must log in to answer this question.

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