The endings all begin the same, regardless of what you have accomplished in the game itself: The telescope breaks through the lens, opening the Star Fissure. In the linking cage, Atrus links in, shields his face from the howling wind as Riven tears itself apart. Upon seeing you, he lowers his D'ni glasses to around his neck, and runs up to you.
This is the ending if you managed to capture Gehn and free Catherine (the "good ending"):
Atrus: There isn't much time. Where's Catherine? Where's the book?
[Catherine appears from around the corner. Atrus turns and embraces her. Catherine hands Atrus the Prison Book and walks up to you.]
Catherine: The villagers are safely in the Rebel Age. I thank you.
Atrus: As do I. You've accomplished more than I could have hoped for...for giving me back my life. The path home is now clear for all of us.
[As a rumbling in the earth gets their attention, Atrus pulls the Linking Book from his pack, opens it and holds it out to Catherine. She puts her hand on his face for a brief moment, and then links back to D'ni. Atrus closes the Book and turns back to you.]
Atrus: This is where our paths must part. Perhaps we'll meet again some day. You know where to find me.
[Atrus walks over to the edge of the Fissure and opens the Linking Book again. He turns back to you.]
Atrus: Goodbye, my friend.
[Atrus links out and the Linking Book falls into the Fissure. Without warning, the ground beneath you collapses and you begin to fall...swimming through the ocean of stars, falling away from the world of Riven. The end credits theme begins playing as Atrus narrates.]
Now I understand...endings and beginnings are within the Fissure, that Riven-cleft of stones that acts as both wall and a bridge. And though I am unable to understand how, the very flow of stars that brought my Myst Book into worthy hands, I am sure served as a safe passage home for my friend. The Age of Riven is closed forever, but the people of Riven are free...and now I am at rest, understanding that in Books, and Ages, and life...the ending can never truly be written.
This is the ending if you managed to trap Gehn, but did not return for Catherine (the "bad ending").
[Atrus links in and runs up to you.]
[Atrus takes the Trap Book from you.]
I don't understand. You've captured Gehn, but why did you signal me?
[The earth rumbles, causing Atrus to stagger.]
There's no time left. The Age is collapsing. I've got to get back before it's too late.
[Atrus puts the Trap Book into his pack and pulls out his Linking Book. He gestures down into the Fissure.]
Your way is clear. You're free to go home.
[He opens the Linking Book, his hand hovering over it for a moment, then he turns back to you.]
Farewell, my friend.
[Atrus links out and the Linking Book falls into the Fissure. Without warning, the ground beneath you collapses and you begin to fall...swimming through the ocean of stars, falling away from the world of Riven. The ending theme music plays in the background as Atrus narrates.]
So much work...Gehn is at last defeated, but the price of this defeat is dear. The people of Riven must try to hang on to a world which is dying, and I am sentenced to the futile task of nursing Riven's fatal wounds. Of Catherine...I will never know her fate.
This is the ending if you neither captured Gehn nor freed Catherine (the "worst ending").
[Atrus links in and runs up to you.]
Atrus: There isn't much time. Where's Catherine?
[He takes the Trap Book from you, frowning when he sees...]
Atrus: The Book is empty...I don't understand.
[Gehn walks up, dart-gun in hand!]
Gehn: You never did!
[Atrus turns around to see Gehn, his dart-gun pointed right at him. Cho stands at Gehn's side.]
Gehn: Father? I am no longer your father, because you are no longer my son!
[Gehn shoots Atrus, who falls dead to the ground. Gehn hands his dart-gun to Cho, who points it at you. Kneeling, Gehn turns Atrus' body over, searches for the Linking Book back to D'ni, and finds it. Staggering a bit as the earth trembles, Gehn walks up to you.]
Gehn: I don't know what you thought you were doing, but...thank you. I finally am...free.
[Smiling, Gehn turns and walks away, gesturing at Cho, who then shoots you. Your vision blurs, then fades to black.]