In KH1, Maleficent turned Riku to the darkness to provide a body for Ansem to possess. When Ansem was done trying to make it look like Riku was still betraying sora, and not being controlled, he just used illusion or temporary shapeshifting to revert to his own form. After Kingdom Hearts was opened, and Ansem the heartless destroyed, either Riku had been cast aside before the fight, or (more likely) He took control while Ansem was incapacitated.
In KH2, Riku was Riku, but disguised as Ansem the heartless in order to infiltrate the ranks of the nobodies. Riku was using the remnants of the darkness within him and convincing himself and the others that he was Ansem toi the point where it became avisible illusion. When he allowed the illusion to collapse by restoring his self-confidence, eradicating all but the natural amount of darkness, removing the blindfold (so that people could see the truth in his eyes, etc.), he returned to his own form. And before you ask, the blindfold was hidden under the illusion while Riku looked like Ansem in KH2.
|