Howdy,
I was interested to find out, does anyone know how the "cel" engine works for getting from something so large (a galaxy as a whole, for example), all the way down to something like a single rock so smoothly, etc? I tried picking through the source code, but at this stage in the game, it is a bit too complex for me to know exactly what the programmers where trying to do... If anyone could explain to me the algorithm/theory/whatever on how it works, that would be cool.
Thanx in advance,
--Me
How'de they do that?
-
Topic authorShortTermParking
- Posts: 4
- Joined: 22.01.2003
- With us: 21 years 10 months
How'de they do that?
It's a shame entire families can be torn apart by something as simple as wild dogs...
The key is to represent the position of the camera (viewer's eye) in a custom co-ordinate system that uses VERY high precision numbers (I think in the Celestia source code they are called "BigFix"). This allows the camera to be positioned accurately anywhere within the known Universe with high accuracy (I forget how accurate, but it's easy to calculate of you know the size of a BigFix integer).
Then, all renderable objects are kept in their own co-ordinate space, each of which has a scale independent of each other, but the important thing is that the camera's BigFix co-ordinates can be converted into each local co-ordinate space to render each particular model.
This sort of separate-spaces trick is used a lot in computer games when they want to have things that are basically very far away, like a sun-glare or a sky backdrop. Then again, some games do it the dumb way...
Cheers,
Paul
Then, all renderable objects are kept in their own co-ordinate space, each of which has a scale independent of each other, but the important thing is that the camera's BigFix co-ordinates can be converted into each local co-ordinate space to render each particular model.
This sort of separate-spaces trick is used a lot in computer games when they want to have things that are basically very far away, like a sun-glare or a sky backdrop. Then again, some games do it the dumb way...
Cheers,
Paul