Page 1 of 1

Preloading Textures in start.cel

Posted: 20.02.2006, 18:24
by haukew
Hello!
I am using the 64k-Surface-Map of the Earth posted by FightSpit as my default-texture for the Earth. In my start.cel is defined, that the camera shall fly directly to the Earth, which causes lags - obviously because the texture is so big.
How can i preload a virtual texture in a .cel-script? i tried using the absolute path , the path from the celestia-directory and i tried just to give the name of the 2 main png's. Nothing worked, the lag is still there.

Thanks in advance, Hauke

Posted: 20.02.2006, 20:00
by Fightspit
I am not an expert of script but I repeat again this addon need a fast computer because of big textures.
More info here:
http://www.celestiaproject.net/forum/viewtopic.php?t=8895

About your problem I think you should change the distance from earth in start.cel to load only the two textures (tx_0_0 and tx_1_0).
Here the original code:

Code: Select all

 
select {object "Sol/Earth"}
  follow {}
  goto   {time 3.0  distance 6.0}
  wait   {duration 2.0}


Try to change the distance > 6.0 (10 or 15 for exemple but I am not sure, if someone can confirm me ?)
If this method can solve your problem, try to download the 32K or 16k of Earth made by others autors.

Bye!

Posted: 20.02.2006, 20:51
by haukew
Hello!
Thanks for your reply, i think my computer should be fast enough (Athlon3000+, GeForce FX 5900, 512 MB Ram) or isn't it?
The lag isn't too big (about half a second), though it would be great if it happened when the camera isn't moving.
Isn't it even possible to load the textures on celestia startup? a long startup (half a second longer...) is ok for me as long as it doesn't lag ;)
Your solution would only make the camera zoom not-so-far-in-that-the-texture-isnt loaded, right?

My problem is, it lags already when the 1st Earth-texture is loaded, so about 4.000.000 km from earth, so a preload to make it lag half a second when camera isnt moving would be greatly apreaciated... :)

Thanks in advance, Hauke

Re: Preloading Textures in start.cel

Posted: 22.02.2006, 20:41
by Harry
haukew wrote:How can i preload a virtual texture in a .cel-script?

VTs are used to avoid loading a complete texture. So you can't preload it - and you probably wouldn't want to anyway (take a look at the size of the VT on your HD - do you really want Celestia to load the whole thing?).

Harald