Is there any way to render each mesh separately?

I have an object composed of discreet meshes. I want to render each of these components out separately so they can be brought into an application and toggled on and off.

Currently I just open the scene, and using the layer panel I have to turn off the visibility on all but the mesh I want, render it, save as PNG, then go back and repeat the process for each mesh.

Is there a way to automate this?

This is the simplest way I can think of. Using material nodes.

That’s for Blender internal render, but the principle is the same on Cycles.

That did the trick, thank you so much for your help!