best way to store sky background
Posted: 24.02.2008, 22:20
I'm building an open source specialized 3D ray tracer to explore relativistic phenomena (general relativity, not special). The end result may look superficially similar to Celestia, but may be quite different "under the hood". The program will be a simulator - the images will be physically realistic and accurate. I'm in the initial phase - planning.
The ray tracer needs to be able to render images up to HD (1080p) resolution. Maybe beyond that too. It needs to be as fast as possible, ideally real time NTSC/PAL frame rates for most resolutions on good hardware (PS3, high performance PC).
Because of that, I need to pre-render as a bitmap the whole sky background, which looks quite similar to Celestia - mostly black, with some stars. The resolution of the pre-rendered sky needs to be higher than the resolution of the screen, of course.
So that's my dilemma - due to the extremely high resolution, I cannot simply store the whole sky in a regular matrix, or I'll need many GB of RAM. (or I may use 8bit graphics for the sky and still end up with 100MB of live data in RAM - which is suboptimal in more than one way)
One way around that would be something like a sparse matrix. But that too has its issues (the suitesparse library, for example, is not good for random access, according to its author).
How does Celestia store / represent the sky background? Is it rendered dynamically, or pre-rendered and stored as bitmap? Or something else?
Is Celestia essentially a ray tracer, or not? What's the Celestia 3D engine like?
(I guess I could spend some time reading the source myself, but time is the least abundant resource that I have, so I would very much appreciate just a few words of clarification.)
Any comments are welcome.
Thank you!
The ray tracer needs to be able to render images up to HD (1080p) resolution. Maybe beyond that too. It needs to be as fast as possible, ideally real time NTSC/PAL frame rates for most resolutions on good hardware (PS3, high performance PC).
Because of that, I need to pre-render as a bitmap the whole sky background, which looks quite similar to Celestia - mostly black, with some stars. The resolution of the pre-rendered sky needs to be higher than the resolution of the screen, of course.
So that's my dilemma - due to the extremely high resolution, I cannot simply store the whole sky in a regular matrix, or I'll need many GB of RAM. (or I may use 8bit graphics for the sky and still end up with 100MB of live data in RAM - which is suboptimal in more than one way)
One way around that would be something like a sparse matrix. But that too has its issues (the suitesparse library, for example, is not good for random access, according to its author).
How does Celestia store / represent the sky background? Is it rendered dynamically, or pre-rendered and stored as bitmap? Or something else?
Is Celestia essentially a ray tracer, or not? What's the Celestia 3D engine like?
(I guess I could spend some time reading the source myself, but time is the least abundant resource that I have, so I would very much appreciate just a few words of clarification.)
Any comments are welcome.
Thank you!