Textures

New releases and general discussions.

Post » Sat Jan 16, 2010 12:50 pm

From what I understand, each image loaded is converted to the next power of two texture (128, 256, 512). But If I have an object with very different proportions between height widt, it is a waste of memory. Would be nice to have an option to share textures or sprites between different object but assigning differents pieces-areas, mapping. So, this way we can optimice memory, for eve animation, where a character deals different sizes of area-pixels. I think it is a need for a texture palette or linker too.
B
30
S
15
G
10
Posts: 285
Reputation: 7,144

Post » Sat Jan 16, 2010 1:12 pm

They don't have to be square, just power of 2

eg:

256x256
64x128
8x8
16x512
etc. etc.

Or are you wanting to slice them up? Or are you wanting none power of 2 textures (really bad idea). I don't really understand what you're asking. :\
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Jan 16, 2010 1:18 pm

[quote="Lost my Keys":2tsxu7nd]They don't have to be square[/quote:2tsxu7nd]

I'm pretty sure they do. If you don't want to waste space, that is.

[quote="Aritz":2tsxu7nd]Would be nice to have an option to share textures or sprites between different object but assigning differents pieces-areas, mapping.[/quote:2tsxu7nd]

As far as I know graphics cards just don't work that way. Sure, some can handle non-power-of-two textures just fine, but some just plain don't. It's not a Construct issue at all.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Jan 16, 2010 1:32 pm

[quote="deadeye":3vkeb9ky][quote="Lost my Keys":3vkeb9ky]They don't have to be square[/quote:3vkeb9ky]

I'm pretty sure they do. If you don't want to waste space, that is.
[/quote:3vkeb9ky]

Nope, it's fine, but both the width and height do have to be pow2. If square textures were forced, then a long thin strip image would waste tons of space in a square but far far less when non-square. OpenGL and Direct3D have no problem with non-square textures.

Just did a quick test in construct

128x512 tiled background = 0.25mb VRAM
512x512 tiled background = 1.00mb VRAM

So works fine in construct too. So if that was what he was looking for, he should be ok with that.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Jan 16, 2010 3:20 pm

I think a lot of modern graphics cards support power-of-two on either axis, like 128x32. Some old or cheap ones might not though, in which case you'd waste memory with a square surface. But it's an extremely complicated optimisation to make at this stage - if we did it, it'd wait until Construct 2.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sat Jan 16, 2010 8:03 pm

I think that all year 03+ GPU support it or probably most older ones as cheap ones are usually made from high end by just removing few shaders etc. etc. and I think that most intergrated solutions support it too and if you can run D9 and some games with it I'm 99% sure that 128x32 work perfect
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Sun Jan 17, 2010 1:02 am

[quote="Lost my Keys":31w6ztsp]
128x512 tiled background = 0.25mb VRAM
512x512 tiled background = 1.00mb VRAM
[/quote:31w6ztsp]
It's nice to know this for sure
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests