Animated earth mini project

General discussion about Celestia that doesn't fit into other forums.
Topic author
Princess_Frosty
Posts: 2
Joined: 21.04.2009
With us: 15 years 6 months

Animated earth mini project

Post #1by Princess_Frosty » 21.04.2009, 23:42

I'd just like to say this is a very cool little app which I'd never used before tonight, below is my little project I did tonight in a few hours, I hope you like it!

So the Windows7 beta has a cool new feature for backgrounds (desktop wallpapers) where you can set a rotation of several pictures and it phases from one to another on a timescale you set.

So I had a cool idea that if I could get my hands on pictures of the earth rotating in even spaced sequences that I could generate a sort of slowly animated background that rotates over a long period of time, even maybe in sequence with the actual rotation (over 24 hours)

Anyway getting the pics proved impossible, the few sets I found were either too infrequent (like quaterly shots) and were too low resolution, I wanted it for my 30" monitor which runs at 2560x1600

So I decided to make my own, heres how I did it. It took some investigation and some hacks to get the quality up but it worked a treat.

1) Download Celestia, a fantastic free simulation app - http://www.shatters.net/celestia/
2) The earth skin in Celestia is really low res so goto visibleearth.nasa.gov and aquire a high res picture of earth that is laid out flat, I grabbed the 48.7Mb TIFF [url="http://visibleearth.nasa.gov/view_rec.php?id=2431"]from here[/url]
3) Celestia needs images in .png format, so edit the image and save as 100% quality .png file, I used [url="http://www.paint.net/"]Paint.net[/url] which is free, the image ends up about 50mb.
4) Go to your Celestia install folder and in there find the /Celestia/textures/medres/ folder, replace the old earth.png with your new one, keep a backup of thje original if you want to undo the change.
5) While you're in the Celestia folder also go to /Celestia/data/ and rename "spacecraft.ssc" to "spacecraft.ssc.org". This file contains the data for several satalites orbiting earth, I couldnt find a way to distable them inside Celesitas menu so renaming this file just stops Celestia from loading the data, you can rename it back afterwards, it's only a white spot that rotates around but I wanted mine perfect :)
6) For best quality you want to force AA and AF, go into your control panel and if with Nvidia create a profile for Celestia, for ATI just force AA and AF for now, and revert back aftwards, I forced 16xAA and 16xAF
7) Down fraps for free [url="http://www.fraps.com/"]here[/url], install it then run it, go to the "screenshots" tab and set a record key (I used numpad + as it wasnt a shortcut key for Celestia also) then tick the "Repeat screen capture every x seconds" and set X to 1, this will make fraps take screenshot at regular intervals, for the best quality set the type to BMP, this is completely uncompressed (2560x1600 shots come out at 12mb each)
8) Run Celestia, configuire this to how you like it, theres a few things you'll want to do to get the best image pictures:
  • Set "Toggle full screen" mode from the "Render" menu, also pick your monitors native resolution from the "Select Display Mode" menu.
  • In the "Render" menu go to "View options" and untick anything you dont want displayed such as "markers" and set the information text to "none" to remove the HUD stuff, I also got rid of Athmospheres because thats another seperate layer for earth which spoils the particular image I used since it already had clouds etc
  • Use [ and ] keys to decrease/increase the distance stars are rendered at, I increased a fair bit to get a fairly dense stary background which looks nice
  • Turn of Anti-Aliasing in the "Render" menu, this will just cause problems with the AA you forced previously
  • Use mousewheel to set distance, use right click-drag to set angle, if you left drag and take the earth off centre then just press the C key to re-centre.
  • If when animating the camera is roating about the earth causing the stars to also rotate then just press the F key to enter follow mode, this fixes the stars and just rotates the earth.

Use spacebar to pause/unpause roation and use K and L keys to decrease and Increase the speed, I set mine fast at first to get an idea of what it would look like from all angles, tilted to get the best angle then set it slowly.

All thats left is to set the time speed using the [ and ] keys so its rotating slowly (approx 80 sec full rotate I made mine out to be) and make a mental note of when you start the image capture, I waited until a particular part of a continent was right at the edge of the globe. Hit the record key (numpad + in my case) and let it rotate, press again when finished.

You should find yourself with approx 80 images if you used the same rotate speed as me, or less if you used a faster one. I renmaed mine all to keep them in order as just 1.bmp. 2.bmp etc, copy them all to a seperate folder somewhere safe and then in windows 7 just go to the background properties and select that folder, tick all the images, make sure shuffle is unticked and set the cycle speed, I set 1 minute. And you're done!

Here's a jpg compressed at 100% qality in paint.net, I dont know if it's identical but either way I couldn't host a 12mb BMP :D It's 1Mb (down from 12mb) it's the first frame I did, it's in 2560x1600, you can see the AF and AA did a nice job of cleaning up the high res source image.

Enjoy :)

(apologies this forum wont fit the image width, heres the link to the full image on imageshack, you may need to click to zoom full size - http://img4.imageshack.us/img4/1982/74174584.jpg)

*edit* UPDATE
This is the whole set of 87 images packed into 67mb, all uncompressed and full quality 12mb bmp files - http://www.mediafire.com/?giwddlnn2jm

Image
Last edited by Princess_Frosty on 22.04.2009, 19:19, edited 1 time in total.

bh
Posts: 1547
Joined: 17.12.2002
With us: 21 years 11 months
Location: Oxford, England

Re: Animated earth mini project

Post #2by bh » 22.04.2009, 06:58

Thanks for the share... I might have to give this a go... just to get back into the swing you understand!
regards...bh.

Topic author
Princess_Frosty
Posts: 2
Joined: 21.04.2009
With us: 15 years 6 months

Re: Animated earth mini project

Post #3by Princess_Frosty » 22.04.2009, 19:18

I've updated the main post with a link to the whole set.

bh
Posts: 1547
Joined: 17.12.2002
With us: 21 years 11 months
Location: Oxford, England

Re: Animated earth mini project

Post #4by bh » 22.04.2009, 19:48

You could set Celestia to run full screen and then tab to your applications...

Image

Didn't know windows had this feature however...
regards...bh.

bh
Posts: 1547
Joined: 17.12.2002
With us: 21 years 11 months
Location: Oxford, England

Re: Animated earth mini project

Post #5by bh » 08.08.2009, 13:55

Why are you using bitmaps. I'm sure jpgs with the high quality option will do and give smaller file sizes?
regards...bh.

julesstoop
Posts: 408
Joined: 27.03.2002
With us: 22 years 7 months
Location: Leiden, The Netherlands

Re: Animated earth mini project

Post #6by julesstoop » 16.08.2009, 02:27

bh wrote:You could set Celestia to run full screen and then tab to your applications...

Image

Didn't know windows had this feature however...

Except for the fact that it's gobbling up just about al of my CPU-cycles - which makes mu MacBook Pro sorta noisy and hot - that way.
Lapinism matters!
http://settuno.com/

Spike
Posts: 1
Joined: 19.04.2010
With us: 14 years 7 months

Re: Animated earth mini project

Post #7by Spike » 21.04.2010, 22:37

This may be an old thread, but I thought worth updating in case anyone else finds my additions useful; I was after the same sort of effect on WIndows 7 and took a slightly different approach. Rather than use Fraps to take screenshots I created a little celx script that does the job, code below -

Code: Select all

--cel://SyncOrbit/Sol:Earth/2010-05-13T00:52:20.71730?x=eBz3ptb+Pg&y=+CTb7MZnMQ&z=dpvLwbg46v///////////w&ow=-0.541653&ox=-0.15377&oy=0.810356&oz=0.162143&select=Sol:Earth&fov=39.5969&ts=1&ltd=0&p=0&rf=1890199&lm=0&tsrc=0&ver=3
months={}
hours = {}
months = {"01","02","03","04","05","06","07","08","09","10","11","12"}
hours = {"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"}
countdown=9
celestia:print("In a moment this script will capture a series of screenshots\n Type Alt-Enter to go to Full Screen view now.\n To quit press the Escape key, then Alt-Enter again.", 15.0, 0, 0, -18, -2)
wait(5.0)
while countdown>0 do
     celestia:print("Starting in: "..countdown.."...", 0.8, 0,0,-4,-1)
     countdown=countdown-1
     wait (1)
end
--loop months
for m = 1, 12 do
     --loop through hours
     for h = 1, 24 do
          tdb_dt = celestia:utctotdb(2010, m, 15, h-1, 00, 00)
          celestia:settime(tdb_dt)
          celestia:takescreenshot("jpg", months[m].."_"..hours[h])
          wait(0.5)
     end
end

(the cel commented out in the first line is the view I used)
Save this as eg screenshot.celx, set up the view you want to record in Celestia then open and run the script and a couple of minutes later... voila, a bunch 'o images. The script sets the date to 15 Jan 2010 00:00, takes a screenshot, advances to 01:00 takes a screenshot etc. unti lit gets to 23:00, then the date is advanced to Feb and the process repeats.
As a matter of interest I wrote a little C++ app (my first - ahh) that checks the local system date and time, looks for a file with an appropriate name eg 00_0100.jpg then sets the desktop background image appropriately for the month of year and time of day. I scheduled this program to be run every 10 minutes. The result is a roughly seasonally accurate view of the Earth throughout the year. I wrote a bit more about wot I done on a blog, for the C++ stuff and the Celestia notes.

Boux
Posts: 435
Joined: 25.08.2004
With us: 20 years 2 months
Location: Brittany, close to the Ocean

Re: Animated earth mini project

Post #8by Boux » 27.04.2010, 15:36

Thanks Spike for the script.
To switch the pictures I use DeskSlide which has a small memory footprint and low cpu requirement.
It is highly configurable and flexible.
Download: http://www.deskslide.com/ds/
Intel core i7 3770 Ivy Bridge @ 4.4 GHz -16 GB ram - 128 GB SSD cache - AMD Radeon 7970 3 GB o'clocked - Windows 7 64 Ultimate / Linux Kubuntu

dimavj
Posts: 4
Joined: 20.10.2010
With us: 14 years

Re: Animated earth mini project+alternative video capture

Post #9by dimavj » 26.10.2010, 12:36

Hi guys, I've read your post and applyed your script, Great,

Actually I'm trying to take an alternative' video capture', via TAKESCREENSHOT instruction in my script,
So, I'll try to make Celestia to save every frame inside my script, it means: the script is about a trip along solar system, but I don't know how to force celestia to takescreenshot continuously during the script execution.

Maybe you have some suggestion...??

Thanks!

A.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Animated earth mini project

Post #10by selden » 26.10.2010, 15:03

An alternative would be to make a movie instead of individual screenshots.
That would restrict you to video frame sizes, though, which probably are not the same size as your screen.
Selden

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 16 years 2 months
Location: Paris France

Re: Animated earth mini project+alternative video capture

Post #11by jogad » 26.10.2010, 21:08

 
dimavj wrote:Actually I'm trying to take an alternative' video capture', via TAKESCREENSHOT instruction in my script,
So, I'll try to make Celestia to save every frame inside my scrip

Taking a screeshot every frame is maybe ambitious.
My computer is not capable but you can always try. 8)

It is difficult in a script because there is no timer. Your script should be contained in a loop.
It is certainly possible, but I thought otherwise.

My idea is to make a little script that takes images while the main script is running.

This is possible by making a small plugin with the Vincent and Cham's lua-plugins.


Code: Select all

    local t, t0 =0,0
    local active = false -- whatever is the config.lua

    shots = CXBox:new()
        :init(0, 0, 0, 0)
        :movable(false)
        :attach(screenBox,0, 0, 0, 0)

    shots.Customdraw = function(this)
      if not active then return end
      t=celestia:getscripttime()
      if t - t0 >= 0.1 then  -- ~ 10 img/s
         celestia:takescreenshot("jpg")
         t0=t
      end
   end

    local toggleshots = function ()
       active = not active
       if active
          then celestia:print("capture ON",4)
          else celestia:print("capture OFF",4)
       end
    end
   
    local key = key_shortcut["shots"] or "d"
    keymap[key] = toggleshots

This plugin script takes a snapshot every 1/10 second but if you have a super computer you can try to do better. :wink:

- install the plugin (read the doc of lua-plugins)
- launch your script
- type "d" to begin the capture
- type "d" again to stop the capture

But be careful. A minute of script at 10 images/seconds gives 600 images!

Think also of redefining the ScriptScreenshotDirectory in the file celestia.cfg
Last edited by jogad on 27.10.2010, 05:02, edited 1 time in total.

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Animated earth mini project

Post #12by John Van Vliet » 27.10.2010, 04:46

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 08:38, edited 1 time in total.

dimavj
Posts: 4
Joined: 20.10.2010
With us: 14 years

Re: Animated earth mini project

Post #13by dimavj » 27.10.2010, 20:35

Hi Guys
I'm sorry for mixing threads in the forum, so, I'm really new on it.

THanks Jogad...

A.C.


Return to “Celestia Users”