Is an initial loading bar possible?

nyxojaele

01-03-2006 04:42:09

I was wondering if it's possible to include the worldGeometry loading into a loadingbar, with PLSM2.

Normally, I'd think to do this with linkWorldGeometryToResourceGroup, but PLSM2 likes to assert when it doesn't have any geometry to play with when it comes time to render...

My 2nd thought was to use a different SceneManager to render the loading bar while I use linkWorldGeometryToResourceGroup to load tho worldGeometry, but I -think- the worldGeometry is connected to the current SceneManager, which would make me trying to load the PLSM2 geometry into my loadingbar SceneManager.

Just trying to find a way to avoid having the world "grow" around the camera right at the start, but not have a long pause with nothing happening on screen while things load (ie. I want a loading bar...)

tuan kuranes

01-03-2006 08:24:42

If you have listener on page load, then each page listener event just update your count and you update the loading bar. (you can go into details an use all event preload, load.)

All you have to know the number of page terrain that is supposed loads a start.

nyxojaele

14-03-2006 04:48:18

Time to dig up an old thread! I'm revisiting this subject to put more detail into my loading bar, and so I have a couple questions:

1) Where might I find details about exactly -when- all these different events get called (and what they mean has been done, and has yet to be done...)?

2) Is there a way to auto-detect how many pages are supposed to be loaded off the start? As the inital placement of the camera at loadtime is my program is a little arbitrary, I can't really just hardcode a value in anymore... I was thinking maybe there might be a way to ask PLSM2 how many pages are queued for loading, or something...? (I know the internals of PLSM2 about as well as my own body's internals...)

tuan kuranes

14-03-2006 15:32:14

1) Look in demo for the terrainListener.h
2) You set the page and tile to be loaded in the config file. (maxpreloadedpage, maxadjacentpage, maxtile... etc... by default value when not specified are in template config files.)

nyxojaele

15-03-2006 00:58:02

1) Thanks for the pointer, but that appears to only show thru example how to use the events. I've fully discovered that (actually, thru this very file!), but I'm not 100% sure on under what exact conditions they are called. I mean, I know that PagePreload is called sometime before PageLoad, but how much before? What gets done in between? (ie. why should I be concerned about the difference between preload and load?) I'm finding no verbose descriptions on these events, so I'm just working on wild guesses as to when these are being called, and what I can expect that PLSM2 has done/has yet to do during any of these calls.

2) I don't fully understand those settings, although I've seen them around.. What is a preloadedpage compared to a loadedpage? this probably ties in with my first question..

tuan kuranes

15-03-2006 08:37:41

1) count pageload event, when pageload count == MaxAdjacentPages you're done.

2)
-Preload is when heighmap is loaded.
- Loaded is when page is textured and loaded in GPU.

nyxojaele

15-03-2006 13:36:45

Hmm. I think I understand-- at least, enough to do what I was trying to do. Thanks for the help!

tuan kuranes

15-03-2006 13:46:43

latest CVS and SDK (this morning) has a getOption("MaxAdjacentPages", uint *num)

ruichaves

30-07-2007 17:14:49

how can i do a progress bar while loading terrain??

Cause when i call addLoadTileListener the camera shows the terrain loading and rendering...

fooguru

21-09-2007 10:33:59

I'm also interested to know how you render a second scene manager while PLSM is loading in the background.