Monster Overlays

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
DoomKrakken
Posts: 3428
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff

Monster Overlays

Post by DoomKrakken »

I propose a change that'll allow overlays for other non-player/weapon actors as well, allowing multiple sprite layers to be rendered in the world for the same actor (higher value overlays are placed over lower-value overlays, like with A_Overlay). One such place it could be used is with depicting battle damage on a monster as it's being torn apart by a hail of bullets.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Monster Overlays

Post by Marisa the Magician »

Heh, this could be nice to get rid of the hacks I use to have models with different per-part render styles. I like it.
User avatar
Major Cooke
Posts: 8111
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Monster Overlays

Post by Major Cooke »

I wonder how hard this would be to make. It'd be very nice to have, I agree.
User avatar
Rachael
Posts: 13299
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Monster Overlays

Post by Rachael »

Major Cooke wrote:I wonder how hard this would be to make. It'd be very nice to have, I agree.
A lot less simple than screen overlays, since world drawing has to respect Z-space.

A little "hack" would be to smidge the higher overlays in front of the back ones, but that might be observable, the sprite clipping would be a bit weird on the walls even if you used perspective math to correct it, and it also does not guarantee that you'll be able to avoid Z-fighting at any sort of distance.

Not saying it's impossible - just that any implementation that runs on the hardware renderer would probably be glitchy.

Unless, of course, the texture was composited before it was sent to the renderer - which would simply slow down rendering, especially if a lot of such sprites were shown in the scene.
Gez
 
 
Posts: 17777
Joined: Fri Jul 06, 2007 3:22 pm

Re: Monster Overlays

Post by Gez »

Reminds me of this. Spoiler warning: it was noed.
User avatar
phantombeta
Posts: 2051
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Monster Overlays

Post by phantombeta »

I'm pretty sure the bigger challenge here would be the states part, not rendering.
Rachael wrote:A little "hack" would be to smidge the higher overlays in front of the back ones, but that might be observable, the sprite clipping would be a bit weird on the walls even if you used perspective math to correct it, and it also does not guarantee that you'll be able to avoid Z-fighting at any sort of distance.

Not saying it's impossible - just that any implementation that runs on the hardware renderer would probably be glitchy.
I don't think this is a problem at all. Last I checked, sprites can already be in the same exact (GZDoom) XYZ coords without glitching out.
I'm also pretty sure GZDoom disables Z-writes for drawing sprites, as that would have pretty bad results... So the only thing that determines the rendering order for them is the order they're drawn in, and as such, they can't get Z fighting between each other.

[Edit] Just checked and yep. Depth test enabled, depth write disabled.
Unless, of course, the texture was composited before it was sent to the renderer - which would simply slow down rendering, especially if a lot of such sprites were shown in the scene.
That can easily be done on the GPU itself, though.
User avatar
PaganRaven
Posts: 439
Joined: Fri Oct 14, 2005 2:21 pm

Re: Monster Overlays

Post by PaganRaven »

I like this idea a lot.

Return to “Feature Suggestions [GZDoom]”