0 Favourites

[SOLVED]Sprites and VRAM

This forum is currently in read-only mode.
  • 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.

  • 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.

  • 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?

  • 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.

  • now i am rich with knowledge! :D

    btw your avatar is hiper cute. from where it is? do you know the movie name?

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • It's from Nichijou. The world would be a better place if everybody watched it.

  • well the pool of people who seen it will soon increse by one =)

    thx!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)