- Düzenlendi
FFD and memory
Hey Nate, how have you been?
I was wondering how much improvement do the FFD meshes offer compared to using the full image. Considering an image doesn't need to have any 2ndry animation, would it be wise to turn it into a mesh anyway in order to reduce its size (for memory purposes)? I hope the question makes sense. Thanks.
I can't speak about memory, but if you are developing for mobile it's probably a good idea to use meshes to get rid of white space. Fillrate is a big problem on mobile unfortunately. I did some tests with the libgdx PolygonSpriteBatch a long time ago and as soon as images were large enough performance increased dramatically. We're talking 2-300% performance increase.
Best way for you to test it is to take a single image without FFD, parent it to a bone and do an animation on it. Then take the same image and use meshes to get rid of white space and export both animations. Try with different sizes and see how many instances of it you can render while keeping an acceptable framerate.
If you're not developing for mobile fillrate isn't a problem in most cases and you can probably ignore everything I've said
Meshes don't reduce memory usage, the same texture still needs to be in memory. Meshes do reduce the fill rate, as Shiu mentioned. By avoiding drawing blank parts of your image, you can draw that many more pixels per frame. This is usually the first bottleneck on mobile.
Ok, I see. Yea it's for mobile so this information was useful. Thank you.