The StereoVision plugin for ComfyUI enables the creation of stereoscopic and autostereoscopic images and videos using depth maps. It supports both traditional stereoscopic image generation and autostereogram (Magic Eye) creation.
The plugin provides two primary nodes:
- Stereoscopic Generator: Creates side-by-side stereoscopic images from base images and depth maps
- Autostereogram Generator: Produces autostereograms from depth maps
-
Input Requirements
- Base Image: The source image for conversion
- Depth Map: Corresponding depth information (lighter = closer, darker = further)
-
Node Setup
- Add the Stereoscopic Generator node
- Connect base image to
base_image
input - Connect depth map to
depth_map
input
-
Parameters
depth_scale
: Controls 3D effect intensity (default: 80)- Higher values increase depth separation
- Lower values produce subtler effects
-
Image Selection
- Clear foreground/background separation improves results
- Consistent depth mapping enhances effect quality
- High-contrast scenes may require lower depth scale values
-
Processing Requirements
- Higher resolution inputs require more processing time
- Video processing may need significant computational resources
-
Input Requirements
- Depth Map: Defines the hidden 3D image
- Optional Texture: Custom pattern for the autostereogram
-
Core Parameters
-
pattern_div
: Pattern width (integer)- Low values: Larger patterns, easier viewing
- High values: Smaller patterns, more detail
-
depth_multiplier
: Depth effect intensity -
invert
: Reverses depth perception -
x_tiles
,y_tiles
: Pattern repetition count
-
-
Pattern Configuration
-
Pattern Types:
- Random
- Perlin
- Dots
- Lines
- Checkers
- Waves
-
Noise Parameters:
noise_scale
: Pattern sizenoise_octaves
: Pattern complexity
-
Color Options:
- Grayscale
- RGB
- Complementary
-
-
Batch Processing Controls
clamp_depth_to_first
: When enabled, uses the first depth map frame for all outputsclamp_texture_to_first
: When enabled, uses the first texture frame for all outputs- These options are useful for:
- Creating consistent autostereograms across multiple frames
- Maintaining pattern continuity in animations
- Reducing visual noise in batch processing
-
Output Settings
- Custom width/height support
- Default: matches depth map dimensions
Pattern Division Effects:
- 4: Large patterns, basic depth perception
- 16: Fine patterns, detailed hidden images
Noise Configuration:
- Scale Range: 0.5 (fine) to 2.0 (coarse)
- Octaves: 2-6 (higher = more complex)
Use parallel viewing technique to see the hidden 3D image
Use parallel viewing technique to see the hidden 3D image
-
Performance Optimization
- Match output resolution to viewing requirements
- Consider computational load for video processing
- Monitor memory usage with high-resolution inputs
-
Quality Control
- Verify depth map accuracy
- Test various pattern settings for optimal viewing
- Validate output across different display sizes
-
Error Prevention
- Ensure consistent input dimensions
- Validate depth map grayscale values
- Monitor processing resource usage
- Input Formats: Standard image formats
- Output Resolution: Configurable or source-matched
- Processing: CPU-based computation
- Memory Requirements: Scales with input resolution
For detailed implementation examples and advanced usage scenarios, refer to the plugin's source code and example workflows.