how to add a pixelated and unpixelated effect to object
You can do this using Pixelate node in compositor.

As official documentation notes, to create this effect you should put Pixelate node between 2 Scale nodes. And I add value and math node for manipulating this effect easily