1 registered members (TipmyPip),
18,484
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Memory Management - Video Memory, Purging Enti
[Re: slacker]
#74930
05/21/06 01:03
05/21/06 01:03
|
Joined: Aug 2001
Posts: 2,320 Alberta, Canada
William
Expert
|
Expert
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
|
Quote:
When a model leaves the clip distance, is it still loaded in memory? Would you need to purge it to free that memory again?
Yes, and yes.
Quote:
If a model is reduced in polycount at a certain LOD distance, is the older higher count model purged?
I would think not, however I may be wrong. Mipmaps and distance textures are generally there not to free texture memory, but just make things look better.
Quote:
What is the relationship? Is there a limit to the number of textures you can use, and if so how is this determined. If a texture associated with a model is purged, are all of these resouces available again?
Video memory is what your textures use up. So let's say for an instance, your level is made out of high res textures. If you consume too much video memory, then your computer will end up using it's system memory. If it does this, then everything will become very slow. I believe the system memory is called "virtual memory" in your pc.
This is why video cards as time has gone on, increased there memory(8MB, 32MB, 64MB, 128MB, 256MB, 512MB). Since games need more memory as time goes on due to not only high res textures, but all the textures invovled with shaders too. Normal map textures are particularily notorious for this, since they tend to be higher res to keep the detail.
If you find that your going over your memory limit, and need to keep the same textures, you can purge entities or bmaps to free up memory. I'm going to explain how purging works in A6 now...
When you load an entity into A6 for the very first time, you'll notice a bit of a stutter or delay before it's loaded. This is partly due to it allocating its memory. Now, even if you delete this entity, it will still be using up texture memory. It will not be purged until you purge it, clipping ect. will not purge it. The reason for this is that let's say your in a fast paced action game, and every model you delete you purge upon doing so. Now everytime you load this model up again, there will be a delay. Such as a rapid fire laser weapon and the such.
So what i'm saying is, in the case of models, purge only when your very sure you won't be needing this model again anytime soon. It's also a good idea to load up all your models into the texture memory before you even need them. That way you wont have to deal with the delay.
In the case of bmaps, such as panels. It's a good idea to purge all the panels that you don't need anymore. For example, if you load up a menu screen, when you get rid of it purge the bmaps. I noticed that panels can consume a fair amount of texture memory, no need having them consume this memory in-game when you dont need them for a while.
I should note that the information above is just what i've gathered through the years. I could be getting a couple things wrong here, but hopefully it'll help clear up a few things for you. 
btw - A6 supports dds textures now. It would be a good idea to develop your game using these, as there are many choices within dds to really save texture memory.
|
|
|
Entire Thread
|
Memory Management - Video Memory, Purging Entities
|
slacker
|
05/20/06 16:38
|
Re: Memory Management - Video Memory, Purging Enti
|
William
|
05/21/06 01:03
|
Re: Memory Management - Video Memory, Purging Enti
|
ulillillia
|
05/21/06 18:50
|
Re: Memory Management - Video Memory, Purging Enti
|
Thomas_Nitschke
|
05/21/06 19:02
|
Re: Memory Management - Video Memory, Purging Enti
|
LordRathan
|
05/21/06 19:20
|
Re: Memory Management - Video Memory, Purging Enti
|
slacker
|
05/22/06 22:55
|
Re: Memory Management - Video Memory, Purging Enti
|
ulillillia
|
05/22/06 23:23
|
Re: Memory Management - Video Memory, Purging Enti
|
slacker
|
05/23/06 20:10
|
Re: Memory Management - Video Memory, Purging Enti
|
ulillillia
|
05/23/06 20:33
|
Re: Memory Management - Video Memory, Purging Enti
|
slacker
|
05/24/06 17:25
|
Re: Memory Management - Video Memory, Purging Enti
|
mk_1
|
05/24/06 19:16
|
|
|