World of Dreams

is episode 346 of the Naruto: Shippūden anime.

Summary
Still in disbelief over what has happened, Obito walks over towards Rin's body after slaughtering the Kiri-nin while ignoring the unconscious Kakashi, Obito then remembers Madara and White Zetsu's words as he cradles her lifeless form while vowing to change the world into one where she is still alive. After returning to Madara, as the elder Uchiha expected, Obito accepts becoming his apprentice. From there on, Madara uses his genjutsu to tell Obito the legend of the Sage of the Six Paths and the Ten-Tails. After teaching Obito the means to summon the Demonic Statue of the Outer Path along with imparting all his skill and knowledge, Madara uses a Yin–Yang Release ability on White Zetsu to infuse the clone with his will, completing Zetsu with the birth of Black Zetsu. After disconnecting himself from the Demonic Statue of the Outer Path, Madara finally dies telling Obito that he will be Madara until the day he is to be resurrected by the one he transplanted his eyes into: Nagato. Soon after, now going by the name Madara Uchiha with White and Black Zetsu accompanying him, Obito arrives in Amegakure where he meets Nagato and his friends. Though Obito tempts Nagato with his knowledge and offers to aid him in achieving peace, Yahiko gets his friend and Konan away. Despite being warned by Yahiko to stay away, Obito tells Nagato that he would reappear at the same time and place everyday until he accepts the truth of words. Soon after saving orphans and gaining a new member of their growing group, Yahiko decides to name their group Akatsuki.

Trivia

 * In one scene, an unconscious Kakashi is mistakenly depicted wearing a Konoha forehead protector, despite not having it on by the time Obito arrived.