[SOLVED]Sprites and VRAM

For questions about using Classic.

Post » Tue Jul 05, 2011 9:39 pm

Do anybody knows how exactly images resolution and size are translated into VRAM usage?
After finishing the v0.02 of GrindSpace i started wondering how big my levels can be. Or how much and what size sprites i can use without chocking players PC to death.
Anybody knows the formula? what about images with "empty", transparent parts?

I am asking before ill make all that high res sprites just to discover i need to downgrade them or limit the layout size and start to cut edges.

I need to figure out how much VRAM i can afford, and how to minimalize its usage. Beside the obvious aka pow^2 tex's and reusable assets.The_Funny_Guy2011-07-05 22:47:07
B
16
S
5
G
4
Posts: 211
Reputation: 3,767

Post » Tue Jul 05, 2011 10:20 pm

To figure out how much VRAM an image will use, you multiply the width and height together, multiply that by 4 to get bytes, then divide that by 1024 to get kilobytes. So a 32 x 32 image would be:

(32 * 32 * 4) / 1024 = 4KB

Transparency doesn't matter when considering VRAM, as the images are stored uncompressed.

Also keep in mind that most video cards will store the image in a texture that is rounded up to the nearest power of 2 size, so for example, a sprite that is 280 x 280 pixels would be stored in a texture that is 512 x 512, taking up a much larger amount of VRAM.
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Tue Jul 05, 2011 10:30 pm

thank you kindly linkman! this was exactly what i wanted to know

One last question... as i am new to all this.
How much VRAM usage is consider these days... high?
is VRAM the amount of RAM the graphic card has?
SO for e.g if my Radeon has 1024RAM thats its limits for VRAM?
B
16
S
5
G
4
Posts: 211
Reputation: 3,767

Post » Tue Jul 05, 2011 10:43 pm

That's correct.

As for what's high, 1024MB is definitely a sizable amount. It would probably be wise to keep VRAM usage under 256MB if you're targeting a large amount of computers.

Many lower end graphics chips, especially those by Intel, don't have dedicated VRAM, and instead share the main system RAM. This generally reduce the amount you have available for graphics, and even if there is a large amount available, it's still much slower than dedicated VRAM.

Just a heads up.
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Tue Jul 05, 2011 10:46 pm

now i am rich with knowledge! :D
btw your avatar is hiper cute. from where it is? do you know the movie name?
B
16
S
5
G
4
Posts: 211
Reputation: 3,767

Post » Tue Jul 05, 2011 10:50 pm

It's from Nichijou. The world would be a better place if everybody watched it.linkman20042011-07-05 22:51:45
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Tue Jul 05, 2011 10:59 pm

well the pool of people who seen it will soon increse by one =)
thx!
B
16
S
5
G
4
Posts: 211
Reputation: 3,767


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests