Page 1 of 1
Using Celestia to view file system in 3D
Posted: 04.07.2004, 22:12
by Guest
Hello all!
I am new to Celestia. I found about it yesterday when looking for some interesting linux software and came across a progy that visualizes files as planets. In its forum someone mentioned that it would be great to use Celestia's engine and I became interested:)
I plan to write a generator that will take a directory listing and create a Celestia script with all necessary planet definitions.
My idea goes along these lines:
- a single file is presented with single planet
- planet volume is proportional with file size
- planet color is based on a file type or extension
- every planet has a link to local html file that contains its properties, preview, ...
- fileplanets orbit around a special planet - current directory
- directoryplanets have special predefined textures
- directoryplanet volume is proportional with cumulative size of all contaned files
- directoryplanets orbit around otherdirectoryplanets
Has anything similar been done yet?
Do you have any suggestion how to use some other Celestia's features?
I don't quite like having big directory planets. Is it posible for planets to revolve around virtual center? In this way a directory would be presented as a solar system without a central star. Can whole solar systems orbit around some other virtual center etc?
Dean Lamper
Posted: 04.07.2004, 23:02
by selden
It sounds like an interesting idea.
I don't think anyone has actually done this.
It'd be nice if the indexing software could be operating-system independant, working for MacOS, Linux and Windows.
Please be careful with your use of terms, however.
I think you mean "catalog files" not "scripts".
Essentially, Celestia's catalog files specify the locations of objects in space, while scripts control the observer's viewpoint in "real time". (This is a slightly misleading simplification, however, since scripts can do a lot more.)
I'm not quite sure what you mean by "big directory planets" in this context. I'd think that moons orbiting moons orbiting moons orbiting planets would be a reasonable representation of nested directories and files. Different surface textures could be used to indicate the differences between files, links, directories, etc.
However, one of the things you can do is eliminate the databse of stars that comes with Celestia (see the file celestia.cfg in your main Celestia directory) and create your own database of stars (filesystems?) using STC catalog files.
I hope these comments help a little.
Posted: 05.07.2004, 08:02
by Guest
Thank you for correting my use of terms.
I'm planning to write it in C and make Linux and Win version. Someone else in the know of MacOS will probably be able to extend it to Mac.
Is Celestia scripting language strong enough to do elegant string parsing?
If this is so I might try to do it as an AddOn /Total conversion:) I'll take a look into this.
My first idea for directory representations (properties of a directory as such) was to use a special planet with size proportional with directory size. On a secod thought I will probably use a constant directory size. Or I may make it as a generation option.
Eliminating existing stars is a must but haven't yet figured out how to do it elegantly. Thank you for pointing me to that cfg file.
Dean Lamper
Posted: 10.07.2004, 20:27
by don
This does sound like a fun idea and I wish you success with it.
Guest wrote:Is Celestia scripting language strong enough to do elegant string parsing?
The new scripting language used in Celestia is Lua (
http://www.lua.org/) and is called celx in Celestia because of it's file name extension (.celx). Check out the Lua site for syntax info on Lua, and Harald's page (
http://www.h-schmidt.net/celestia/) for info on Celestia-specific methods/functions in celx.
In the current releases (non-CVS), Celestia does not allow Lua file system access, but in the next pre-release or final version of 1.3.2, this may be allowed.
Cheers,
Progress report
Posted: 12.07.2004, 12:47
by WarpedOne
I gave a look to Lua but unfortunately it looks a little bit to unfinished regarding FS access. So I went ahead and built a little prototype in pascal.
It generates a single solar system with one star (for C:/), plantes for object directly in C:/... and moons for all objects below them (C:/Windows/...). SCC is ~9MB and holds about 80000 objects (planets and moons).
My Athlon64 3200+ with 1GB, FX5900 128 MB unfortunately is not fast enough to render this in real time. I had to cut the file to about 2MB (20000 objects) to actualy be able to navigate the system.
Are there any tricks I could use to speed up rendering and interaciton?
Posted: 12.07.2004, 17:28
by don
Hi Dean,
Not sure how your or my system relates to other folks, but on one drive alone, mine contains 330,721 files and 24,464 folders (120 GB drive).
Thus, the trick for this kind of program is going to be ... render only what is currently required: current directory, the files and folders contained in it, and everything UP to root. However, I don't know of any way to interactively communicate with the Celestia data files. They are basically read-only files. In other words, when they are changed (ie. adding a directory, deleting a file, etc.) you would need to restart Celestia so it can re-read the files.
Thus, you would probably need to modify Celestia's file access code in order to make it usable for a program like this.
Good luck!
Posted: 12.07.2004, 19:10
by maxim
It may be an idea to use stars (stc-files) for the root level directory. This would reduce rendering overhead for one system. And why not use the constellations for displaying the subdir-stars in the root level - or sub-subdirs? Let your fantasy play...
maxim