📝 Development Chat Log - Stage 3: Blur Effect!

Documenting the dramatic blur/explosion effect that simulates the iconic Superman credits finale.


Interaction #7 - Stage 3: Blur/Explosion Effect

January 17, 2026

👤 User Request:

Let's create version 3 of both the movieCreditsSim and chatlog. In this stage, let's introduce a blur effect: In the Superman credits, right before the credit name fades, it blurs dramatically, making it look like it's evaporating/exploding. Let's use a variable for the blurring strength so as not to use magic numbers. This effect happens in the last 10 percent or so of the animation time. Let's use a variable for that as well so we can make adjustments.

🤖 Assistant Response:

✅ Files Created:
  • movieCreditsSim3.html - Enhanced with blur/explosion effect
  • chatLog3.html - This chat log documenting Stage 3 changes

Stage 3 Enhancement: Dramatic Blur Effect

💥 New Feature: Evaporation/Explosion Effect

Added a dramatic blur effect that kicks in during the final moments of each credit's fade, simulating the iconic Superman credits where text appears to explode or evaporate into space.

New Configuration Variables:

✨ Configuration #1: BLUR_TRIGGER_THRESHOLD

Controls when the blur effect starts (based on opacity level):

// *** BLUR TRIGGER THRESHOLD ***
// When opacity drops below this value, the blur effect starts
// Value is percentage (0-100). Lower values = blur starts later in animation
// Typical range: 10-30 (blur in last 10-30% of fade)
const BLUR_TRIGGER_THRESHOLD = 20;
📚 Understanding BLUR_TRIGGER_THRESHOLD:
  • Value of 20: Blur starts when opacity drops below 20% (last 20% of fade)
  • Value of 10: Blur starts very late (last 10% - more subtle)
  • Value of 30: Blur starts earlier (last 30% - more dramatic)
  • Value of 50: Blur starts halfway through fade
  • How it works: Code checks if (credit.opacity < BLUR_TRIGGER_THRESHOLD)
✨ Configuration #2: BLUR_STRENGTH

Controls how many layers create the blur effect:

// *** BLUR STRENGTH ***
// How many blur layers to draw (more = stronger blur but slower)
// Each layer draws the text with slight offset to create blur effect
// Typical range: 3-10 layers
// Higher values create more dramatic explosion/evaporation effect
const BLUR_STRENGTH = 6;
📚 Understanding BLUR_STRENGTH:
  • Value of 3: Subtle blur (faster performance)
  • Value of 6: Moderate blur (good balance - default)
  • Value of 10: Intense explosion effect (slower but dramatic)
  • Performance note: Higher values = more drawing = slower frame rate
  • Visual effect: More layers = denser, more chaotic explosion
✨ Configuration #3: BLUR_SPREAD

Controls how far the blur layers spread out:

// *** BLUR SPREAD ***
// How far apart the blur layers spread (in pixels)
// Larger values = more dramatic explosion effect
// Smaller values = subtle blur effect
// Typical range: 2-10 pixels
const BLUR_SPREAD = 4;
📚 Understanding BLUR_SPREAD:
  • Value of 2: Tight blur (looks like motion blur)
  • Value of 4: Moderate spread (balanced - default)
  • Value of 8: Wide explosion (particles flying apart)
  • Value of 15: Extreme scatter (very dramatic!)
  • Works with: randomGaussian() for natural distribution

How the Blur Effect Works:

📍 Step 1: Detection

In displayCredit() function, check if blur should be applied:

// Check if we should apply blur effect
// When opacity drops below threshold, text starts to "explode/evaporate"
let shouldBlur = credit.opacity < BLUR_TRIGGER_THRESHOLD;

if (shouldBlur) {
    drawBlurredCredit(credit);  // Apply blur effect
} else {
    drawNormalCredit(credit);   // Draw normally
}
📍 Step 2: Normal Rendering

Separated normal text drawing into its own function:

function drawNormalCredit(credit) {
    push();
    translate(credit.x, credit.y);
    rotate(radians(credit.tiltAngle));
    fill(credit.hue, 80, 100, credit.opacity);
    textSize(credit.size);
    text(credit.name, 0, 0);
    pop();
}
📍 Step 3: Blur Rendering (The Magic!)

New function that creates the explosion/evaporation effect:

function drawBlurredCredit(credit) {
    push();
    translate(credit.x, credit.y);
    rotate(radians(credit.tiltAngle));
    textSize(credit.size);
    
    // *** DRAW MULTIPLE BLUR LAYERS ***
    for (let i = 0; i < BLUR_STRENGTH; i++) {
        // Divide opacity by BLUR_STRENGTH
        // So all layers combined ≈ original opacity
        let layerOpacity = credit.opacity / BLUR_STRENGTH;
        
        fill(credit.hue, 80, 100, layerOpacity);
        
        // *** RANDOM OFFSET FOR THIS LAYER ***
        // randomGaussian creates bell curve distribution
        // Most offsets near 0, some farther out
        let offsetX = randomGaussian(0, BLUR_SPREAD);
        let offsetY = randomGaussian(0, BLUR_SPREAD);
        
        // Draw this layer at offset position
        text(credit.name, offsetX, offsetY);
    }
    
    pop();
}
📚 Breaking Down the Blur Algorithm:
  1. Loop BLUR_STRENGTH times - Draw multiple copies of the text
  2. Reduce opacity for each layer - Divide by BLUR_STRENGTH to maintain total brightness
  3. Random offset each layer - Use randomGaussian for natural scatter
  4. Draw at offset position - Each copy appears slightly displaced
  5. Combined visual effect - Looks like text is exploding/evaporating!
🎓 New Concept: Gaussian Distribution

randomGaussian(mean, standardDeviation) is different from random():

  • random(min, max): Every value equally likely (uniform distribution)
    • Like rolling a die - each number has same probability
  • randomGaussian(mean, sd): Values cluster near mean (bell curve)
    • Like measuring heights - most people near average, few very tall/short
  • In our code: randomGaussian(0, BLUR_SPREAD)
    • Mean = 0 (center point)
    • Standard deviation = BLUR_SPREAD (controls spread)
    • Most layers appear near center
    • Some layers scatter farther out
    • Creates natural-looking explosion effect!
💥 Visual Effect Breakdown:

When a credit's opacity drops below the threshold:

  1. Frame 1: Normal text (opacity = 21)
  2. Frame 2: Blur starts! (opacity = 20.7, drops below 20)
    • 6 semi-transparent copies drawn
    • Each offset by ~0-4 pixels
    • Text appears to start "breaking apart"
  3. Frame 5: Opacity = 19.2
    • Still 6 copies, but dimmer
    • Blur layers more visible as background fades
  4. Frame 10: Opacity = 17.7
    • Dramatic explosion effect now clear
    • Text looks scattered across space
  5. Final frames: Opacity approaches 0
    • Scattered fragments fade to nothing
    • Evaporation complete!

Code Organization Improvements:

🏗️ Function Decomposition

Split displayCredit() into three functions for clarity:

  • displayCredit() - Decision logic (blur or not?)
  • drawNormalCredit() - Normal rendering
  • drawBlurredCredit() - Blur effect rendering

Why? Each function has one clear job. Easier to understand, test, and modify.

Experiment Ideas:

🔬 Try These Combinations:
  • Subtle Blur:
    • BLUR_TRIGGER_THRESHOLD = 10 (late start)
    • BLUR_STRENGTH = 3 (few layers)
    • BLUR_SPREAD = 2 (tight spread)
    • Effect: Gentle softening before fade
  • Dramatic Explosion:
    • BLUR_TRIGGER_THRESHOLD = 30 (early start)
    • BLUR_STRENGTH = 10 (many layers)
    • BLUR_SPREAD = 8 (wide spread)
    • Effect: Spectacular explosion effect!
  • Quick Evaporation:
    • BLUR_TRIGGER_THRESHOLD = 15 (late start)
    • BLUR_STRENGTH = 8 (many layers)
    • BLUR_SPREAD = 6 (medium spread)
    • Effect: Sudden intense scatter
  • Gradual Dissolution:
    • BLUR_TRIGGER_THRESHOLD = 40 (very early)
    • BLUR_STRENGTH = 4 (few layers)
    • BLUR_SPREAD = 3 (small spread)
    • Effect: Slow, graceful fade

Challenge Ideas for Advanced Students:

🎯 Extension Challenges:
  • Color Shift: Make blur layers shift to different hues
    • Hint: fill(credit.hue + i*10, 80, 100, layerOpacity)
  • Rotation Scatter: Make each blur layer rotate differently
    • Hint: Add rotate(radians(i * 5)) inside the loop
  • Glow Effect: Add larger, dimmer layers for outer glow
    • Hint: Draw extra layers with increased BLUR_SPREAD
  • Pulse Effect: Vary BLUR_SPREAD based on frameCount
    • Hint: let pulse = BLUR_SPREAD + sin(frameCount * 0.1) * 2
  • Trail Effect: Offset layers in direction of movement
    • Hint: Add vertical offset based on layer number
🎓 Professional Techniques Learned:
  • Particle Systems: The blur effect is a simple particle system
  • Layered Rendering: Building complex effects from simple layers
  • Probabilistic Animation: Using randomness for organic effects
  • Performance Consideration: More layers = more beautiful but slower
  • Effect Triggers: Conditional effects based on state (opacity)
🎯 The Superman Effect Achieved!

The original 1978 Superman credits used optical effects to create the iconic exploding/evaporating text. Our code recreates this digitally using layered drawing and random offsets. While the technique is different, the visual result captures the same dramatic feel - text that doesn't just fade, but spectacularly disintegrates into the cosmos!

✨ Experimentation Results - Optimal Values

Through experimentation, the following configuration was found to produce the best blur effect that authentically recreates the Superman credits experience:

const INITIAL_FONT_SIZE = 120;          // Bold, dramatic appearance
const CREDIT_DELAY_MS = 5000;           // Allows full display of each credit
const MAX_TILT = 20;                    // Noticeable but not excessive tilt
const TILT_DECAY = 0.98;                // Gradual, smooth straightening
const BLUR_TRIGGER_THRESHOLD = 60;      // Blur starts early for sustained effect
const BLUR_STRENGTH = 10;               // Intense, visually striking explosion
const BLUR_SPREAD = 8;                  // Wide scatter for dramatic particle effect

Key Findings:

  • Early blur trigger (60%): Starting the blur while text is still quite visible creates a more dramatic, sustained explosion effect rather than a quick burst at the end
  • High blur strength (10 layers): More layers create a denser, more impressive particle cloud that better simulates the original effect
  • Wide blur spread (8 pixels): Greater spread makes the explosion more visible and creates the feeling of particles flying apart into space
  • Slower tilt decay (0.98): Gradual straightening keeps the text interesting throughout its lifetime and complements the blur effect
  • Longer delay (5000ms): Gives viewers time to appreciate each credit's full animation sequence from appearance through explosion to vanishing

These values work together to create a cohesive, cinematic effect. Students can use these as a baseline and experiment from here to find their own preferred aesthetic!


📊 Complete Progress Summary

Configuration Variables Summary:
const NUM_STARS = 100;                  // Background star count
const INITIAL_FONT_SIZE = 64;           // Starting text size
const CREDIT_DELAY_MS = 3000;           // Delay between credits
const MAX_TILT = 15;                    // Maximum tilt angle
const TILT_DECAY = 0.95;                // Tilt straightening speed
const BLUR_TRIGGER_THRESHOLD = 20;      // When blur starts (opacity %)
const BLUR_STRENGTH = 6;                // Number of blur layers
const BLUR_SPREAD = 4;                  // Blur scatter distance

Achievement Unlocked: You've created a professional-quality animation with multiple configurable visual effects! This demonstrates core concepts used in game development, motion graphics, and visual effects.