In Super Mario Sunshine, Bowser Jr. impersonates Mario using a magic paintbrush.
Bowser Jr. disguises himself as Shadow Mario, a blue, graffiti-spraying double who frames Mario for damaging Isle Delfino. The paintbrush lets him create the goop and graffiti that disrupt the island and cause the Shine Sprites to disappear.
The brush was developed by Professor E. Gadd, the same inventor associated with FLUDD, Mario’s water-spraying device. Mario spends much of the game cleaning the island, pursuing Shadow Mario, and uncovering the truth behind the attacks.
A common mix-up is treating Shadow Mario as a separate character. Shadow Mario is the disguise, while Bowser Jr. is the person underneath it. Near the end of the story, Bowser Jr. explains that Bowser told him Princess Peach was his mother, motivating his attempt to kidnap her and oppose Mario.