Blood decal - alpha animation

Опубликовано: 18 Август 2026
на канале: Chris Reay
156
0

Fun technique that I have shifted to for alpha animations, the idea is that you take an image sequence which could be from footage or from a sim and composite the alpha of the images on top of each other to get a full alpha. Works pretty well and has pretty broad utilization capabilities. There are some shader things you need to do to properly utilize the alpha animations that I tried to show if someone is interested in trying it out.

If you know python you can use the code below to try it out, I plan to expand on this to make the workflow more user friendly but until then feel free to play with it.

#!/usr/bin/python3

import cv2 as cv
import os, os.path
import numpy as np
import colorsys
import math
import colour
import re

def main():
NumFrames = 255
File = input("First Image in Sequence: ")
OutputFile = input("Output Filename: ")

read image
img = cv.imread(File, cv.IMREAD_UNCHANGED)

height, width
height = img.shape[0]
width = img.shape[1]

SubFile = cv.imread('E:/blood/final_render/sub.png')
ConColor = cv.imread('E:/blood/final_render/constant.png')
for v in range(NumFrames):
CurString = str(v+1)
tempFile = "E:/blood/render_out/blood." + CurString + '.png'
img = cv.imread(tempFile)
imgTemp = cv.subtract(img, SubFile)
ConColor = cv.add(imgTemp, ConColor)
cv.imwrite(OutputFile, ConColor)
print(CurString)

cv.imwrite(OutputFile, ConColor)
print("done")

if _name_ == "__main__":
main()