Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
zark

ZDoom Slopes/Big Floor Textures

Recommended Posts

I was wondering, is it possible to use big (256x128) floor textures in ZDoom without splitting it up into lots of 64x64 bitties? The reason I need to do this is, I'm trying to make good looking sloping cliffs and I need bigger textures than the standard 64x64 ones to make it detailed. Can anyone help?

Share this post


Link to post

I would image you can use a high-res flat and then scale it using Sector_SetFloorScale so it fits the area you require. I plan to do this myself as soon as I get around to figuring out how to put high-res textures into wads. I don't know what the size limit is on high-res flats though.

Share this post


Link to post

Haven't tried any of this, but here's the (limited) info from Randy's change log:

June 25, 2002
- Made the C versions of the plane drawers work with non-64x64 flats.
- Added automatic scaling of 128x128 and 256x256 flats so that they get
treated as if they were only 64x64 world units in size. Also added support
for 8x8, 16x16, and 32x32 flats, which are not automatically scaled larger
to fit a 64x64 cell.

June 19, 2002
- Added support for 128x128 and 256x256 flats on slopes.

June 14, 2002
- Added support for 128x128 and 256x256 flats on normal planes.

Share this post


Link to post
Enjay said:

Haven't tried any of this, but here's the (limited) info from Randy's change log:

blah


You think there would be much of a chance of Randy replying if I emailed him about it? :)

Share this post


Link to post
ZarcyB said:

You think there would be much of a chance of Randy replying if I emailed him about it?

Yes. In the past I have emailed Randy about some ZDooM-related questions and he's replied. In any case, you have nothing to lose.

Share this post


Link to post
ZarcyB said:

I was wondering, is it possible to use big (256x128) floor textures in ZDoom without splitting it up into lots of 64x64 bitties? The reason I need to do this is, I'm trying to make good looking sloping cliffs and I need bigger textures than the standard 64x64 ones to make it detailed. Can anyone help?


Flats have to be square. The reason for this is ZDoom extrapolates the size of the flat from the length of the lump. A normal flat is 4096 bytes long, which is 64*64. Rectangular flats just wouldn't work well at all.

I suppose you could make a 256*128 flat and just tile it twice yourself to make it 256*256...

Share this post


Link to post

You can put in 128x64 flats, but those are for moving floors or flowing liquids and it still shows up as 64x64 in the game.

Share this post


Link to post
timmie said:

Flats have to be square. The reason for this is ZDoom extrapolates the size of the flat from the length of the lump. A normal flat is 4096 bytes long, which is 64*64. Rectangular flats just wouldn't work well at all.

I suppose you could make a 256*128 flat and just tile it twice yourself to make it 256*256...


Yeah, makes sense. The problem is getting the texture IN the wad, then getting the editor to allow you to place it, and then getting ZDoom to recognise it.

Share this post


Link to post
ZarcyB said:

Yeah, makes sense. The problem is getting the texture IN the wad, then getting the editor to allow you to place it, and then getting ZDoom to recognise it.

First off, they have to be square. because FLATS are NOT the same format as textures, thus you can't squeeze 2 of them into a "square".

I think I mentioned the flat discrepancy back when I did the demo hires texture level and Randy fixed. So HiRes FLAT support was introduced in DeePsea 11.65.

Getting them in is real easy using DeePsea's F7 Import tool. No different than any other flat really, except they will be 128x128 or 256x256. Be sure to check -Flat- on the import dialog, otherwise they'll be regular patches - and of course put FF_START and FF_END surrounding the flat names. These show up just like all the other flats in the Sector Editing, so no issue there selecting them.

Although ZDOOM's max right now is 256x256, DeePsea support is up to 2048x2048 (to match the textures) since I see no reason why it should be limited it to 256 coding wise.

PS: And yes they work in ZDOOM as hires.

Share this post


Link to post
deep said:

First off, they have to be square. because FLATS are NOT the same format as textures, thus you can't squeeze 2 of them into a "square".

I think I mentioned the flat discrepancy back when I did the demo hires texture level and Randy fixed. So HiRes FLAT support was introduced in DeePsea 11.65.

Getting them in is real easy using DeePsea's F7 Import tool. No different than any other flat really, except they will be 128x128 or 256x256. Be sure to check -Flat- on the import dialog, otherwise they'll be regular patches - and of course put FF_START and FF_END surrounding the flat names. These show up just like all the other flats in the Sector Editing, so no issue there selecting them.

Although ZDOOM's max right now is 256x256, DeePsea support is up to 2048x2048 (to match the textures) since I see no reason why it should be limited it to 256 coding wise.

PS: And yes they work in ZDOOM as hires.


I don't want to use DeepSea, I don't like it as an editor and I find the shareware limitations restricting.

Also, when I say big flats, I mean the same resolution as the standard 64x64 flats, just occupying a bigger space. I don't know if this is what you're saying or not, I'm just clarifying it.

Share this post


Link to post

Deepsea shareware does a great job at importing/exporting wad lumps especially big highres ones that the other can not handle and I am currently using it all the time, learn tha handles and you will not use anything else.

Hey Jack can we shift the sprite handle points in deepsea, for instance to change the position of a weapon in the screen? currently I use another program for it.

Share this post


Link to post
ZarcyB said:

I don't want to use DeepSea, I don't like it as an editor and I find the shareware limitations restricting.

You don't need to use it as your map editor, as that's the only area with the shareware limitations. As a lump management tool it is quite versatile.

Also, when I say big flats, I mean the same resolution as the standard 64x64 flats, just occupying a bigger space.

I assume you want to use a 128*128 (or 256*256) flat that is not simply made up of 4 (or 16) 64*64 flats. In other words, the larger format flat is not simply a tiling of smaller format flats, but is a larger image (e.g. the kind you'd get if you tiled DEM1_1 through DEM1_4). Large format flats don't have to be hi-res for you to be able to insert them into your wad.

Share this post


Link to post

Sphagne said:
[BHey Jack can we shift the sprite handle points in deepsea, for instance to change the position of a weapon in the screen? currently I use another program for it. [/B]

To move a sprite, just hold the right mouse button down anywhere inside the "square" and drag. In Thing mode that's all you can drag, however, in the other modes if you get right on top of a "thing" you can also drag, even though you are not in thing mode - just wait till it hilights.

You can also manually enter coordinates in the Thing dialog, but that's mainly when 2 people have the same level and they want to make remote changes exactly the same.

So what did you mean? (Edit - see below, I finally saw what you meant)
============================

ZarcyB: About the flats, the larger flat gets squeezed into the same area occupied (64x64), hence you get "hires". Same as textures really - so when you get closeup they still look great.

256x256 is 16 times the density so you notice it very much. That's a good practical limit. However, one of the future ZDOOM mods could be to expand the 64x64 grid to something larger. Just depends on priorities.

Share this post


Link to post
deep said:

ZarcyB: About the flats, the larger flat gets squeezed into the same area occupied (64x64), hence you get "hires". Same as textures really - so when you get closeup they still look great.

256x256 is 16 times the density so you notice it very much. That's a good practical limit. However, one of the future ZDOOM mods could be to expand the 64x64 grid to something larger. Just depends on priorities.


Is there a way to have a 256x256 flat in a 256x256 space? I don't really want hi-res textures, just big ones so I don't have to split a 256x256 area into 16 64x64 bits, and so I can have more obscure shaped areas. All I want is good looking cliffs :)

Share this post


Link to post
ZarcyB said:

Is there a way to have a 256x256 flat in a 256x256 space? I don't really want hi-res textures, just big ones so I don't have to split a 256x256 area into 16 64x64 bits, and so I can have more obscure shaped areas. All I want is good looking cliffs :)

Not yet. You are thinking of "good looking" as showing the whole image at once without a lot of work - so really more an easier way of doing it, since you can do this now as you mentioned by splitting it up.

To me "good looking" is better pixel density. For example, if you take a SKY and make it hi-res, it's way better looking than normal pixel density. That didn't work when I made XTHEATERIII, but it's since been fixed. Tremendous visual acuity difference.

Share this post


Link to post
NiGHTMARE said:

Deep: I think he means sprite offsets.

Thanks. Right so he did. It's my dumb brain at work - it can't see the obvious:)

Anyway, to shift sprite graphic offsets, press F7, select SPRITE & IMGZ edit. There you can easily shift x/y offsets. Click "Auto Apply" if you want the changes automatically saved.

Share this post


Link to post
ZarcyB said:

Is there a way to have a 256x256 flat in a 256x256 space? I don't really want hi-res textures, just big ones so I don't have to split a 256x256 area into 16 64x64 bits, and so I can have more obscure shaped areas. All I want is good looking cliffs :)


Not feeling well, can't read straight. Don't know if anyone has mentioned this. Don't know if it would work.

Import a 256x256 flat, which Zdoom would autoscale to 64x64 then use the Sector_SetFloorScale or Sector_SetCeilingScale ACS commands or line types to "un-hi-res" it.

Share this post


Link to post
Enjay said:

Import a 256x256 flat, which Zdoom would autoscale to 64x64 then use the Sector_SetFloorScale or Sector_SetCeilingScale ACS commands or line types to "un-hi-res" it.


Heh, isn't that what I suggested (in not so many words) in my post at at the top of this thread?

Russell_P said:

you can use a high-res flat and then scale it using Sector_SetFloorScale so it fits the area you require

Share this post


Link to post

The scaling command - forgot all about that. It works, but it has one thing to watch for - namely alignment.

What you do is import a 256x256 image (for example) and make a flat. Then make a sector that is 256x256 square and plop the flat into that. Now scale x & y by 4 and it blows up to fill the sector.

However, the image expanded may not be centered in the sector so you need to shift the sector with the big flat a 64 grid unit. At least in my sample inside of another sector [sector I made is aligned on 64 grid].

Is this a mistake? Or is there some other way to do this? Right now it still makes for extra busy work:) I'll post at notgod and see what Randy thinks.

Share this post


Link to post

Thanks timmie, Enjay, deep & Russell_P... I'm going to give DeepSea another try and see if I can actually do anything with it. You've all been great helps :)

Share this post


Link to post
deep said:

However, the image expanded may not be centered in the sector so you need to shift the sector with the big flat a 64 grid unit. At least in my sample inside of another sector [sector I made is aligned on 64 grid].

Is this a mistake? Or is there some other way to do this? Right now it still makes for extra busy work:) I'll post at notgod and see what Randy thinks.

There's "Line_AlignFloor" and "Line_AlignCeiling", they'll align (duh) the flat to the line specified. It works with Line_SetIdentification. It comes in pretty handy if you have rotated sectors and want to align the flats to it correctly (i.e. you don't have to rotate them on your own). Dunno how well it works with scaled flats though, maybe I'll try it out later.

Share this post


Link to post
boris said:

There's "Line_AlignFloor" and "Line_AlignCeiling", they'll align (duh) the flat to the line specified. It works with Line_SetIdentification. It comes in pretty handy if you have rotated sectors and want to align the flats to it correctly (i.e. you don't have to rotate them on your own). Dunno how well it works with scaled flats though, maybe I'll try it out later.

Ok, using Line_AlignFloor/Ceiling works, sort of. Since Line_AlignFloor/ceiling voids all prior alignments, you can't use two of them on the same sector to align it correctly. Depeinding where you placed your sectors on the x/y plane they might work fine, else you'd have to use Sector_SetFloor/CeilingPanning (or what it's called).

Share this post


Link to post
Russell_P said:

Heh, isn't that what I suggested (in not so many words) in my post at at the top of this thread?


Yup. Told you I wasn't feeling well. :-)

Share this post


Link to post
boris said:

Ok, using Line_AlignFloor/Ceiling works, sort of. Since Line_AlignFloor/ceiling voids all prior alignments, you can't use two of them on the same sector to align it correctly. Depeinding where you placed your sectors on the x/y plane they might work fine, else you'd have to use Sector_SetFloor/CeilingPanning (or what it's called).

I need to get out more:) Sector_SetFloor_Pan with X and Y offsets works for any case where one wants to "center" the flat. Should be scripted though unless you force somebody over the tagged lines before they see the area. I can see that the general case (not knowing the boundaries of the area) makes it difficult for Randy to autocenter, still would be nice.

Share this post


Link to post

Just thought I'd note that ZDoomGL should support any sized flat, so long as it's square and a power of 2. There's no built in limit on the dimensions (so if you could find some way of having a 4096*4096 flat in there, it should work without any changes on my part)... I mean, it'll get sampled back down to fit the maximum texture size for your 3d card (right down to 256*256 for those Voodoo3's), but there's no limit in ZDoomGL itself :)

Here's how I actually allocate the data:

lumplen = W_LumpLength(firstflat + lump);
step = (int)sqrt(lumplen * 1.0);
img = (byte *)calloc(step * step * 4, 1);

So if anybody has a wad with a gargantuan flat in it, I'd be more than happy to take a screenshot for them! 0.72 will crash, though, because I was on crack or something before and hardcoded it to 64*64.

ie:

lumplen = W_LumpLength(firstflat + lump);
step = (int)sqrt(lumplen * 1.0);
img = (byte *)calloc(64 * 64 * 4, 1);

wtf was I thinking since I was actually getting the width/height correctly the whole time?

/smacks self

0.73 will obviously have this fix in there.

Share this post


Link to post

and, yes, I realize that this is a little redundant (but I use "step" later on) :)

step = (int)sqrt(lumplen * 1.0);
img = (byte *)calloc(step * step * 4, 1);

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
×