Preloading textures for entire solarsystem

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Preloading textures for entire solarsystem

Post #1by marc » 15.05.2002, 04:46

I dont know how it is with other peoples systems but mine always jumped when travelling to an object which the texture hasnt been loaded for yet.

I added this method to render.cpp
void Renderer::loadAllTextures(SolarSystem* system)
it recursivly goes through a solarsystem loading the textures for each body with void Renderer::loadTextures(Body* body)

I execute this once when celestia starts up and everytime the observer travels to a new system.

Advantages:
Once loaded travelling around a solarsystem remains smooth. Except when approaching an object with a large *.3ds model (apollo). Any chance of a preloadMesh method Chris?

Disadvantages :
Initial memory usage goes from 16M to 60M.
There is a larger noticable pause when starting and when travelling to a new system with lots of new textures. (the 18 Sco addon for example.)

these changes are in the mostlyharmless cvs tree.

chris,
Ive also created a getMass method for stars. its very similar to your getTemp method and is based of various internet data I found. It is reasonablly accurate for the main sequence stars and severly fudged for the other sequence stars.

billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

Preloading textures for entire solarsystem

Post #2by billybob884 » 03.09.2002, 20:24

marc wrote:Ive also created a getMass method for stars. its very similar to your getTemp method and is based of various internet data I found. It is reasonablly accurate for the main sequence stars and severly fudged for the other sequence stars.


This sounds interesting, what is it?


Mike M. :mrgreen:
Mike M.

TacoTopia!

Topic author
marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 8 months
Location: Outback Australia

Post #3by marc » 04.09.2002, 12:34

That method is now used to complete the gravity effects which is part of my MH hack.
The gravity model is complete for the randomly generated systems but still may need some entries filled out for the sol system in the ssc file. Although the missing entries arent noticeable as the values are relativly small.


Return to “Development”