Does GPU acceleration matter?

General Moho topics.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

User avatar
synthsin75
Posts: 7177
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Does GPU acceleration matter?

Post by synthsin75 » Sat Aug 06, 2016 6:21 am

Maybe we could set quick render settings for this, and if these don't match final output, Moho reverts to using the original layers during actual export.
RichardU
Posts: 155
Joined: Sun Mar 20, 2011 6:53 pm
Location: Atlanta

Re: Does GPU acceleration matter?

Post by RichardU » Mon Aug 08, 2016 10:27 pm

Dang. So I did the test of The Quick and the Dead earlier in this thread. Now, when I go back to a file that used to play perfectly, it plays at about 2/3 speed. Major disappointment! I don't know if I changed some obscure setting, or what. My system and video card are both high-end, but just loading a simple mp3 file into an empty file, it plays slowly. I've tried everything I can think of: Rebooting, Enable GPU on and off, changing between 24 and 30 fps. Anybody have any ideas?
npcomplete
Posts: 7
Joined: Sun Jun 27, 2010 8:04 am

Re: Does GPU acceleration matter?

Post by npcomplete » Tue Aug 09, 2016 7:03 am

Lost Marble wrote:Your GPU is not used for final rendering, so there's no effect on quality or rendering times as far as that goes.

On the canvas, the GPU works best for images. GPUs are really good at drawing textured triangles, and that's how we draw image layers on the canvas. So if you're doing cutout-style animation or you're using a lot of images in the construction of your characters, you might see a really big boost (both in interactive/playback speed and quality).

For vectors it's more complicated. It's been difficult for the GPU vendors to settle on a vector graphics API. There's OpenVG (https://www.khronos.org/openvg/), but it doesn't seem to have really gained a lot of traction. Nvidia has its own API for certain cards, but I'm not that enthusiastic about supporting an API that only works on Windows and only for certain cards from a certain manufacturer.

So what Moho does for vector graphics is that we need to chop up vector elements into tiny triangles - the GPU likes triangles. But that chopping-up process is a good amount of work by itself, so some of the performance gain of GPU drawing is lost in the chopping process. Some of the GPU vector APIs I've looked at are not really geared towards animation - for example, if you only need to chop up a vector shape once, then you can draw the triangles very quickly from there on out. But we're animating here so vector shapes change all the time, requiring constant re-chopping.

Anyway, it gets complicated with vectors, but where the GPU is a clear win is when you're working with image-based graphics.
While I did some OpenGL a while back, this is all beyond my expertise but I'm assuming you're using the graphics rendering pipeline (geometry/lighting/rasterization)? What if you used custom shader programming (CUDA/OpenCL/HLSL/GLSL) for the vector based rendering so you don't have to use the geometry engine?
Post Reply