Multithreading? Loading models as we approach from far away.

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
scratt
Posts: 36
Joined: 05.12.2005
With us: 18 years 11 months
Location: Thailand

Multithreading? Loading models as we approach from far away.

Post #1by scratt » 08.12.2005, 04:35

I was wondering if anyone had looked at any sort of multi-threading so that complex objects such as spacecraft and VT planet terrains can be loaded in parallel with the main program, so that as you approach them there is not a pause or delay for them to load etc..

I am looking at doing this myself, and if anyone is interested I'll pass on what I have done.. But wanted to check if there was already work ongoing for this and save us all some time..

Cheers,
scratt
Extreme Sports Cafe - Remember, measure life by the moments that take your breath away, not by how many breaths you take...

buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 2 months
Location: Massachusetts, USA

Post #2by buggs_moran » 08.12.2005, 23:23

I know you can preload textures in a cel script. That would limit preloads to your predetermined flighpath. Search for preload in the forum, there is a Voyager cel script example you can follow. The problem is that travel is very fast in Celestia. How would it know what textures to preload if you were just flying about through the galaxy?
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M

Topic author
scratt
Posts: 36
Joined: 05.12.2005
With us: 18 years 11 months
Location: Thailand

Post #3by scratt » 09.12.2005, 10:26

Thanks.. I'll check it out..

Basically I am talking about travelling inside planetary systems at reasonable speeds (whatever they are!).. Let's suppose we are coming up on Mars and their are a couple of satellites in orbit.. Once we are inside a specific range (perhaps a little before the satellites look like more than a pixel or two) we start loading the models...

It would mean, hopefully, that you don't suddenly have a massive satellite right infront of you as it pops on the screen..
Extreme Sports Cafe - Remember, measure life by the moments that take your breath away, not by how many breaths you take...

buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 2 months
Location: Massachusetts, USA

Post #4by buggs_moran » 10.12.2005, 22:51

Noticed an interesting thing with the colsole window open (hit ~). Textures do load upon acieving a certain "distance". I assume that is based on an apparent diameter? Is there any way to increase that? It would fix you interplanetary travel if everything preloaded for your solar system (of course it would hit your RAM pretty hard)... How about this. When a user selects a new destination with ENTER. The textures are preloaded and THEN leaves for the destination.
Homebrew:

WinXP Pro SP2

Asus A7N8X-E Deluxe

AMD Athlon XP 3000/333 2.16 GHz

1 GB Crucial RAM

80 GB WD SATA drive

ATI AIW 9600XT 128M


Return to “Development”