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
recording animation with linux/celx
-
Topic authorskurfuerst
- Posts: 5
- Joined: 18.12.2004
- With us: 19 years 11 months
-
Topic authorskurfuerst
- Posts: 5
- Joined: 18.12.2004
- With us: 19 years 11 months
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
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 authorskurfuerst
- Posts: 5
- Joined: 18.12.2004
- With us: 19 years 11 months
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
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 authorskurfuerst
- Posts: 5
- Joined: 18.12.2004
- With us: 19 years 11 months
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
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
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
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 authorskurfuerst
- Posts: 5
- Joined: 18.12.2004
- With us: 19 years 11 months