Wouldn't it be possible to make Celestia read an entire script before running it, and figure out which textures will need to be cached in order for the script to run smoothly, and cache them into memory before actually running the script?
I only mention this because even on fast computers there are halts in the animation for a split second and I assume this is when the texture for the planet or star or whatever gets loaded into video RAM? I often notice the hard drive light blink at times like this and I assume it's because it's loading off the HDD instead of from system RAM. Understandably this may happen when you're just whizzing around looking at random things, but in a script it should all be worked out up front before the script is even run. I realize that there is a limit because of system limitations and whatnot, but it would be nice to see a fast machine with a great video card and gobs of RAM not stutter like that.
Just popped in my head a few seconds ago.
Feature Request: Smart Texture Caching
Re: Feature Request: Smart Texture Caching
Size_Mick wrote:Wouldn't it be possible to make Celestia read an entire script before running it, and figure out which textures will need to be cached in order for the script to run smoothly, and cache them into memory before actually running the script?
This would be possible for CEL-scripts, but not for CELX-scripts.
However both types of script can use preloadtex(ture)-commands to load textures at the beginning at the script, so this is better fixed with the available commands by the script-authors. This won't help with Virtual Textures, which can't be loaded completely, and it misses specular-textures (I don't know why).
Harald
-
Topic authorSize_Mick
- Posts: 60
- Joined: 18.06.2002
- With us: 22 years 5 months
- Location: United States
- Contact:
OK so....
How tough would it be to do this manually for someone like me who doesn't normally mess with the script? I assume I can just put a bunch of these commands in at the beginning of the script after I figure out which textures are going to be viewed. Correct? No complicated learn-everything-else-there-is-to-know-about-scripts stuff?
Re: OK so....
Size_Mick wrote:How tough would it be to do this manually for someone like me who doesn't normally mess with the script? I assume I can just put a bunch of these commands in at the beginning of the script after I figure out which textures are going to be viewed. Correct?
Right, though you didn't write what type of script you were using...
For CEL-scripts, you would use the following to preload Earth's texture:
Code: Select all
preloadtex { object "Earth" }
and for CELX-scripts, you would have to use:
Code: Select all
celestia:find("Earth"):preloadtexture()
Harald
-
Topic authorSize_Mick
- Posts: 60
- Joined: 18.06.2002
- With us: 22 years 5 months
- Location: United States
- Contact:
I would, but...
I don't really even know the difference. By their names, I assume that celx is some newer format that does cooler stuff? Eh, don't bother explaining, I'll look around and figure it out on my own, I know that it's probably one of the easily answered questions if I just look at the documentation.