[Added] Opaque blood decals

Moderator: GZDoom Developers

Opaque blood decals

Postby Nash » Mon Mar 02, 2020 7:57 am

Currently, blood impact decals are forced to use the shaded render style. It isn't currently possible to make blood decals (that respect actor blood colours) have an opaque/Normal renderstyle, that would then be colourized the same way a blood-translated sprite would.

As for implementation, perhaps the unused "Colors" DECALDEF keyword can be re-purposed for this - with "BloodDefault" being accepted as the second parameter to translate the sprite colors the same way as the shaded blood decals. EDIT: I abandoned the Colors idea because it's irrelevant to what I'm asking for here.
Last edited by Nash on Mon Mar 16, 2020 8:36 am, edited 1 time in total.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Opaque blood decals

Postby Nash » Sun Mar 15, 2020 5:04 pm

Here's a first pass on this feature: https://github.com/coelckers/gzdoom/pull/1051

Right now I feel like this has very limited use so I made this very specific (the blood translation only gets passed from P_TraceBleed). I chose to ignore that unfinished 2001 feature from the OP (the "Colors" keyword) as I feel that it's too complicated for achieving the simple goal I want here.

Blood decals in mods normally have the 'Shaded' property so to opt into this specific render mode, I made it so that simply omitting the keyword would do.
EDIT: Modders must add the 'OpaqueBlood' keyword to the DECALDEF to explicitly define it as one.

Kindly review. I would really appreciate this feature in the engine, as do a few others. Unfortunately I really have no good ideas about this so please guide me.

Screenshot of a test using a variety of blood colors:

Spoiler:
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Opaque blood decals

Postby Nash » Mon Mar 16, 2020 9:00 am

Changed it so that the user has to explicitly define the decal with the keyword 'OpaqueBlood'.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Opaque blood decals

Postby Nash » Mon Mar 23, 2020 12:59 am

Sorry to bump. I have been playing with this in my homebrew build and I don't encounter any issues.

As I said, I've made this feature only for one specific use case (only, and ONLY opaque colourized blood decals from P_TraceBleed - no generic translation feature, no other customizability)... so it is possible that I'm being extremely shortsighted, which is why I need to be told if anything needs to be changed or not.

I have a big pending update to Nash's Gore Mod, besides several bug fixes and new features to the mod, I'd like to unify the look between the wall decals and the floor splat actors, and it would be great if GZDoom 4.3.4 has this feature so that I can release my mod with the updated visuals.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Opaque blood decals

Postby Rachael » Mon Mar 23, 2020 1:04 am

Everything looks good here, to me.
User avatar
Rachael
Webmaster
 
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


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest