Well thanks for the input. As I said I wasn't *100%* sure what the PreCache function was actually caching. For example, in other software I use in my job "PreCaching" only fetches the most expensive bit of data and the rest if read from disk.
In this case I wasn't sure if it was doing something similar or, as Gary said, gets everything - all the mesh, vertex and physics data + materials, etc. My main concern is that pre-caching all those models would takes up system resources even though the models might *not* be needed for that particular map. But as you say, most players systems can spare the memory. A single player model is about 1.4Mb so 32 times that isn't so much. I guess I'm still stuck in the 1980's where all my programs had to fit in 48k of memory. I still obsess over whether and if/else uses less clock cycles than a switch/case construct. :/ Old-fart signing off... On 14 September 2011 20:58, Ryan Sheffer <darksk...@gmail.com> wrote: > Hey Jed > > Model precaching is very important considering the model first exists on the > hard drive, and then it needs to be broken up once loaded. > > The model is loaded (FROM THE HARD DRIVE), all the required data is laid out > in an easy to retrieve manner in memory, the video card memory probably gets > a vertex buffer sent to it plus more. The biggest thing to keep in mind > especially when developing games is to never load from the hard drive at run > time, the bus between the hard drive and your memory is ridiculously slow. > Again, caching is very important mostly in that the model exists on the hard > drive and shouldn't be constantly loaded from the hard drive every time it > is needed. > > Also, the memory usage is insignificant compared to the performance gains. I > hope this somewhat explains why Valve throw up red warnings whenever you > precache something late. > > Ryan > > On Wed, Sep 14, 2011 at 8:02 AM, AndreaZzZ <andrea_s...@mail.ru> wrote: >> >> If there were levels of detail, I think things would be a lot easier. >> >> 2011/9/14 Garry Newman <garrynew...@gmail.com> >>> >>> I stopped models precaching in GMod - and you can get up to a second >>> loading delay when spawning a model - especially ragdolls. >>> So I think it's safe to assume it loads the whole thing, model, physics, >>> materials, textures. >>> >>> garry >>> >>> >>> On Wed, Sep 14, 2011 at 2:57 PM, Jed <j...@wunderboy.org> wrote: >>>> >>>> I've been wondering about model pre-caching lately and what exactly it >>>> achieves. >>>> >>>> I'm noticing that the potential number of player models for our mod is >>>> growing exponentially and along with that there are various play model >>>> attachments which are needed. I could just put them all into an array >>>> and pre-cache them in one go but I keep wondering if that in fact >>>> could have a negative effect? >>>> >>>> "aching" to me implies that the model is loaded into memory and held >>>> there for quick access but in our case while there are say maybe 32 >>>> separate models, only 6 would say ever be used at one time in a single >>>> map. So my thought is that while the caching will stop stutters >>>> waiting for the model to load, will it in fact use more memory as not >>>> all the cached models are being used. >>>> >>>> So does model pre-caching actually store the whole model in RAM or >>>> does is simply let the system know that this model might be needed and >>>> do some sort of preparation for it? >>>> >>>> - Jed >>>> >>>> _______________________________________________ >>>> To unsubscribe, edit your list preferences, or view the list archives, >>>> please visit: >>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>>> >>> >>> >>> _______________________________________________ >>> To unsubscribe, edit your list preferences, or view the list archives, >>> please visit: >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>> >>> >> >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> >> > > > > -- > ~Ryan ( skidz ) > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders