Game Development Community

Calculate Texture Memory Usage

by Steve Acaster · in Torque 3D Professional · 10/02/2009 (5:35 pm) · 22 replies

Back in the TGE/A days a simple relight would bring up info on how much memory you textures were using in a scene.

I was wondering how to get the info in T3D Release, without just counting the dds filesizes. Had a look in metrics but it didn't seem very helpful for this beyond using fps to judge performance.

Any thoughts or esoteric knowledge squirreled away?
Page «Previous 1 2
#1
10/02/2009 (6:06 pm)
Hey Steve.

Do echo( getTextureProfileStats() ) in the console.

I had a metrics( texture ) in the build at one point, but it seems to have gotten lost in the shuffle.

I'll try to get it back for 1.1.
#2
10/02/2009 (6:07 pm)
Cool Tom that would be very awesome to have, thanks for the heads up.
#3
10/02/2009 (6:27 pm)
I'm using 0.75mb of texture memory for my fonts!
Yep, that's indepth info. Cheers.
#4
10/02/2009 (6:45 pm)
ohh, thats a nice one,

TSImposterNormalMapTexProfile 0 0.00
TSImposterDiffuseTexProfile 0 0.00
TerrainLayerTexProfile 1 1.33
RefractTextureProfile 1 2.20
ReflectRenderTargetProfile 3 0.75
PostFxTextureProfile 11 17.17
PostFxTargetProfile 11 48.64
ShadowMapZProfile 3 17.25
ShadowMapProfile 5 26.67
BLProjectedShadowZProfile 0 0.00
BLProjectedShadowProfile 0 0.00
GFXDefaultGUIProfile 18 17.36
GFXGuiCursorProfile 0 0.00
GFXMLTextureProfile 0 0.00
GFXTheoraTextureProfile 0 0.00
GFXDefaultZTargetProfile 1 6.59
GFXSystemMemProfile 0 0.00
GFXDefaultPersistentProfile 64 0.23
GFXDefaultStaticDXT5nmProfile 0 0.00
GFXDefaultStaticNormalMapProfile 41 138.25
GFXDefaultStaticDiffuseProfile 380 617.73
GFXDefaultRenderTargetProfile 4 39.53
GFXFontTextureProfile 11 0.69

a total of 934.39mb!!!

617.73 just in diffuse textures?
thats like waaaaaay to much me thinks, but then nearly all my textures are 2048 X 2048 at 300dpi
#5
10/02/2009 (7:37 pm)
Quote:
nearly all my textures are 2048 X 2048 at 300dpi

O_O

img97.imageshack.us/img97/4592/13816965.jpg
....

#6
10/02/2009 (9:00 pm)
yeah, I know...
#7
10/02/2009 (9:06 pm)
After a soothing cup of tea and a lie down I have regained my composure.

What sort of (I take it you are using dds) filesize is that?
#8
10/02/2009 (9:24 pm)
8.85mb, each

stop laughing!!

I'm getting 60+ fps in that huuuge level of mine, with all effects on, AL, and 56 foilage replictors with 500 reps each, so performance is not an issue, aaand, the level looks stunning!!
#9
10/02/2009 (9:30 pm)
I hope you've got a plan for scaling, not everyone is going to have NASA ask them to run the forthcoming manned Mars Mission from your box!

#10
10/02/2009 (9:37 pm)
yeah, it kinda got out of control.
I'll aim at 1024's for release, but there's a shitload of textures to work through, hell, my terrain textures folder is 800mb alone!!
thats 100 textures just there, then theres the vehicles, characters, objects.....
I'm dying just thinking how long it gonna take.
#11
10/02/2009 (9:50 pm)
2048x2048 is not that bad if you are at the right resolution "72 dpi"

also converting them to DirectX DDS files goes a long way.
#12
10/02/2009 (9:54 pm)
Quote:
yeah, it kinda got out of control.
And the Award for Understatement 2009 goes to ...

I have around 200 textures in my level, but wherever possible I've kept it to x512 and tiled. I've been hacking up meshes to try and reduce lightmap sizes, hence why I originally wanted to know texture memory.

Surprisingly - or maybe thankfully, after all my previous performance worries about instances, and why I started off with one huge DTS-as-whole-level, polysouping 60+ individual objects isn't affecting fps, so I've been sneaking more geometry in.
#13
10/02/2009 (10:13 pm)
You should use DDS... it will easily drop your texture usage to 1/4 the size.
#14
10/02/2009 (10:42 pm)
yeah, I had that in mind.
I've already set up an action in PS to resize to 1024 X 1024, then save out as dds.
I'll probably start running it tomorrow(its 4am now).

@James,
who says 72dpi is the "right" resolution?
I find it to pixelated for high detail, I'll keep the 300 dots per inch.
#15
10/02/2009 (11:16 pm)
72dpi is standard ... for reason that I do not know.

You weren't already using dds!?
#16
10/03/2009 (12:26 am)
dpi is for printing anyway so i have no idea why you guys have focussed on that. your screen doesn't use dots per inch it uses pixels.

so feel free to crank that right upto 2048dpi if you feel like it. your uv maps determine the pixel density in the engine

2048x2048 is equivalent of 4 1024x1024's. realistically you should just smaller textures.so that 800 drops to 200 pretty fast and the conversion to dds should keep that going down to 50. which is why people don't fill games with 2048 textures in uncompressed formats

now if only torque were to use bc7 instead of dxt5.
#17
10/03/2009 (12:48 am)
Quote:your screen doesn't use dots per inch it uses pixels.

Doh! Of course it does!
#18
10/10/2009 (1:26 am)
72 dpi is the density of most displays. Changing the dpi of your display will effect fonts and other printable elements.
#19
10/10/2009 (10:39 am)
Yes, they are correct 72 dpi is used for screens. Question: with all the new monitors out there, is 72 dpi still the standard?
#20
10/10/2009 (11:21 am)
unless you fork out $1500+ for a high end artist / print screen or are on a notebook, yes.
Page «Previous 1 2