Texture Memory
by Scott Doerrfeld · in Technical Issues · 01/31/2007 (8:30 am) · 15 replies
It doesn't necessarily matter the NUMBER of textures I have in a scene, right?
What matters is the total pixel dimension for all the textures...as far as taking up video memory?
What matters is the total pixel dimension for all the textures...as far as taking up video memory?
About the author
#2
01/31/2007 (9:34 am)
What exactly is meant by "lossy jpeg"?
#3
01/31/2007 (9:51 am)
You lose image quality when you convert or save an image as a jpeg, that is what he means by 'lossy jpeg'.
#4
01/31/2007 (10:25 am)
Ok but making a low-quality jpeg hurts the in-game rendering performance?
#5
The only gain from using .jpg is disk space, it will not change rendering speed.
01/31/2007 (10:39 am)
From what i understand of video card hardware, any image, (less the .dds compressed textures) no matter PNG, JPG, anything they get converted into 24 bit or 16bit RAW data before landing in the video card. Some video cards do have build in hardware to compress that data SOME. The only gain from using .jpg is disk space, it will not change rendering speed.
#6
But in most cases you'd not need to use the maxium or no quality adjustment, and I personally can't see any reason to use progressive scan JPG.
But on the note I guess you could use this JPG feature as an nice effect for in game billboards with and rolling script to change the JPG every 15 minutes to make rolling billboards like in Real-Life.
01/31/2007 (11:37 am)
Yes JPG's can save space, depending on the JPG quality (there are 0-10 quality levels and up to 12 in Photoshop, the higher the quality the better the image quality) and progressive (interlacing) scan is another JPG feature, mainly used to transmitted and displayed in a sequence of overlays, with each overlay becoming progressively higher in quality. This feature helps speed up the appearance of your image by sacrificing the initial quality.But in most cases you'd not need to use the maxium or no quality adjustment, and I personally can't see any reason to use progressive scan JPG.
But on the note I guess you could use this JPG feature as an nice effect for in game billboards with and rolling script to change the JPG every 15 minutes to make rolling billboards like in Real-Life.
#7
Does it matter how many textures I have in a scene? Or is it really all about the total pixel dimensions?
01/31/2007 (12:31 pm)
Thanks about the JPG's...am still wondering about my initial question tho:Does it matter how many textures I have in a scene? Or is it really all about the total pixel dimensions?
#8
I myself have tested to see if ONE mesh with MANY textures (high poly mesh we are speaking of here), versus the same mesh with FEW textures actually makes a rendering speed difference. AND yes, it do. But i have NOT tested to see if a large number of different textures (on different mesh) in view effect rendering speed. I think this could be tested using some fxFoliageReplicator.
01/31/2007 (12:44 pm)
As i recall when it comes down to textures on a video card, it is 'state change' how often the video card switch from one texture to another, that slows it down- this happens when you have a single mesh with MANY textures on it. I myself have tested to see if ONE mesh with MANY textures (high poly mesh we are speaking of here), versus the same mesh with FEW textures actually makes a rendering speed difference. AND yes, it do. But i have NOT tested to see if a large number of different textures (on different mesh) in view effect rendering speed. I think this could be tested using some fxFoliageReplicator.
#9
02/08/2007 (10:05 am)
So, on my .dif building, let's say I have 40-50 textures ranging in size from 64 x 64 to 256 x 256. Would it be better to adjust my texturing scheme so I have 20-25 textures ranging in size from 128 x 128 to 512 x 512? (I can combine different patterns into composite files.)
#10
02/08/2007 (10:21 am)
Could I see your building with 50 textures on it? :)
#11
The DIF can have almost as many textures on it as you want. Being each ONE texture needs one fresh brush face to adhere to, there is no state change penalty (its already in a change state for each polygon- but this not done as a poly stream/strip as a DTS). BSP 'DIF' is allot of complex math that is not done on the video card, but the textures are stored on the video card (AGP and up..) so when it comes to DIF, you can have lots of different textures, upto ONE for each poly face, (actually you can blend multi textures on a BSP poly, but not default in Torque)...
02/08/2007 (11:23 am)
Scott, a .DIF is far different then a DTS. One is Binary Space Partition, and CPU calculated, the DIF. The DTS is a hardware brush, most the time the CPU do not need to do much for a DTS ,sure dynamic things like moving, animation, light and shadow are CPU, but not the rules for drawing it, (I am over simplifying it here).The DIF can have almost as many textures on it as you want. Being each ONE texture needs one fresh brush face to adhere to, there is no state change penalty (its already in a change state for each polygon- but this not done as a poly stream/strip as a DTS). BSP 'DIF' is allot of complex math that is not done on the video card, but the textures are stored on the video card (AGP and up..) so when it comes to DIF, you can have lots of different textures, upto ONE for each poly face, (actually you can blend multi textures on a BSP poly, but not default in Torque)...
#12
My framerate in the all-white level was exactly the same. No sh*t. Torque is a poly and texture gobbler.
Mind you, I have a decent machine...but not ultra high end.
02/10/2007 (1:47 am)
I did an experiment with my level, which is super high poly (>100,000 easy) and super high texture (easily 100 textures, many of which are 1024x1024). I removed all the DTS textures and ran the game.My framerate in the all-white level was exactly the same. No sh*t. Torque is a poly and texture gobbler.
Mind you, I have a decent machine...but not ultra high end.
#13
02/16/2007 (8:17 am)
Lee...I am curious to know your system specs and video card.
#14
02/16/2007 (11:14 am)
Ya, must have alot of video ram, 100x(1024x1024x24bit) textures alone take alot of ram.
#15
Perhaps they compressed very well? I've noticed, too, that Torque seems to have a sort of auto-LOD thing with textures. With my new machine (Intell E6600, Nvidia 8800 GTX), I'm loading up on big textures and polys, and Torque is handling it like a champ. I've got even more big textures and they don't seem to make a real difference thus far. CPU seems to be the bottleneck.
In any case...was quite surprised myself at the results. I did the experiment as kind of a poor man's profiling, trying to find where the load was in my game.
02/16/2007 (11:42 am)
The machine I did the experiment on was an Athlon XP 2700 with an Nvidia 7600 GS with 512 megs video ram.Perhaps they compressed very well? I've noticed, too, that Torque seems to have a sort of auto-LOD thing with textures. With my new machine (Intell E6600, Nvidia 8800 GTX), I'm loading up on big textures and polys, and Torque is handling it like a champ. I've got even more big textures and they don't seem to make a real difference thus far. CPU seems to be the bottleneck.
In any case...was quite surprised myself at the results. I did the experiment as kind of a poor man's profiling, trying to find where the load was in my game.
Torque Owner Aaron E
Default Studio Name