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

7 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors