How do I produce a scenic orbit?

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Declan Royce
Posts: 16
Joined: 15.06.2002
With us: 22 years 5 months
Location: Missoula, MT

How do I produce a scenic orbit?

Post #1by Declan Royce » 15.06.2002, 01:29

How do I go about producing an orbit around a given planet (usually Mars) that is realistic, simply for the purpose of observation. I tried tracking a spacecraft around earth, but there is drift because of the spacecraft's own rotation. So I need to produce an artificial "invisible" spacecraft at about 250 - 450 kilometers with a rotational period in sync with its orbital period.

Also, I usually drag the Point-of-View so that I am looking at the horizon, not directly down, so I am always facing the horizon with the planet tracking under me.

The reason I'm interested in producing this effect, is because I use celestia as a moving portrait, video-output to a flatscreen television on my wall.

So I'm a Star Trek fan...sue me... :roll:

Thanks everyone, I hope someone has a creative answer.

Declan

RonA
Posts: 9
Joined: 01.06.2002
With us: 22 years 5 months

Post #2by RonA » 15.06.2002, 02:22

Declan,
Interesting question - I wish I knew enough to help you. If you don't get a timely answer, I'd suggest posting this over in the general "Users" forum.
Star Trek?! Dammit Jim! I'm a doctor, not a shuttle pilot! :wink:
Ron A

abiogenesis
Posts: 104
Joined: 07.06.2002
With us: 22 years 5 months
Location: Redmond, WA

Mars Orbit

Post #3by abiogenesis » 15.06.2002, 03:59

Hey Declan,

I'm not exactly clear on what kind of orbit you're looking for. I think what you want is to see the planet scrolling by below with the camera fixed on the horizon.

Like this. (You'll need the Divx Codec to view the movie)

If that's all, then you just have to Go To the planet, adjust to the desired altitude and point the camera at the horizon. Following a planet maintains the camera's position relative to the planet's center.

The movie was taken at about 350km above the surface of Mars with the camera facing the horizon against the direction of rotation. The time scale was 100x. A nice view of Phobos rising over the martian desert.

Hope this helps. :)

-abiogenesis-

Topic author
Declan Royce
Posts: 16
Joined: 15.06.2002
With us: 22 years 5 months
Location: Missoula, MT

Not quite, but very close...

Post #4by Declan Royce » 15.06.2002, 15:44

While that is exactly the effect I'm looking for (scrolling planet, camera on the horizon) I want to move around the planet, not just let the planet move under me at an accelerated rate. The problem is that the stars don't move, so that's why following the planet doesn't quite work. I think that following an orbiting point, then shifting the camera to the leading horizon would work...but how? :?

Thanks,

Declan

abiogenesis
Posts: 104
Joined: 07.06.2002
With us: 22 years 5 months
Location: Redmond, WA

Tricky Orbit

Post #5by abiogenesis » 16.06.2002, 00:41

Picky, picky! ;)

How's this, then?
This time, the movie's in real time.

Here's the recipe:

First, modify your solarsys.ssc file. It's in the data folder. Add something like this:

Code: Select all

"Orbit" "Sol/Mars"
{
       Radius 0.000001
       EllipticalOrbit
      {   
            Period          0.003 # 300 orbits per Martian day
            SemiMajorAxis   3744  # Distance from Center of Mars
      }
}


This will add an invisible object called Orbit about 350km above Mars.

In Celestia, Go To Orbit and point the camera at the horizon of Mars. Now, Following the Orbit won't do. Since the camera's position relative to Mars is not fixed, the planet will just scroll off the bottom of the screen. What you need to use is Phase Lock.

What I did for the movie was pause the simulation (space bar) and get the horizon centered in the screen. Then, with "Follow Orbit" still in the bottom right, select Mars. Then press ":". It should then say "Lock Orbit - Mars" in the bottom right. This will maintain the camera's position relative to a line between the centers of both Mars and the invisible Orbit.

I agree, this effect is much nicer than just following the planet. It's pretty neat to watch the Martian sunrise. :)

It should be trivial to modify the files to add dummy orbits to any celestial body. There are other parameters to EllipticalOrbit that I didn't mess with. I found I got acceptable results with just these two.

Let me know if this will work for you.

-abiogenesis-

RonA
Posts: 9
Joined: 01.06.2002
With us: 22 years 5 months

Post #6by RonA » 16.06.2002, 01:34

I'm obviously not Declan, but thanks for the info! Sounds like something I want to go try out.............
Ron A

Topic author
Declan Royce
Posts: 16
Joined: 15.06.2002
With us: 22 years 5 months
Location: Missoula, MT

Abiogenesis has the skills to pay the bills!

Post #7by Declan Royce » 16.06.2002, 02:48

Sir I commend you! This is absolutely what I wanted! And it was so simple! In my mind I was thinking of invisible spacecraft, imaginary means of TRICKING Celestia, but you worked with the system and produced the most amazing result with a simple...what...three or four lines of code? I am so pleased. So very pleased.

Look. I am no wiz with OpenGL or Celestia (though I did know where to find solarsys.ssc :wink: ) But I am a pro (seriously) with photoshop. If you ever need textures or graphics of any kind for planets or otherwise, I will give it my all. I owe you. My wall has never looked so cool!

Thanks again, and I'm glad you found the effect as visually pleasing as I thought it might be...

Declan

P.S. Enjoy all those sunrises!

abiogenesis
Posts: 104
Joined: 07.06.2002
With us: 22 years 5 months
Location: Redmond, WA

Scenic Orbits

Post #8by abiogenesis » 16.06.2002, 03:43

I must insist I am not worthy of such high praise. Most of the credit must be given to Chris for developing such an amazing piece of software.

While I, personally, have no current need of any textures, I'm sure the Celestia community could greatly benefit from the services of a professional photoshopper.

There's a thread in this forum on procedural generation of textures. I think the Mostly Harmless guys are working on that. Mostly Harmless is an Elite-style game based on Celestia. How cool is that?

Also, Rassilon is working on an Extrasolor Systems Project. He's always interested in textures for fictional solar systems.

There's also a bunch of threads about bump- and specular-mapping that look cool.

I suck at photoshop. If you could lend any textures or, better yet, wisdom to the discussions in the forum, I would consider your "debt" paid forward.

Or, if you ever find yourself with an extra one of those flat panel TVs on your hands... ;)

-abiogenesis-

Vicware
Posts: 120
Joined: 23.02.2002
With us: 22 years 9 months
Location: Los Angeles, CA

Abiogenesis has the skills to pay the bills!

Post #9by Vicware » 16.06.2002, 22:58

Declan Royce wrote:Look. I am no wiz with OpenGL or Celestia (though I did know where to find solarsys.ssc :wink: ) But I am a pro (seriously) with photoshop. If you ever need textures or graphics of any kind for planets or otherwise, I will give it my all. I owe you. My wall has never looked so cool!

Declan


Join the club.

Vic


Return to “Development”