Feature request: Limitable FPS

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Feature request: Limitable FPS

Post #1by maxim » 29.02.2004, 15:26

In order to keep CPU bandwith for other tasks, I would like to have the posibility to limit Celestias rendering to a certain maximum fps (ideally with the chance to do that from scripts too).

While testing my sun info plugin I've found that (for example) showing a video pane really pushes every system over the limits. There may be other situations when a limited fps-setting could be of good benfit. I think it would be ok, not to store such a setting inside a registry entry, so everything is at max at next startup of Celestia.

maxim :)

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Re: Feature request: Limitable FPS

Post #2by danielj » 07.04.2004, 01:22

I undersrstand that fps is alrealy limitated.I can only go to framerates as high as 61 fps even in nebulas.This happened in Celestia 1.3.1.Before that,in Celestia 1.3.0,I have framerates around 78 fps when I was near a nebula

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

Post #3by maxim » 07.04.2004, 15:53

Yeah, but at least my system always has a cpu usage of 100%.
This breakes down some other applications you might want to run simultaneously. It always depends on how high a thread sets his priority. Celestia is quite agressive here. Only some mp3 player overrun it. Watching a small videopane is almost impossible. Same for some other applications.

What I would like to have are some radiobuttons like in anim8or or a textbox where I can set the fps to, say 25 or 40 - or even better but hard to realize, to 80% system usage.

Alternatively a lowering of the process priority would be an option.

maxim

Guest

Post #4by Guest » 14.05.2004, 18:05

maxim wrote:Alternatively a lowering of the process priority would be an option.

maxim

Why don't you just do exactly this in the Task Manager?

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

Post #5by maxim » 14.05.2004, 19:16

Because it could be difficult for some poeple if a running script tells them: "And now please go to the Task Manager and change the process priority of celestia to ..., if you are running on windows, you can do that by ..., if you are running on linux ..."

You see?

maxim

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 2 months
Location: Pordenone/Italy

Post #6by Paolo » 14.05.2004, 20:58

maxim wrote:Because it could be difficult for some poeple if a running script tells them: "And now please go to the Task Manager and change the process priority of celestia to ..., if you are running on windows, you can do that by ..., if you are running on linux ..."

You see?

maxim


I Agree. Many times this argument was submitted to the forums.
It is in the Feature request list in my website too (named Multitasking).
I think that it should be not very difficult to implement.
A timer on the main draw routine should preserve the CPU usage if the refresh rate is high enough.

- Paolo
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

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

Post #7by maxim » 14.05.2004, 21:18

Why for heavens sake do I write 'poeple'??
My right hand must be faster than my left one. :wink:

maxim

Size_Mick
Posts: 60
Joined: 18.06.2002
With us: 22 years 5 months
Location: United States
Contact:

Info for newbies

Post #8by Size_Mick » 26.05.2004, 19:13

I'm sure that everyone who's commented so far already knows about this, but in case any newbies walk in and read this thread, I'll point something out that anyone using Celestia should know:

Celestia uses the OpenGL API for its 3D acceleration. The performance of Celestia depends not only on the quality of your hardware and of Celestia itself, but also the OpenGL driver version and settings that your system is using.

Two important settings apply here. The first is the vsync feature. Does your card draw each frame in sync with the vertical refresh of your monitor, or does it go out of sync to draw at a higher framerate? Your frames-per-second can be limited if this feature is enabled. It will go no faster than the refresh rate your monitor is running at for a given resolution. In some cases I believe it will actually only go one half of the speed. This feature is included to prevent a visual problem known as "tearing", where the screen gets distortion bands across the picture. This happens when the video card's fps outpaces the monitor's refresh rate and a sort of "oscillation" starts to occur. Depending on your average fps and how it relates to the refresh rate in some strange mathematical way, you can get anything from no tearing to really bad tearing. Reminds me of harmonics somehow.

The second important thing is the refresh rate of your monitor. Is it the optimal (fastest manufacturer-approved) speed for the resolutions you view Celestia in? Many people may be completely unaware that they are even able to change this. Depending on your monitor type, the version of your OS, and the drivers you have installed for your monitor and video card, the refresh rate can range from "just right" to "completely off the mark". For example, in Windows 2000 and XP with an nVidia card, Microsoft has apparently forced nVidia to have all 3D resolutions default to a 60Hz refresh rate. There are refresh rate override features in the newer nVidia drivers to correct this problem, as well as 3rd party applications like http://nvrt.org/. An added side bonus is, if you can get a refresh rate of 85Hz or higher going, you may find the picture more enjoyable and you'll be less prone to getting tired eyes. Be prepared to completely fiddle with your monitor's buttons though, to re-center the screen and stuff.

Note that these depend on Windows having the correct information about your monitor (crucial if your monitor is older and not Plug n' Play), and can possibly cause all sorts of trouble if you by some freak accident have the wrong monitor driver installed. So make sure to go to the manufacturer's website and find the latest driver for your monitor and OS.


Return to “Development”