Descent Like Collision Detection For Textures With Transparency

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

Moderator: GZDoom Developers

User avatar
22alpha22
Posts: 288
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Descent Like Collision Detection For Textures With Transparency

Post by 22alpha22 »

I've been playing through the descent games recently and one thing I've noticed is that the engine has automatic collision handling for textures with transparent parts. For example, a bar texture has opaque parts representing metal bars that block both projectile and hitscan attacks but it also has transparent areas between the bars which allow hitscans to pass thru as well as projectiles small enough to fit thru the gaps.

I can't think of any simple way of replicating the effect in GZDoom right now. It would be incredibly useful if there was a way to flag two side lines to treat fully transparent parts of a texture as non-blocking to both actors and hitscans, while at the same time, opaque parts do block actors and hitscans.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48325
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Descent Like Collision Detection For Textures With Transparency

Post by Graf Zahl »

For hitscans such a thing is doable - but for full actors it'd require complex checks against the texture and the engine is simply not equipped for that.
User avatar
phantombeta
Posts: 2009
Joined: Thu May 02, 2013 1:27 am
Graphics Processor: nVidia with Vulkan support

Re: Descent Like Collision Detection For Textures With Transparency

Post by phantombeta »

A problem I can see with this is that it'd make textures matter for MP sync. Right now, textures are clientside and don't cause desyncs, so using texture packs is perfectly fine. I'm not sure that would be worth giving up for a feature that, by its own nature, can't really work that great outside of hitscans.
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Descent Like Collision Detection For Textures With Transparency

Post by Enjay »

I might also feel counter-intuitive that the instant, invisible (and logically very small) hitscans sometimes get blocked but the slower, bigger, more visible plasma bolts, fireballs etc. are not impeded.
User avatar
22alpha22
Posts: 288
Joined: Fri Feb 21, 2014 5:04 pm
Graphics Processor: nVidia with Vulkan support
Location: Montana, USA

Re: Descent Like Collision Detection For Textures With Transparency

Post by 22alpha22 »

Graf Zahl wrote: Wed Sep 28, 2022 8:47 am For hitscans such a thing is doable - but for full actors it'd require complex checks against the texture and the engine is simply not equipped for that.
Would it be feasible to only check for a projectile actor's absolute position and ignore its radius and height when checking for collision with a transparent texture or would that still be too much for the engine?
User avatar
wildweasel
Moderator Team Lead
Posts: 21500
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10, 21H1
Graphics Processor: nVidia with Vulkan support

Re: Descent Like Collision Detection For Textures With Transparency

Post by wildweasel »

I would honestly go with projectiles being blocked absolutely by such textures, assuming things like fences, bars, and windowpanes, and the majority of Doom engine projectiles generally being large enough to get caught on something like that. Sure, it wouldn't make sense on larger windows or very small projectiles (like my bullet tracers), but that's just the nature of the beast on an engine like this.

Return to “Feature Suggestions [GZDoom]”