Randy: Texture/Flat preference ?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.

Randy: Texture/Flat preference ?

Postby randomlag » Mon Jul 21, 2003 11:19 pm

randy wrote: For everything else, the way you define the texture doesn't matter, so a floor or wall could use any of the following source images:
  • A texture defined in a TEXTURE1/TEXTURE2 lump.
  • A flat between F_START/F_END markers.
  • A sprite between S_START/S_END markers.
  • A single patch listed in a PNAMES lump.
Randy, here's the texture preference I added in DeePsea:

For sidedefs: Textures are searched first, then flats, pnames and sprites. IOW if there is a texture and a flat with the same name the texture is selected.

For floors/ceilings: Flats, pnames and sprites are searched first (iow, not textures), then textures. This is to make real FLATS have precedence if a duplicate name exists (which is real likely).

If you are thinking something different, please let me know.
User avatar
randomlag
 
Joined: 17 Jul 2003

Postby randi » Tue Jul 22, 2003 12:02 am

What you've done sounds good, although for floors/ceilings you should search for flats alone first, since that's the only preference floors/ceilings have. If there is a patch and a texture with the same name and you want to use one of them on a floor, the specific one that gets chosen is undefined. But if you add a flat with the same name, the flat will always be used instead of the patch or texture.

Walls are much the same, except they prefer textures over any other image type.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Postby Sphagne » Tue Jul 22, 2003 1:53 am

For the resource designers I suggest them to forget about flats and add only new patches and textures. and sprites.

Patches for base resource,
Textures for detailed and combined resource,
Sprites, well, you know.

And I hope we would be able to use sprites as well as patches to make combined textures. :wink:
User avatar
Sphagne
Just me, nothing more
 
Joined: 16 Jul 2003

Postby Graf Zahl » Tue Jul 22, 2003 2:33 am

I think the order in which to search should be properly defined:

For walls:

TEXTURE1+2
PNAMES
F_START/F_END
S_START/S_END

For flats:

F_START/F_END
TEXTURE1+2
PNAMES
S_START/S_END


This is the most 'proper' order IMO.
Sprites aren't real textures and should always be searched last.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Xaser » Tue Jul 22, 2003 9:01 am

Sphagne wrote:And I hope we would be able to use sprites as well as patches to make combined textures. :wink:


You already can use sprites and patches to make combined textures! If you download Wintex, you can place sprites, patches, and even graphic resources (titlepic, etc.) on a custom texture. Download my wad Kill Stuff for an example of sprites on walls. Kill stuff hasn't been FTPed anywhere, but you can find it in my post called "Problem with Thing_Spawn", in the editing forum.

[FUTURE-EDIT] I still have no clue how I learned this. Guess I was just born with Doom in my veins. Seriously, though, if you cut me, you get the first episode. That's actually how the Doom alphas originally leaked out. I stepped on an ice pick.

No warezing, though. Please put away your kitchen knives.
Last edited by Xaser on Sat Feb 20, 2010 2:45 pm, edited 2 times in total.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby Graf Zahl » Tue Jul 22, 2003 9:43 am

Xaser wrote:
Sphagne wrote:And I hope we would be able to use sprites as well as patches to make combined textures. :wink:


You already can use sprites and patches to make combined textures! If you download Wintex, you can place sprites, patches, and even graphic resources (titlepic, etc.) on a custom texture. Download my wad Kill Stuff for an example of sprites on walls. Kill stuff hasn't been FTPed anywhere, but you can find it in my post called "Problem with Thing_Spawn", in the editing forum.


Indeed. That has been possible even in the original Doom EXE. Strange that there are so few WADs that use this feature.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby randomlag » Tue Jul 22, 2003 9:52 am

randy wrote:What you've done sounds good, although for floors/ceilings you should search for flats alone first, since that's the only preference floors/ceilings have. If there is a patch and a texture with the same name and you want to use one of them on a floor, the specific one that gets chosen is undefined. But if you add a flat with the same name, the flat will always be used instead of the patch or texture.

Walls are much the same, except they prefer textures over any other image type.

Exactly - that's what I did. As you noted, there is some ambiguity with duplicate names once they are not a real texture or real flat. Probably need to spell out the exact action.

One way to define a predictable search order is to build a complete list first and accomplish this easily (doesn't take that much memory on today's machines).

The list creation order for walls is : Textures, Flats (-not- PNAMES Graff since typical textures have all the patches, plus names duplicate), Pnames, Sprites.

The list creation order for floors is: Flats, Textures, Pnames, Sprites (I said it wrong on the prior post).
User avatar
randomlag
 
Joined: 17 Jul 2003

Postby Sphagne » Tue Jul 22, 2003 9:58 am

Randomlag, is the new Deepsea available for download?

Do you list all the available images in one place (after removing duplicate name instances), to be selected from?
User avatar
Sphagne
Just me, nothing more
 
Joined: 16 Jul 2003

Postby randomlag » Tue Jul 22, 2003 12:36 pm

Sphagne wrote:Randomlag, is the new Deepsea available for download??
Not yet. There are quite a few other areas that need changing - for example, X alignment. I'll probably forget one.
Do you list all the available images in one place (after removing duplicate name instances), to be selected from?
Yes. It's a new option. You can also exclude FLATS (for textures), PNAMES and/or SPRITES to avoid huge lists. There will probably be some cases where the results are not what you expect, unless ZDOOM gave an option to also exclude groups. Let's see how this develops for conflicting situations.

The other change is the ability to restrict lists to just external textures. This is something I was going to do long time ago, just kept forgetting. The DW post where the "frenchman" got upset and banned me reminded me :wink:
User avatar
randomlag
 
Joined: 17 Jul 2003

Postby Sphagne » Wed Jul 23, 2003 9:38 pm

A question:

256x256 flats by default get scaled to 64x64, what happens if we use them as walls?

Vice vera: 256x256 how about patches as flats?
User avatar
Sphagne
Just me, nothing more
 
Joined: 16 Jul 2003

Postby randomlag » Wed Jul 23, 2003 11:14 pm

I imagine they get used at the actual size - that seems the most logical. Randy can correct me :?:

Too lazy to verify, but IIRC the example Randy had effectively showed patches used as floors - Didn't they show up using the actual patch size?
User avatar
randomlag
 
Joined: 17 Jul 2003

Postby randi » Thu Jul 24, 2003 12:01 am

Okay, after checking the load order I have in the code, here are the specific search orders you'll end up with. For walls:
  1. Textures
  2. BUILD tiles
  3. Flats
  4. Patches
  5. Sprites
And for floors/ceilings:
  1. Flats
  2. BUILD tiles
  3. Textures
  4. Patches
  5. Sprites

So I guess what I had is pretty much what randomlag suggested, aside from the BUILD tiles. Normally there won't be any of those, since I don't expect people to be playing with the -art parameter much. It was invaluable for testing though.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Postby Graf Zahl » Thu Jul 24, 2003 2:39 am

Sphagne wrote:A question:

256x256 flats by default get scaled to 64x64, what happens if we use them as walls?

Vice vera: 256x256 how about patches as flats?



For consistency they should be scaled to 64x64, even on walls. Otherwise replacing flats later in the editing process with ones of different size might cause problems.

Other question: How should flats behave on 2-sided middle textures. Should they tile vertically or not, like regular wall textures?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby randomlag » Thu Jul 24, 2003 9:16 am

Graf Zahl wrote:For consistency they should be scaled to 64x64, even on walls. Otherwise replacing flats later in the editing process with ones of different size might cause problems.

Other question: How should flats behave on 2-sided middle textures. Should they tile vertically or not, like regular wall textures?
They are no longer FLATS in the traditional sense - think of them as just another graphic. Besides that, it would require some scaling control to use them as full size which is really redundant code/effort, since it's better in that case to just make a texture out of the FLAT (which is an instant step).

This actually makes editing EASIER.

FLATs should tile vertically, otherwise there will be way too many other problems to worry about.
User avatar
randomlag
 
Joined: 17 Jul 2003

Postby Enjay » Thu Jul 24, 2003 9:54 am

randomlag wrote:FLATs should tile vertically, otherwise there will be way too many other problems to worry about.


Even on the middle of 2S lines?

I certainly agree that they should tile on 1S lines and lower/upper sidedefs, but not tiling/repeating on the middle of 2S lines is standard for regular textures. I seen no reason why flats should behave differently to traditional textures when being used as textures.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Next

Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 0 guests