VRAM usage

For questions about using Classic.

Post » Wed Nov 25, 2009 7:22 pm

I'm using particleIllusion 3.0 to create magnificient explosions and fire etc etc and you can easily output them into PNGs or whatever you desire but I have this little problem now. I have explosion with 80 frames it uses lots of colours and alpha channel and in construct it uses 300mb VRAM -.-

Anyone have any ideas how I can reduce the amount of VRAM used? I would make a lot smaller explosions but I have yet to find option to make em smaller in pI 3.0 -.-
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Wed Nov 25, 2009 7:53 pm

Those must be some huge images you have. :P I'd suggest switching to realtime particle effects. They take practically no VRAM and they run at whatever framerate the game is at.

Of course, if you want to keep your prerendered effects, you could always find a batch image resizer to shrink them. But even at 256x256 with 80 frames, you're still looking at around 20MB of VRAM usage, which is alot when you consider that it's only one effect.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Wed Nov 25, 2009 7:54 pm

Okay I managed to make it to 180X180 only and with little reduced look and its 17.56mb now so not too bad though still a little high but after all it only plays it if mech dies.

Linkman

You can't do shit like this with realtime particle effects :P

EDIT
Hmm if the animation is not played and is only in total VRAM does it still consume that amount of VRAM all the time or only if it goes to VRAM Targets?

2 EDIT
After puttin few copies on the layout the total vram didnt luckily change so I might be using these if I can reduce the vram into half from what it is now
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Wed Nov 25, 2009 8:04 pm

Wohoo under 4mb so I'm ok! As long as people have over 250 Vram it should be enough
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Wed Nov 25, 2009 8:08 pm

I'm a beginner with construct but I don't think it has much to do with construct itself - it's the way you're implementing your particle effect. The thing is you're going to have to keep all of those frame images inside your video memory in order for them to be played on demand.

All I can think of is to reduce the size of the image directly like you mentioned, reduce the amount of frames being used, or render your particle effects inside construct. Can't you resize them inside of an image editing program? Even construct's built-in one would work.

Also, I'm pretty sure the amount of colors in the image is really only important in png compression. When the image is inside video memory it's in raw bitmat format. Someone correct me if I'm wrong.

Edit: Nevermind. I'm too slow. lol
B
2
G
3
Posts: 16
Reputation: 882

Post » Thu Nov 26, 2009 1:54 am

[quote:3hf8fy7k]You can't do s**t like this with realtime particle effects :P[/quote:3hf8fy7k]

Sounds like a challenge.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Thu Nov 26, 2009 8:20 am

Yeah I found a way to shrink inside the particle editor so I'm fine just need to make it a little bit less color intense to reduce size a bit perhaps?

Oh and after all it not that big problem as if I use same effect multiple times it only takes the VRAM once I mean if I have 3mb VRAM effect and I put 100 of those effects onscreen its only 3mb still!

Newt
I'll post cap or something if you want to try :P
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Thu Nov 26, 2009 9:55 am

Sure go for it, but I won't limit myself to just particles.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Thu Nov 26, 2009 10:47 am

B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Thu Nov 26, 2009 1:34 pm

Kadoba is right, this is not how hardware-accelerated games are supposed to be designed. You're effectively loading small videos in to a limited VRAM resource. It's much better to have a bunch of single-framed sprites which you move around, scale and angle, with effects, to create explosions. That way is actually smoother (not frame by frame, rendered on the fly), timescales (you can move explosions slowly and smoothly, whereas frames would just go past slower like a slideshow), uses far less VRAM, and is visually more interesting since you can add randomness.

If you do need frame-by-frame animations, try to keep them small in dimensions and as short as possible. You could also try downscaling them all to half size, then stretching them up - you might not see the difference, and save up to 75% of the VRAM.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests