Texture Atlas images not filling up - unexpected behaviour

Discussion and feedback on Construct 2

Post » Thu Aug 28, 2014 5:52 am

Hi evryone,
I have a project containing many 2-squared sized images like 128x128 and 256 by 256, all of them same type like png32.

On export C2 creates 512x512 or 1024x1024 texture atlases but leaves complete rows empty. Instead adds another atlas image, also more than half empty!
I really though and still think that a 1024x1024 should be filled completely with 4x4 images of size 256x256, but it just won't do it.

Is this a bug? Or does anyone knows the reason for this? It's wasting my memory. And I want to fix it because of mobile performance issues.
Any hint is appreciated. Thanks.
B
9
S
2
Posts: 12
Reputation: 1,125

Post » Thu Aug 28, 2014 11:06 am

Create a dummy project that shows the issue, and post it to bugs.
Keep in mind that if there aren't enough textures to fill the atlus it may leave some empty.
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216

Post » Thu Aug 28, 2014 11:30 am

Marsmanmig wrote:Hi evryone,
I have a project containing many 2-squared sized images like 128x128 and 256 by 256, all of them same type like png32.

On export C2 creates 512x512 or 1024x1024 texture atlases but leaves complete rows empty. Instead adds another atlas image, also more than half empty!
I really though and still think that a 1024x1024 should be filled completely with 4x4 images of size 256x256, but it just won't do it.

Is this a bug? Or does anyone knows the reason for this? It's wasting my memory. And I want to fix it because of mobile performance issues.
Any hint is appreciated. Thanks.


Tiled backgrounds are not combined together (maybe to avoid seams), and only pictures belonging to one sprite are spritesheeted together, also sprites have a 1 pixel added around them during spritesheeting to avoid seams.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Thu Aug 28, 2014 2:54 pm

Thanks for the replies... they cleared it up things a bit for me.

It's obviously the one pixel added around sprites which makes things different than I expected. Of course 4 x 258 will not fit in a 1024.
I suggest there could be an option to turn off the pixelborder on a per image/sprite basis.

The other thing is that images from one single animation will not be separated into two (or more) eg 256 x 256 smaller spritesheets but instead be joined into a larger one (eg 1024 x 1024), even if obviously leaving empty half (or more) of this quite large spritesheet.

For know I think I can work around it even not with perfect results. And I know texture atlases are a complex issue. Some manual tweaking options would be great. Hope there will be something in C2 in the future :-)

Cheers!
B
9
S
2
Posts: 12
Reputation: 1,125


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests