Making blood look Resident Evil-ish
Yesterday I worked with blood sprites. These are the Resident Evil 2 sprites, which can be ripped as a texture atlas from the disc using Psicture. You have to cycle through the palettes to get the right one, otherwise it will look rather odd and broken when exported.
I initially ripped it as red, but soon realised that I needed to make it white instead. This is because of the way the Half-Life blood system works. Using the TE_BLOODSPRITE message, you pass in a sprite to use, and then a colour to use. The colour is multiplied on top of the sprite, much like a Photoshop overlay mode. The number corresponds to an index in the game’s palette, which is found in palette.lmp.
As far as I know, there is no way to read this file. Luckily, it’s identical to the Quake palette. This is documented online, such as here: https://quakewiki.org/wiki/Quake_palette
Because I want to use this sprite for more than just red blood (I think Nemesis might have purple blood, for example? And possibly spiders have green/white) I had to open each frame up in Photoshop, and turn it greyscale. This is just a white layer set to “color” in Photoshop’s overlay mode. However, this is not actually fully correct for multiplying the colour on top of it, because you lose the brightness and contrast needed for the ingame colour multiplication stage. I created a few brightness/contrast layers, and basically just moved the controls until it looked more or less the same contrast as the red version (when using red multiply overlay mode in Photoshop)
Because the vanilla Half-Life UTIL_BloodDrips function (responsible for spraying blood in combat) uses TE_BLOODSPRITE, that means 2 sprites are required. The first is the “spray”, the second are the drops. The spray is a static, animated sprite with no gravity, but the drops fly out and land on the ground. I looked through Resident Evil 1 with Psicture (because that’s the disc I happened to have mounted at the time) and found a generic splat sprite. After converting this, I quickly realised it looked terrible with the drips. However, it turns out you can just pass 0 as the parameter for the drips, and the engine will ignore it. For now, I’m therefore only using the static splat for blood sprays.