general vram question

For questions about using Classic.

Post » Wed Mar 18, 2009 5:49 pm

if I add up the size on disk of every png file I use as a sprite, and I have no effects at all, no canvases, etc. just sprites, is that around how much vram I'll be using, or does it have to convert it at runtime to some other form that takes up more ram. Also, do effects eat up alot of vram? layers? I'm getting ready to move from the experimental phase to creating my first level. Some of the graphical elements will take alot of time to create. I'm planning on having smooth frame by frame animations, and high res textures. Before going through some of the trouble of creating these, I want to have at least a general idea of my limitations
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Mar 18, 2009 7:40 pm

AFAIK you should pad the size of each used image to the nearest power of two. I think Construct does that internally.

Effects should use no VRAM. Canvas probably does though.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Wed Mar 18, 2009 8:26 pm

All of the images are stored uncompressed in VRAM, so they'll end up being much larger than the PNG files.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Wed Mar 18, 2009 11:38 pm

The VRAM expression can tell you how much VRAM is being used. The next build will introduce features that allow you to choose which parts of the application are loaded in to VRAM and when, which will help reduce your usage a lot.

As mentioned, images are fully decompressed (to alpha-red-green-blue format, 4 bytes per pixel) and placed on a texture a size of a power-of-two, eg. 512x512 for a 300x300 image.

Large animations with lots of frames are an extremely inefficient way to use VRAM. You can end up using tens of megabytes from one object. A much faster and more conservative way is to use static images and move them about to create an animation. The end result is actually smoother than you can achieve with frame-by-frame animations, too. If you play with the bone movement, you should see the effects you can get with six unanimated sprites, which would use hardly any VRAM at all. The same goes for explosions and so on: importing a really high resolution explosion animation with loads of frames is a huge waste of memory. With a few fading, moving sprites, a couple of particle effects (which use basically nothing, if you use say a 32x32 particle texture), you can actually create a much more interesting explosion, and it'll use hardly any VRAM at all.

If you're worried about VRAM, change your technique to one which doesn't revolve around basically loading entire video files on the GPU.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Mar 19, 2009 12:29 am

thanks for the info ashley. I may just have to find a more efficient way of doing things. I've got a really killer look going right now though, this is going to take some real innovation to reproduce. I really love construct...it's awesome.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests