Corona Distance with different colors for objects

Hi guys!

Please, someone can give a help?

Im trying to use a material with corona distance. but I need to have two different colors for each object.
Example:
I have a Road and I need to paint a yellow line for taxi parking and white lines for general parking using the same geometry.

Any idea?!

It could be possible if the objects would pass their IDs for example to the distance map and you’d use a multimap for the coloring… but i doubt it is the case. As for now, you probably have to use different distance map instances for different colors.

Create two separate Distance maps with different colors. Use a blending node like Composite or Corona Mix to blend them together. Plug into diffuse.