recording animation with linux/celx

General discussion about Celestia that doesn't fit into other forums.
Topic author
skurfuerst
Posts: 5
Joined: 18.12.2004
With us: 19 years 11 months

recording animation with linux/celx

Post #1by skurfuerst » 18.12.2004, 18:37

Hi,
I have watched celestia for some months now and I really like the project a lot!

However, I wanted to use it for recording a part of a 3d-animation, and that's where I encountered some problems:

The animation should begin having the solar system, and then it zooms to the earth and flys into the cloudlayer of the earth. Thats not the difficult point however.

I use linux, and I want to capture this animation in a resolution of 720x576, with 25 frames per second. Using lua scripting, the former is no problem, but 25 frames per second is too much, the resulting animation looks bad.

Now my question: how can I slow down motions in celestia? I want, for example, that moving from one object to another doesn't take 4 seconds, but 8, so I only have 13 frames per second to capture.

Did somebody do a similar project with celestia/ does anybody have a basic lua script which can do some of the functionality needed?

I'd be happy if you shared your ideas about the topic with me,
Sebastian

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #2by Cham » 18.12.2004, 19:15

You could slow down time by a factor of 10 or 100 (or more) by pressing the "k" key.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
skurfuerst
Posts: 5
Joined: 18.12.2004
With us: 19 years 11 months

Post #3by skurfuerst » 18.12.2004, 19:22

Hi,
but when I slow down time, the animations (travelling, ...) are still as fast as usual...
Thanks for your reply,
Sebastian

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #4by maxim » 18.12.2004, 20:19

The cel command syntax allows to specify the amount of time (in seconds) that a travel will take. I'm not sure about celx, but it should also be possible there. If not: there exists a celx command that allows to expliciltly execute a cel command.

You may also considerate another approach:
celx allows for automatic screen capture. So you may write a celx script that does stop-motion capture of subsequent jpg pictures every x milliseconds. This way you'll get high-quality raw movie material wich every video production software can stich together.

That's just a proposal of course.

maxim

Topic author
skurfuerst
Posts: 5
Joined: 18.12.2004
With us: 19 years 11 months

Post #5by skurfuerst » 18.12.2004, 20:27

Hi,
yeah that was how i wanted to do it, I just didn't find the right words to describe it maybe :)

Does somebody have some helpful snippets in CEL / CELX? I didn't program anything in cel/x till now, and I would be grateful for any help :)

Thanks,
Sebastian

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 2 months
Location: Germany

Post #6by Harry » 19.12.2004, 22:30

There is one important difference between recording a movie (on Windows) and taking screenshots from a script - when recording a movie, Celestia will slow down (or possibly speed up) such that the speed is correct for the movie (at 25 FPS or similar) - this not only includes simulation time, but the duration of a goto as well.

IOW: if you take screenshots with a script during a goto, the speed of the goto won't change as needed. If your system needs 1s to take a screenshot, you can get only 5 frames for a normal goto. To achieve good results (without modifying Celestia) you have to make a few tests and measure what's the worst case time the system needs for one screenshot, and then slow down everything (including gotos) accordingly - this obviously only works when using a scripted tour, which allows to modify the goto-time. Then take the screenshots at fixed intervals, and the result should be ok, but it's certainly not as easy as recording a video with Celestia on windows.

In some cases it may be less work to modify Celestia such that it advances gotos and simulation time by a fixed amount (e.g. 40 ms for 25 FPS) - it would then behave strangely for interactive use, but should work nicely when taking screenshots from a script.


The command reference for CELX is here: http://celestia.h-schmidt.net/, but you will have to take a look at the Lua Homepage, which has docs about the syntax of Lua (=CELX). You'll find some scripts on that page too, and if you have more specific questions, feel free to ask.

Harald

Topic author
skurfuerst
Posts: 5
Joined: 18.12.2004
With us: 19 years 11 months

Post #7by skurfuerst » 26.12.2004, 13:53

Hi,
thanks for replying :) This looks really good, and I think i have found the basics I need. There is, however, one question I have to solve before starting to play with celx:
Can you do "threads", parts of scripts running at the same time? I would need one "thread" capturing screenshots every time, and I would need one "thread" to control motion, goto, etc. Is this possible to do this at the same time? I didn't find anything in the LUA documentation, if you could point me to the right resources this would be an awesome help :)

Thanks a lot,
Sebastian

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #8by maxim » 26.12.2004, 18:41

I think it would be the cleanest (and probably only) solution to write your own version of the goto command as a lua function, so that you can stop the goto movement and the simulation time while taking a screenshot. This way your screenshots can take any time they need without causing problems.

A goto command should do approximately:
- Calculate number and positions of movement steps from distance and moving time.
- Handle speedup and slowdown a beginning/ending of movement.
- Place the oberservers view to the next movement step and repeat.

maxim

Topic author
skurfuerst
Posts: 5
Joined: 18.12.2004
With us: 19 years 11 months

Post #9by skurfuerst » 26.12.2004, 18:55

Hi,
this sounds really nice, but I guess I am not good enough in 3d coordinates, 3d translation, and stuff like that to write such a function :(

I will try the "Coroutines" in LUA I think...

Thanks for help, if you have any comments, suggestions, ... please share them :)

Sebastian


Return to “Celestia Users”