Non-power-of-two Flats?

Status
Not open for further replies.
Is it in any way possible to have Flats that are not powers of two? I have made a texture that is 48x48 for a map I plan on making, and I can't really resize it, since 32x32 is way too small, and 64x64 is way too big.

Slade won't convert a 48x48 picture to a Doom Flat (which I assume to be a technical limitation of Doom, not Slade), and Sonic Robo Blast 2 bugs out if I try to use a composite texture for a Flat.
 
I it is a technical limitation of SRB2 itself, because according to the wiki:
Flats can only have a few specific sizes. In the original Doom engine, only square flats with 4096 bytes (a 64×64-pixel image) were permitted. As such, many WAD editors only support flats of this size and cannot import bigger or smaller images. SRB2, however, supports flat sizes ranging from 32×32 to 2048×2048, but the flats must still be square, and their dimensions must still be powers of 2.
 
I know, and I have checked the Wiki and such, but I just wanted to make completely sure there isn't any way at all I can use my 48x48 texture (except having four 64x64 Flats of my texture, offset by 16 pixels in each direction, and then having to make a grid of everywhere I'll use the texture to switch between the offsets on the texture).

Edit: Actually, I also made this thread in case of hopeful work-arounds that would allow me to use my 48x48 texture (even if I have to tile the image many times), without having to do that "grid" thing I mentioned above.
 
Last edited:
Nope, SRB2 itself allows only the specific flat sizes listed on the wiki... or rather, their lump sizes in bytes, at least.
 
The reason flats have to be square powers of 2 is because of the way the game uses them. There's a lot of bit-shifting and other things involved in the software visplane renderer which obviously only works with powers of 2, and altering it to allow for arbitrary sizes would be a lot more complicated and slower. If you want to use a 48x48 graphic, you could probably get away with it by tiling it to something like 240x240 (filling the blank space with whatever), and then make judicious use of sector splitting and flat alignment to make it look right.
 
The reason flats have to be square powers of 2 is because of the way the game uses them. There's a lot of bit-shifting and other things involved in the software visplane renderer which obviously only works with powers of 2, and altering it to allow for arbitrary sizes would be a lot more complicated and slower. If you want to use a 48x48 graphic, you could probably get away with it by tiling it to something like 240x240 (filling the blank space with whatever), and then make judicious use of sector splitting and flat alignment to make it look right.
Well, if there really is no way to avoid "grid"-ifying the floor for it (except just using 32x32 or 64x64 and scaling all objects by an amount)... Alright. Thanks for helping.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top