Graphics

Holographic Body Scan

Shader
VFX
Hologram

A stylized character shader implementation featuring a dynamic "scanning" effect and Fresnel-based rim lighting. This case study focuses on converting World Space coordinates to Relative Space for mesh-independent scanning and utilizing Depth Pre-passes to solve transparency sorting artifacts.

Holographic Scanning Character
HOLOGRAM::VFX_LOGICSTATUS::MODIFIED
Input Assembler[FIXED]
Vertex Shader[SHADER]
Tessellation[SHADER]
Geometry Shader[SHADER]
Rasterizer[FIXED]
Fragment Shader[SHADER]
Output Merger[FIXED]
MODIFIED
UNTOUCHED

Project Overview

This project aims to recreate the “Body Scan” effect commonly found in sci-fi interfaces. The goal was to implement a character shader that smoothly transitions into a semi-transparent, glowing holographic state, accompanied by a vertically moving scanning line. The primary technical challenges involved eliminating the “sliding” texture artifacts during character movement and resolving the visual clutter (Self-Overdraw) inherent in transparent rendering to ensure a clean aesthetic.


1. Concept: Edge & Flow

Visual Hierarchy:

  1. Rim Light: Outlines the silhouette, giving the hologram volume and preventing it from looking flat.
Final Holographic Result
The independently rendered Rim Light layer.
  1. Scanning Beam: A vertically scrolling light band simulating the operation of a scanner.
Final Holographic Result
A vertical scanning texture driven by time flow.

2. Technical Breakdown

A. Deriving Fresnel from Needs

When building the rim light, instead of immediately applying physical formulas, I reconstructed the logic of the Fresnel effect through a progression of visual requirements:

  1. Edge Detection: First, I needed to distinguish between the model’s center and its edges. By calculating the Dot Product of the Surface Normal and View Direction (NVN \cdot V), I obtained the facing ratio (White at the center, Black at the edges).
  2. Inversion: Since the goal is to illuminate the edges, I applied a One Minus (1(NV)1 - (N \cdot V)) operation to the result, successfully isolating the model’s silhouette.
  3. Hardness Control: A simple linear gradient felt too soft. To achieve the texture of a “holographic shield,” I introduced a Power (Exponent) operation. By adjusting the exponent, I compressed the edge width, transforming soft diffuse light into a sharp “light shell.”
Final Holographic Result
Shader Graph implementation of the logic above.
  1. Conclusion: This sequence of operations (Edge Detection -> Inversion -> Exponent Control) mathematically reconstructs the standard Fresnel formula: (1NV)Power(1 - N \cdot V)^{Power}. This manual derivation validates the underlying logic of using Fresnel nodes for edge lighting.
Final Holographic Result
The Standard Fresnel Node.

B. The Quest for Relative Coordinates

To solve spatial issues with texture projection:

  • The Problem: Using Model UVs causes the scan line to warp with the geometry; using absolute World Space coordinates ensures a straight vertical projection but causes a “curtain effect”—where the character moves through the texture rather than the texture following the character.

  • The Solution: Constructing a Relative World Coordinate system. RelativePos=VertexWorldPosObjectPivotPosRelativePos = VertexWorldPos - ObjectPivotPos

    Final Holographic Result
    Node Logic: Subtracting the Object Pivot from World Position to calculate Relative Coordinates.
  • The Result: This yields a coordinate system that is both aligned with world axes (ensuring vertical projection) and locked to the object’s position, ensuring the scan line moves synchronously with the character without deformation.

C. Rendering State Configuration

The core of the holographic aesthetic lies in non-standard configurations of Blend Mode and Depth.

1. Blend Mode: Light Superposition (Particle Additive)

I abandoned standard transparency blending (SrcAlpha, OneMinusSrcAlpha) in favor of Particle Additive (SrcAlpha, One).

Final Holographic Result
Additive Mode (Right) produces a purer glow compared to Standard Blending (Left).
  • Physical Logic: Holograms are essentially light. Light follows additive color mixing—the more layers you stack, the brighter it becomes.
  • Visual Advantage: This “additive-only” calculation ensures the hologram retains a translucent, high-energy look, rather than the darkened, solid appearance of “tinted glass” caused by standard blending.

2. Depth Write: Building the “Light Shell” (Extra Depth Pass)

To resolve the visual clutter where internal structures (like the spine seen through the chest) are visible in semi-transparent rendering, I enabled an Extra Depth Pass.

Final Holographic Result
With Z-Write On, internal messy structures are culled, leaving only the outer shell.
  • Technical Principle (Double Pass):
    • Pass 1 (Mask): Writes to Depth buffer only, with no color output. This creates a “depth mask,” effectively culling all occluded internal faces.
    • Pass 2 (Fill): Renders color based on this depth mask.
  • The Result: This forces self-occlusion culling on the model. Visually, it retains only the outermost “light shell” while hiding the chaotic internal mesh, significantly enhancing the clean, high-tech feel of the hologram.
Final Holographic ShaderGraph
Overview of the complete Amplify Shader Editor graph.
Final Holographic Result
Final Result: Relative coordinates ensure stable scanning, while Depth Write and Additive Blending ensure visual purity.