Originally Posted by Senju Bean
Rikudou's 2 power sources both stem from the Juubi; his inheritance from his mother and him being the Juubi Jin. Conclusively speaking, the Rinnegan comes from the Juubi's chakra and its effect on the person who has it. He either inherited from her, or directly from the Juubi as its Jin, and he most likely got it from Kaguya given that he'd need such power to oppose the Juubi.
Regarding Obito, the Sharingan is an evolved version of the Rinnegan, strictly speaking if we're talking about the evolutionary chain of Dojutsu. How is it supposed to transform in to a de-evolved version of itself, if it is already the newer Dojutsu?