spritesheet optimize

Discussion and feedback on Construct 2

Post » Tue Jun 16, 2015 1:43 pm

this touches a bit on the fact that there are two groups that want to use c2
devs with years of experience want the "expert functionality" and really push things however they can,
for me using a certain method that i know there are better solutions, is pretty frustrating for me,
thats also what pushes technology forward i think...

and also devs who just got started with c2 and are happy with "easy default" solution, wich is great,
until they want more from the engine and there app/games
ImageImage
B
69
S
21
G
7
Posts: 827
Reputation: 10,017

Post » Tue Jun 16, 2015 2:18 pm

"animation can be just one frame too big and take up an entire sheet,"

This should not happen. If you have a sprite with 5 animations. Each frame is 126x126 px. Then it will make two images after export - 1 sprite sheet 256x256 with 4 frames and 1 image 126x126 with last 5th frame.
ImageImageImageImage
B
157
S
64
G
41
Posts: 2,590
Reputation: 34,640

Post » Tue Jun 16, 2015 2:57 pm

@shinkan , i have many occations where i export and find sheets with lots of empty space (more then halve of the texturespace), granted, if you then start figuring out how much each should take to optimal fit , also not everything is is square sized... i check if i find some examples
ImageImage
B
69
S
21
G
7
Posts: 827
Reputation: 10,017

Post » Tue Jun 16, 2015 3:11 pm

@shinkan

Image
ImageImage
B
69
S
21
G
7
Posts: 827
Reputation: 10,017

Post » Tue Jun 16, 2015 4:05 pm

can i have a sprite bank where different instance can use it?
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Tue Jun 16, 2015 5:56 pm

vtrix wrote:@shinkan

Image


That depends entirely on texture size you have for each frame.

Each frame on spritesheet have 1px border around to prevent pixel bleeding.
Each frame of animation also should have 1px empty border around for antialiasing.

So when you have 5 frames animation and each frame is 64x64 then after exporting you will get a 256x256 file with a lot of empty space.

But if you make frames 62x62 then after export you will get 2 files: one 128x128 with 4 frames and one 62x62 with 5th frame.

And if you want your sprite to have nice and smooth edges, you need to add 1px empty border around your sprite. Which will make your actual texture 60x60 (while frame is 62x62)

If you learn how to use it properly then C2 actually is quite good with making the sprite sheets out of the textures on export. Just need to remember about some things while making your textures.

Like this green things on your first image. If they were 254x126 and be only 10 of them then you could fit 8 frames on one 512x512 and remaining 2 frames on 256x256 - no space wasted.

That's how C2 works. And all you can do is to accept it :D

64size.capx
62size.capx
ImageImageImageImage
B
157
S
64
G
41
Posts: 2,590
Reputation: 34,640

Post » Tue Jun 16, 2015 9:12 pm

@shinkan accepting is not my strong suit, i rather bit*h about it (once in a while)
its not like i expected it to change
ImageImage
B
69
S
21
G
7
Posts: 827
Reputation: 10,017

Post » Tue Jun 16, 2015 9:30 pm

I'm quite alright with that :D

This rather will never change in C2... But I must say I like this kind of system, working per frame not per sheet. It makes placing image points really quick. You can make all your frames at certain size, import them, put your image point when you want and "apply to whole animation" and crop your frames.
It's not that easy when you importing entire sprite sheet and have to manually "cut out" every part of the texture to be used as a frame.
But with custom sprite sheets you can pack more images on one texture...

Both methods have their pros and cons...

That's the part i hate the most in UE4. You can press a button and all images will be automatically cut out... but then they all will have different sizes and placing image points on them after that is incredibly painful... Almost as using Image editor in C2 to copy/paste animations and animation frames xD
ImageImageImageImage
B
157
S
64
G
41
Posts: 2,590
Reputation: 34,640

Post » Tue Jun 16, 2015 10:12 pm

well i think i have seen a system that automaticaly remembers and offset your image point placement, even when using the full spritesheetsytem, was it in unity or texturepacker i dont know, but i think there are systems in place for that,

do you work alot with ue4, i've been looking in it, checking out there scripting methods
ImageImage
B
69
S
21
G
7
Posts: 827
Reputation: 10,017

Post » Tue Jun 16, 2015 10:16 pm

Not a lot. Only occasionally when "job" require something more than C2 can handle.
ImageImageImageImage
B
157
S
64
G
41
Posts: 2,590
Reputation: 34,640

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests