Monster Overlays

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

Moderator: GZDoom Developers

Monster Overlays

Postby DoomKrakken » Sat Jan 25, 2020 3:19 am

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
DoomKrakken
All but inactive here on the forums. Contact me on Discord for quicker replies.
 
Joined: 19 Oct 2014
Location: Plahnit Urff
Discord: DoomKrakken#2719

Re: Monster Overlays

Postby Marisa Kirisame » Sun Jan 26, 2020 2:31 pm

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
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Monster Overlays

Postby Major Cooke » Fri Dec 04, 2020 12:45 am

I wonder how hard this would be to make. It'd be very nice to have, I agree.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Monster Overlays

Postby Rachael » Fri Dec 04, 2020 2:45 am

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.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Monster Overlays

Postby Gez » Fri Dec 04, 2020 3:39 am

Reminds me of this. Spoiler warning: it was noed.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Monster Overlays

Postby phantombeta » Fri Dec 04, 2020 9:14 am

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
phantombeta
Tired of being treated like trash by control freaks
 
Joined: 02 May 2013

Re: Monster Overlays

Postby PaganRaven » Sun Dec 27, 2020 5:32 pm

I like this idea a lot.
User avatar
PaganRaven
Viking Warrior
 
Joined: 14 Oct 2005


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests