Experimental Valve Index camera passthrough for Linux

Overview

Index camera passthrough

Warning: This is still a work in progress, you could get motion sickness if you try it now

The problem that the Index camera doesn't work on Linux has been there for a long time, see ValveSoftware/SteamVR-for-Linux#231. And Valve doesn't seem to be willing to address it. So I decided to throw something together.

Features

  • Stereo overlay: the overlay in your game world that acts as a portal to real world. Meaning you see in 3D. (disabled by default, see the example config file for how to enable and more options.)
  • You can configure the overlay to be in one place, or stay in front of you.
  • Use camera calibration data from your Steam installation.
  • Show/hide passthrough with button presses

See also the example config file

TODO

  • Add option to make overlay follow controller.
  • (Unrealistic) implement Valve's "3D" passthrough. To do this we essentially need to do 3D reconstruction from the stereo camera. There are existing methods, but will be really challenging to implement.

Contribute

You can test this out and report your experience to help this improve.

If you have any suggestions about features, or how to make the passthrough look better, please let me know. I am not a graphics programmer and am trying my best to get things work, but solutions I came up with is definitely not going to be as good as things can be.

Please help me out.

Build instruction

To build this program, you need:

  • Rust (How to install, you need to select the nightly channel)
  • OpenVR
  • Vulkan

Make sure you run

git submodule update --init

in the repository first, then run

cargo build --release

Usage

Run from Steam library

After you have built the program, copy it to /usr/local/bin

cp ./target/release/index_camera_passthrough /usr/local/bin

And then add the index_camera_passthrough.desktop file to your Steam Library.

Run directly

To run this program, you can either

cargo run

or run the binary directly

./target/release/index_camera_passthrough
You might also like...
Freebsd-embedded-hal - Like linux-embedded-hal but FreeBSD

freebsd-embedded-hal Implementation of embedded-hal traits for FreeBSD devices: gpio: using libgpio, with stateful and toggleable support, with suppor

Fox Ear is a Linux process behavior trace tool powered by eBPF
Fox Ear is a Linux process behavior trace tool powered by eBPF

Fox Ear Fox Ear is a Linux process behavior trace tool powered by eBPF. Banner image by Birger Strahl on Unsplash. Features Log process and its subpro

Auto Fan Management Utility in Linux Systems for Monster Laptops
Auto Fan Management Utility in Linux Systems for Monster Laptops

Auto Fan Management Utility in Linux Systems for Monster Laptops Monster Laptoplar için Linux Sistemlerde Oto Fan Yönetimi TR Monster laptoplar gömülü

A memory profiler for Linux.
A memory profiler for Linux.

Bytehound - a memory profiler for Linux Features Can be used to analyze memory leaks, see where exactly the memory is being consumed, identify tempora

Utility for controlling laptop backlight brightness on Linux.

Licht Utility for chaning laptop backlight brightness, supporting different stepping modes. Usage licht USAGE: licht [OPTIONS] SUBCOMMAND OPT

🔮 ChatGPT Desktop Application (Mac, Windows and Linux)
🔮 ChatGPT Desktop Application (Mac, Windows and Linux)

ChatGPT ChatGPT Desktop Application 📦 Install 📝 Update Log 🕒 History versions... Windows From our github releases: ChatGPT_0.7.4_x64_en-US.msi Or i

OpenAI ChatGPT desktop app for Mac, Windows, & Linux menubar using Tauri & Rust
OpenAI ChatGPT desktop app for Mac, Windows, & Linux menubar using Tauri & Rust

ChatGPT Desktop App Unofficial open source OpenAI ChatGPT desktop app for mac, windows, and linux menubar using tauri & rust. Downloads Windows (2.7 M

Web-wrapped Supabase desktop app for macOS, Windows & Linux powered by Tauri
Web-wrapped Supabase desktop app for macOS, Windows & Linux powered by Tauri

Supabase Desktop App What is it? It's a cross-platform web-wrapped Supabase desktop app powered by Tauri. You can install it on your macOS, Windows (u

NewBin Desktop Application (Mac, Windows and Linux)
NewBin Desktop Application (Mac, Windows and Linux)

NewBing NewBing Desktop Application (Windows Mac Linux) Install Windows NewBing_0.0.1_x64_en-US.msi Mac NewBing_0.0.1_x64.dmg Usage Recommended Rust (

Comments
  • Requires nightly/pre-release rust

    Requires nightly/pre-release rust

    With a standard rust install, building gives the error

    error[E0554]: `#![feature]` may not be used on the stable release channel
     --> openvr_sys/src/lib.rs:1:1
      |
    1 | #![feature(untagged_unions)]
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    For more information about this error, try `rustc --explain E0554`.
    

    The readme should note the requirement of pre-release rust.

    opened by ChrisJAllan 2
  • Missing file: splash.png

    Missing file: splash.png

    It seems a file named splash.png should be included in the source, but is not.

    error: couldn't read /home/claire/GIT/index_camera_passthrough/splash.png: No such file or directory (os error 2)
      --> src/main.rs:50:30
       |
    50 | static SPLASH_IMAGE: &[u8] = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/splash.png"));
       |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
    
    error: could not compile `index_camera_passthrough` due to previous error
    

    Creating a blank 1920×960 png works fine.

    opened by ClearlyClaire 1
  • Events module not included

    Events module not included

    The build fails with:

    error[E0583]: file not found for module `events`
     --> src/main.rs:4:1
      |
    4 | mod events;
      | ^^^^^^^^^^^
      |
      = help: to create the module `events`, create file "src/events.rs" or "src/events/mod.rs"
    
    error: couldn't read /home/chris/Projects/index_camera_passthrough/splash.png: No such file or directory (os error 2)
      --> src/main.rs:50:30
       |
    50 | static SPLASH_IMAGE: &[u8] = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/splash.png"));
       |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
    
    error[E0433]: failed to resolve: could not find `Action` in `events`
       --> src/main.rs:522:21
        |
    522 |             events::Action::ShowOverlay => vroverlay
        |                     ^^^^^^ could not find `Action` in `events`
    
    error[E0433]: failed to resolve: could not find `Action` in `events`
       --> src/main.rs:526:21
        |
    526 |             events::Action::HideOverlay => vroverlay
        |                     ^^^^^^ could not find `Action` in `events`
    
    error[E0433]: failed to resolve: could not find `State` in `events`
       --> src/main.rs:367:29
        |
    367 |     let mut state = events::State::new(cfg.toggle_button, cfg.open_delay);
        |                             ^^^^^ not found in `events`
        |
    help: consider importing this enum
        |
    10  | use serde_json::ser::State;
        |
    

    It seems b868aa5 didn't bring in the required ~~package~~ file

    opened by ChrisJAllan 1
  • Program runs without errors but the overlay doesn't appear

    Program runs without errors but the overlay doesn't appear

    I built from a current checkout (cloned right before I built). I used rust nightly to compile.

    I'm using Arch Linux, I did have some packages out of date, but not ones relating to steam or graphics. I have a NVIDIA GTX 1070 using proprietary drivers and I'm running steam with the native runtime.

    I tried the menu button binding and the trigger binding. I have camera disabled in the SteamVR settings. Steam and SteamVR were up to date. SteamVR version is 1.22.6 Beta. I couldn't find a version number for Steam.

    I was using the "Stereo" display mode.

    opened by mpnordland 0
Owner
yshui
Slave of their creations
yshui
An experimental programming language for exploring first class iterators.

An experimental programming language for exploring first class iterators.

Miccah 4 Nov 23, 2021
Experimental syntax for Rust

Osy.rs Experimental syntax for Rust Hey everyone, this readme needs work! The spec has been roughed out in Osy.rs_spec.alpha, but the file could be be

null 3 Dec 17, 2021
An experimental Rust crate for sigstore

Continuous integration Docs License This is an experimental crate to interact with sigstore. This is under high development, many features and checks

sigstore 89 Dec 29, 2022
Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code

Diplomat is an experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code. With Diplomat, you can simply define Rust APIs to be exposed over FFI and get high-level C, C++, and JavaScript bindings automatically!

null 255 Dec 30, 2022
An experimental implementation of Arc against Apache Datafusion

box This is an experimental repository to perform a proof of concept replacement of the Apache Spark executor for Arc with Apache DataFusion. This is

tripl.ai 1 Nov 26, 2021
An experimental transpiler to bring tailwind macros to SWC 🚀

stailwc (speedy tailwind compiler) This is an experimental SWC transpiler to bring compile time tailwind macros to SWC (and nextjs) a-la twin macro. T

Alexander Lyon 139 Dec 20, 2022
An experimental RISC-V recompiler

WARNING: All of this code is highly experimental and is a direct result of a two day hacking binge fueled by a truckload of tea. It's definitely not s

Koute 13 Apr 2, 2023
An experimental Athena extension for DuckDB 🐤

DuckDB Athena Extension WARNING This is a work in progress - things may or may not work as expected ??‍♂️ Limitations Only the default database is sup

Damon P. Cortesi 34 Apr 3, 2023
A lite tool to make systemd work in any container(Windows Subsystem for Linux 2, Docker, Podman, etc.)

Angea Naming from hydrangea(アジサイ) A lite tool to make systemd work in any container(Windows Subsystem for Linux 2, Docker, Podman, etc.) WSL1 is not s

いんしさくら 16 Dec 5, 2022
bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux!

bustd: Available memory or bust! bustd is a lightweight process killer daemon for out-of-memory scenarios for Linux! Features Small memory usage! bust

Pop!_OS 8 Oct 6, 2022