Having sprites render infront of floor

Ask about ACS, DECORATE, ZScript, or any other scripting questions 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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
noob_killer012345678
Posts: 3
Joined: Sun Jul 24, 2022 3:39 pm

Having sprites render infront of floor

Post by noob_killer012345678 »

Im making a mod, nothing special, just adding a boss. The problem im facing is that during the death animation, i require the boss to be sitting down. The easiest way to do this (i thought) is to make a sitting graphic, and offset it so the legs are into the floor yet render infront of it. The issue here is that it isnt rendering infront of the floor.

Ive read through the actor flags and other areas in the zdoom wiki many times, yet cant figure it out. Does anyone know a solution for this?
User avatar
Player701
 
 
Posts: 1399
Joined: Wed May 13, 2009 3:15 am
Discord: Player701#8214
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: Having sprites render infront of floor

Post by Player701 »

I think this only works with the original software renderer; it's currently not possible to do that with any of the hardware renderers. For reference: see past discussions here and here.
User avatar
Dan_The_Noob
Posts: 501
Joined: Tue May 07, 2019 12:24 pm
Twitch ID: Dan_The_Noob
Graphics Processor: nVidia with Vulkan support

Re: Having sprites render infront of floor

Post by Dan_The_Noob »

couldn't you just spawn in an actor of the legs on death?
noob_killer012345678
Posts: 3
Joined: Sun Jul 24, 2022 3:39 pm

Re: Having sprites render infront of floor

Post by noob_killer012345678 »

Dan_The_Noob wrote:couldn't you just spawn in an actor of the legs on death?
No because then i would constantly have to move that actor to be on the line between the player and the dying boss
noob_killer012345678
Posts: 3
Joined: Sun Jul 24, 2022 3:39 pm

Re: Having sprites render infront of floor

Post by noob_killer012345678 »

Player701 wrote:I think this only works with the original software renderer; it's currently not possible to do that with any of the hardware renderers. For reference: see past discussions here and here.
Okay thanks for telling me. I guess i gotta switch over to software then
User avatar
Dan_The_Noob
Posts: 501
Joined: Tue May 07, 2019 12:24 pm
Twitch ID: Dan_The_Noob
Graphics Processor: nVidia with Vulkan support

Re: Having sprites render infront of floor

Post by Dan_The_Noob »

I guess i'm misunderstanding the effect you are going for, hopefully the software idea works i guess.
User avatar
Phredreeke
Posts: 240
Joined: Tue Apr 10, 2018 8:14 am
Discord: phredreeke#6500

Re: Having sprites render infront of floor

Post by Phredreeke »

Lucius is actually implementing something like this for The Force Engine
You can use z-biasing, "smooth particle" style blending, etc. - but the various solutions change the look and have corner cases that are problematic (i.e. there is no perfect solution). This is why I decided to completely side-step the problem by emulating the software flood-filling idea on the GPU using shader based quad extrusion.
Of course, I have no idea if such an implementation would break other features GZDoom has
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47988
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Having sprites render infront of floor

Post by Graf Zahl »

The main problem with this is that it can only be done with hacks. But hacks have the unpleasant side effect of breaking other things. For example, 3D floors would no longer work - as would depth-dependent postprocessing.

In general, if sprites need such setup, it may actually be preferable to use a model if possible. The larger a sprite gets, the worse it looks. Doom's SpiderMastermind is already too much, it just looks ridiculous in its dead form.

Return to “Scripting”