Prism_Mirage(mki-光棱坦克)
A two-image blend effect with a very Red Alert name
- exterior_image
- interior_image
- IMAGE
Prism_Mirage_makki (display name "Prism_Mirage(mki-光棱坦克)") blends two images into one with a diagonal, prism-like dither. The display name translates to "光棱坦克" - Prism Tank, a Command & Conquer: Red Alert 2 unit - and the "Mirage" half is the other RA2 unit that disguises itself. The author named a two-image effect after a tank that shoots prism beams and a tank that pretends to be a tree. I respect it.
It's an art-effect node, not a utility. If you want two images to interleave in a shimmering diagonal pattern - an "energy" blend, a glitch-adjacent look, a transition between two visuals - this does it in one node.
How it works
The effect is built in the pack's Prism_Mirage.py, and it's refreshingly old-school. Both images are converted to RGBA, then:
- Diagonal transparency - a checkerboard mask where
(x + y) % 2decides the pattern is applied to each image with a different offset. So the two images get alternating diagonal pixels knocked out, interleaving them like a moiré weave rather than a clean dissolve. - Levels adjustment - each image's transparency is scaled by its level parameter, so one image is "more there" than the other.
- Alpha compositing - the two adjusted images are composited, with the checkerboard-transparent regions letting one show through the other.
The result is a textured, pixelated blend that reads as a prism/dither effect at a distance - closer to a halftone energy field than a smooth crossfade.
Inputs that matter
- exterior_image and interior_image (required) - the two images to blend. Order matters for which one gets which diagonal offset.
- exterior_level (0–255, default 42) - the exterior image's transparency level.
- interior_level (0–255, default 24) - the interior image's level.
- Output:
IMAGE.
The levels are your tuning knobs: raising one makes that image more dominant. (If exterior_level is below interior_level there's a no-op comparison in the code rather than a clamp - the levels don't auto-correct, so just set them deliberately.)
Where you'd use it
- Energy/transition effects - blending a subject with a gradient or a light-sweep image.
- Signature looks - if you're building a stylized, dithered composite as a recurring effect.
- Texture overlay - weaving a pattern through a photo for a screen/scanline vibe.
It's not a "correct" blend and it's not subtle - the diagonal dither is unmistakable. That's the point of an effect node. For smooth dissolves, use the built-in compositing; reach for this when you specifically want the prism look.
Installing
It's in ComfyUI-MakkiTools:
cd ComfyUI/custom_nodes
git clone https://github.com/MakkiShizu/ComfyUI-MakkiTools
cd ComfyUI-MakkiTools
pip install -r requirements.txt
Restart ComfyUI. It uses Pillow and NumPy, both of which ComfyUI ships, so no extra installs. One practical note: the diagonal pattern is computed per-pixel in a Python loop over the image, so very large images are noticeably slower than a tensor-based blend - resize before blending if it feels sluggish.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| exterior_image | IMAGE | Exterior image 外部图像 | |
| interior_image | IMAGE | Interior image 内部图像 | |
| exterior_level | INT | 420–255 | Exterior transparency level 外部透明度级别 |
| interior_level | INT | 240–255 | Interior transparency level 内部透明度级别 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |