No bullet holes on linedef

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
imagine
Posts: 17
Joined: Sun Jun 08, 2025 6:23 pm
Operating System Version (Optional): Win11

No bullet holes on linedef

Post by imagine »

I've found a nice trick to decorate walls. Instead of decal things, I create a 2-point linedef near a wall (I set the distance as 0.25 mp). Until the linedef has the same width as a texture on it, there is no horizontal tiling.



So far so good.

But when I shoot, there are no bullet holes on the linedef!



I tried to set up the “Block everything” flag:



Yes, it stops the bullets, since I cannot see bullet holes above and under the window on the wall if I set it. But there are no holes on the window either, which is what I'm trying to fix.

I don't know, what makes the weapon decals appear on a wall (a side of a regular sector), so I have no ideas what to change in my linedef.
User avatar
Enjay
 
 
Posts: 27070
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: No bullet holes on linedef

Post by Enjay »

Decals can't appear on 2 sided lines of this type. It need to be solid architecture (not just a 2S line with flags set). e.g. a 1-sided line, the upper/lower part of a line on a step/window-hole/etc., a solid 3D floor, a polyobject made from 1S lines...

With a setup like you have, I would probably make a recess in the wall the same size as the widow, and place the window texture on that.

As another consideration, you could define a map-placed decal of the window and place it on the wall. Decals placed in that way can actually get run-time decals appearing on them if you shoot them.
imagine
Posts: 17
Joined: Sun Jun 08, 2025 6:23 pm
Operating System Version (Optional): Win11

Re: No bullet holes on linedef

Post by imagine »

Thank you for the answer!
Enjay wrote: Tue Jul 15, 2025 4:49 am With a setup like you have, I would probably make a recess in the wall the same size as the widow, and place the window texture on that.
By recess you mean a space between floor and ceiling? If yes, it makes impossible to have two windows, one above another, doesn't it? With lindefs, at least, I can place several of them close enough and move the texture up and down.

Also, I forgot to say, the window is a transparent png. I need the basic texture (wood in my example) to be visible through it. Actually, the window is skewed, not rectangular. And it's just an example, I want to use other wall decorations also, with transparent areas in them.
Enjay wrote: Tue Jul 15, 2025 4:49 am As another consideration, you could define a map-placed decal of the window and place it on the wall. Decals placed in that way can actually get run-time decals appearing on them if you shoot them.
Sorry for the stupid question, how to define a map-placed decal and place it on the wall? :oops: I mean, in UDB.

Is there an article, covering the subject, or a YouTube tutorial? Thank you again!
User avatar
Enjay
 
 
Posts: 27070
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: No bullet holes on linedef

Post by Enjay »

imagine wrote: Mon Jul 28, 2025 6:42 am By recess you mean a space between floor and ceiling? If yes, it makes impossible to have two windows, one above another, doesn't it? With lindefs, at least, I can place several of them close enough and move the texture up and down.
Yes and no. You can't with traditional architecture, but you can do it with 3D floors.

In fact, you could use 3D floors to make something similar to what you have - narrow, solid 3D floors with the window texture on them. You could have several 3D floors at different heights and they would get bullet holes in them.

It *might* even work with your translucency, but I can't be certain on that.
imagine wrote: Mon Jul 28, 2025 6:42 am Sorry for the stupid question, how to define a map-placed decal and place it on the wall? :oops: I mean, in UDB.

Is there an article, covering the subject, or a YouTube tutorial? Thank you again!
Not a stupid question at all, especially as it doesn't seem to be a particularly well known feature.
There are articles in the Wiki about it.
The short version is that you define a decal in a lump called DECALDEF, making sure you give the decal an ID number.
Put the graphic into your PK3/WAD (it is a good idea to give it offsets in a similar way to how you do for sprites)
In UDB place a decal thing in front of a wall facing away and set its first argument to be the same as the ID that you gave the decal.
When the map starts up, the game paints the decal on the wall.
Example of something similar to what you want (I think) attached).

https://zdoom.org/wiki/Decal
https://zdoom.org/wiki/DECALDEF
WindowDecal.pk3
Just load into GZDoom and Doom2 and go have a look.
(20.72 KiB) Downloaded 5 times




Edit: Hmmm... weirdness. I noticed on the wall where I placed 3 decals above each other, two of them do not show the translucency. I have no idea why. This is just three copies of the exact same decal just with the decal actor set at different heights.
imagine
Posts: 17
Joined: Sun Jun 08, 2025 6:23 pm
Operating System Version (Optional): Win11

Re: No bullet holes on linedef

Post by imagine »

Enjay wrote: Mon Jul 28, 2025 11:00 am
Thank you for the response, I'll be learning the articles. And thank you very much for the example, I'll download and investigate it right now.

Meanwhile I've found another solution and I'd like to share it with other beginners. Maybe, it could be useful as well.

1. When drafting a map, use linedefs, as described in the title message. Place a linedef as close to a wall as possible (at scale of 0.125mp) and assign a transparent .png to the midtexture. Move the linedef in the XY plane and move the texture with the arrow keys in Z direction. It lets to create a map with wall decorations quickly enough.

2. When the map is nearly done, and all wall textures are aligned and are not to move anymore, create a linedef right on the wall. Place two new points near the linedef ends.

3. Merge the original wall texture with the transparent .png in a graphical editing software (say, Photoshop). Assign the resulting texture to the newly created linedef. The resulting texture will be limited:

• In width—by the .png, which should NOT be excessive.
• In height—by the wall height, which should NOT be excessive either.

It has worked for me, as fps was 500 with the linedefs approach and is still 500 with the new wall textures. :D
imagine
Posts: 17
Joined: Sun Jun 08, 2025 6:23 pm
Operating System Version (Optional): Win11

Re: No bullet holes on linedef

Post by imagine »

Enjay wrote: Mon Jul 28, 2025 11:00 am WindowDecal.pk3
Once again, thank you for your spent time! I see now, what these decal objects are and how to use them. Maybe, I'll use them later, and it's helpful anyway to know about them, but right now I'd stick with the solution from the previous message. Why? WYSIWYG! :D

I mean,

1. It's easier to design a map with linedefs rather than describe them with text.

2. As far as I understood, I can't see them in the 3D mode. Please correct me if I'm wrong.
User avatar
Enjay
 
 
Posts: 27070
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: No bullet holes on linedef

Post by Enjay »

Glad you found a solution that works for you.
imagine wrote: Thu Aug 07, 2025 4:06 pm 2. As far as I understood, I can't see them in the 3D mode. Please correct me if I'm wrong.
You are correct. All you can see in 3D mode is the decal thing, not the actual decal it will produce at run-time. So you do sometimes have to dip in and out of the game to check the positioning.
User avatar
Enjay
 
 
Posts: 27070
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: No bullet holes on linedef

Post by Enjay »

Glad you found a solution that works for you.
imagine wrote: Thu Aug 07, 2025 4:06 pm 2. As far as I understood, I can't see them in the 3D mode. Please correct me if I'm wrong.
You are correct. All you can see in 3D mode is the decal thing, not the actual decal it will produce at run-time. So you do sometimes have to dip in and out of the game to check the positioning.
Post Reply

Return to “Mapping”