Skip to content

msitarzewski/nozzleverse

Repository files navigation

Nozzleverse

A Virtual Reality application for monitoring 3D printers in real-time. Experience your 3D prints in an immersive VR environment with live toolhead tracking and G-code visualization.

Nozzleverse Demo

โœจ Features

  • ๐Ÿฅฝ VR Experience: Full WebXR support for VR headsets (Oculus, HTC Vive, etc.)
  • ๐Ÿ“ก Real-time Monitoring: Live connection to 3D printers via WebSocket
  • ๐ŸŽฏ Toolhead Tracking: Visual representation of nozzle position in 3D space
  • ๐Ÿ“Š G-code Visualization: 3D rendering of print paths and extrusion
  • ๐ŸŽฎ Hand Controllers: Oculus Touch controls with blink locomotion
  • โšก Live Updates: Real-time printer status and progress monitoring

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 16+ with npm
  • 3D Printer with Moonraker API (Klipper/Mainsail/Fluidd)
  • VR Headset (optional for desktop viewing)
  • Modern Browser with WebXR support

Installation

  1. Clone the repository

    git clone https://github.com/msitarzewski/nozzleverse.git
    cd nozzleverse
  2. Install dependencies

    npm run setup
  3. Configure your printer

    cp .env.example .env
    # Edit .env with your printer's IP address
  4. Start the development server

    npm run dev
  5. Open in browser

    • Navigate to http://localhost:8001
    • Put on your VR headset or use desktop mode

โš™๏ธ Configuration

Edit .env file to configure your setup:

# Your 3D printer's IP address
PRINTER_HOST=192.168.1.233
PRINTER_PORT=80

# Server settings
SERVER_PORT=8001

# VR display settings
VR_SCALE_FACTOR=0.1
TOOLHEAD_COLOR=red

Supported Printers

  • Klipper with Moonraker API
  • Mainsail
  • Fluidd
  • Any printer with Moonraker WebSocket API

๐ŸŽฎ Usage

VR Mode

  1. Connect your VR headset
  2. Open the application in a WebXR-compatible browser
  3. Enter VR mode when prompted
  4. Use hand controllers to navigate around the virtual print bed
  5. Watch your print progress in real-time!

Desktop Mode

  • Use mouse to look around
  • WASD keys to move
  • Observe printer status and toolhead movement

Controls

  • Blink Locomotion: Point and click to teleport
  • Hand Tracking: Natural hand movements for interaction
  • Real-time Updates: Automatic connection to printer

๐Ÿ—๏ธ Development

Development Server

npm run dev          # Start development server
npm run stop         # Stop running server
npm run build        # Run lint and config check
npm run lint         # Check code syntax
npm run test-server  # Test if server is running
npm run logs         # View server logs

Project Structure

nozzleverse/
โ”œโ”€โ”€ server.js           # Node.js Express server with WebSocket proxy
โ”œโ”€โ”€ config.js           # Configuration management
โ”œโ”€โ”€ gcode.html          # VR application frontend
โ”œโ”€โ”€ js/
โ”‚   โ””โ”€โ”€ GCodeLoader.js  # G-code parsing and visualization
โ”œโ”€โ”€ gcodes/             # G-code files directory
โ”œโ”€โ”€ .env.example        # Configuration template
โ”œโ”€โ”€ .nvmrc              # Node.js version specification
โ”œโ”€โ”€ eslint.config.js    # Code linting configuration
โ””โ”€โ”€ README.md

Architecture

graph TD
    A[VR Client] -->|WebSocket| B[Node.js Server]
    B -->|Proxy| C[3D Printer Moonraker]
    A -->|Loads| D[G-code Files]
    A -->|Renders| E[Three.js Scene]
    E -->|Updates| F[VR Headset]
Loading

๐Ÿ”ง Troubleshooting

Common Issues

๐Ÿ”Œ Connection Problems

# Check if printer is accessible
ping 192.168.1.233

# Verify Moonraker is running
curl http://192.168.1.233/server/info

๐Ÿ–ฅ๏ธ VR Not Working

  • Ensure WebXR is enabled in browser
  • Check VR headset connection
  • Try desktop mode first to verify functionality

๐Ÿ“‚ G-code Files Not Loading

  • Verify files are in /gcodes directory
  • Check file permissions
  • Ensure printer is actively printing

๐ŸŒ Server Issues

# Check JavaScript syntax and style
npm run lint

# View server logs
npm run logs

# Test configuration
npm run check-config

# Check if server is running
npm run test-server

Debug Mode

Enable debug logging in .env:

DEBUG=true
LOG_LEVEL=debug

๐Ÿ›ฃ๏ธ Roadmap

๐Ÿ”’ Security & Configuration

  • Input validation for WebSocket messages
  • Rate limiting for WebSocket connections
  • SSL/TLS support for production deployments
  • Multi-printer configuration support

โšก Performance Improvements

  • G-code parsing caching system
  • Progressive loading for large G-code files
  • WebSocket message throttling
  • Optimized Three.js rendering pipeline

๐ŸŽจ User Experience

  • Connection status indicators
  • Automatic WebSocket reconnection
  • Loading states and progress bars
  • Printer status dashboard (temperatures, bed level)
  • Print progress visualization on model
  • Multi-language support

๐ŸŽฎ VR Features

  • Hand gesture controls for zoom/pan
  • Layer-by-layer visualization controls
  • Teleportation boundaries and safety zones
  • Voice commands for common actions
  • Haptic feedback for interactions

๐Ÿ”ง Technical Enhancements

  • REST API for printer management
  • Database storage for print history
  • Plugin system for custom visualizations
  • Mobile app companion
  • Cloud synchronization

๐Ÿญ Production Features

  • Docker containerization
  • Kubernetes deployment manifests
  • Monitoring and alerting
  • Backup and recovery procedures

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and test thoroughly
  4. Follow code style: Run npm run lint
  5. Submit a pull request with detailed description

Development Guidelines

  • Follow existing code conventions
  • Add tests for new features
  • Update documentation for changes
  • Test with real printer hardware when possible

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

  • A-Frame - WebXR framework
  • Three.js - 3D graphics library
  • Node.js - JavaScript runtime
  • Express - Web application framework
  • Moonraker - Klipper API server
  • 3D Printing Community - Inspiration and feedback

๐Ÿ“ž Support


Made with โค๏ธ for the 3D printing and VR communities

About

A Virtual Reality application for monitoring 3D printers in real-time. Experience your 3D prints in an immersive VR environment with live toolhead tracking and G-code visualization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors