Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Kelzam

Problem Importing Flats

Recommended Posts

Just imported a bunch of textures and flags into a resource .wad via XWE. The textures work fine, but when I open Doom Builder and go to put one of the flats somewhere, they look like this... well, scrambled, for a lack of a better word (See Below). Anyone have any ideas what might be causing this? I can't seem to get them to show up correctly. They don't look scrambled when viewing them in XWE.

Share this post


Link to post
Xenphire said:

Anyone have any ideas what might be causing this?

Short answer is - they're too large. Flats are 4096 byte raw image lumps, the scrambled flats in that screenshot are the result of Doom Builder interpreting the image header and pallete (which should be stripped away, as per Bloodshedder's post) as part of the raw data, a game engine would do the same. XWE's willingness to display untrimmed flats "correctly" is probably best considered an undocumented feature.

Share this post


Link to post

Slightly off topic.

Heretic has some 4106 byte 64x65 flats; FLTFLWW1-3 and FLTLAVA1-4. HeXen has some 8192 byte 64x128 flats; X_001-011; all its liquid flats.

Does anyone know why Raven made these flats the way they are?

Share this post


Link to post

Heh - there's always an exception to the rule.

I took a close look at a couple of the Heretic flats and found the top and bottom edges are identical, so it's likely they just weren't trimmed to the right dimensions. Those Hexen flats are a match for patches w_241 to w_251 and given that the upper and lower halves are identical (I checked) the patches were probably derived from the flats, which someone must have forgotten to trim to size before committing them to the wad.

Share this post


Link to post

That is a possibililty.

But the engine would have probably had to be modified specially to read these non 64x64 flat's. So I don't think it was simply a case of forgetting to cut them.

Share this post


Link to post

If an experiment I did with the Ultimate Doom IWAD is any guide (replacing some flats with 64x96 stretched versions of themselves) I'd say the game engine only uses what it needs to fill a 64x64 hole, rendering (no pun intended) the excess bytes irrelevant. If the mood strikes I'll repeat the experiment with Hexen but don't expect a different result and for now we'll just have to agree to disagree.

With any luck a lurking source port coder will set us straight.

Share this post


Link to post

I can't comment on vanila behaviour as its been quite a while since I've messed around with it.

Certainly in Doomsday, we will only read as much of the lump as necessary to fill the texture canvas. So, regardless of the size of the lump holding a DOOM flat, only the first 4096 bytes will actually be read (currently we only support 64x64 flats).

However, I recall Risen3D (for example) behaves somewhat differently in this respect.

Share this post


Link to post

Yeah, one thing I noticed with some ports is that if you have a flat in a wad that's larger than 64x64, the excess gets cut off. No errors or anything, but it begins tiling after it draws 64 pixels in either direction. It seems pretty consistent (I tried with ZDaemon, Odamex, and I think PrBoom), so it's possibly the same behavior exhibited by vanilla Doom.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×