World-locked overlays swim/counter-rotate with head movement, only while SteamVR Home is the scene app (Steam Link, Pico 4)

Aperta
#1,055 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
43/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
desktop

Direzione di ricerca

Start by reviewing the attached world_overlay_test.py and the encoded Steam Link dump, especially the frames around 2457 and 2919. The report points to a compositor or SteamVR Home interaction, but does not identify the relevant implementation files or subsystem entry points. Done means world-locked overlays stay fixed against Home during head movement, with the jump eliminated and behavior matching other scene apps.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Your system information

  • Steam client version (build number or date): 1792618285 (stable)
  • SteamVR version: 2.18.4 (stable, build 25998080)
  • Distribution: CachyOS, kernel 7.3.0-4-cachyos, KDE Plasma 6.8.1 (Wayland)
  • GPU / driver: NVIDIA RTX 4080, 615.78.08
  • Headset: Pico 4 via Steam Link (qvlclient 2.0.22.2252)
  • Opted into Steam client beta?: No
  • Opted into SteamVR beta?: No
  • Have you checked for system updates?: Yes

Describe the bug

Any overlay placed in the world (absolute transform, or a dashboard window pinned with "show this window in world") doesn't stay fixed while SteamVR Home is running. When I turn my head, the overlay looks like it rotates the opposite way: look up and it tilts as if facing down, look left and it seems to turn right. Every so often it also jumps down and to the right for a frame or two, then snaps back.

It only happens in Home, in every Home environment I've tried. The same overlays are solid in the empty SteamVR staging area, No Man's Sky, Elite Dangerous and Pistol Whip. The dashboard itself, controller models and the Home scene all look correct. It isn't caused by locomotion. Standing still and only moving my head is enough.

I first noticed it with WivRN, then with my own overlay app, so it isn't specific to one overlay.

What I've checked

  • Home isn't struggling - compositor stats for the Home session show under 1% dropped frames, 0 reprojected, app GPU time 4–7 ms at 90 Hz.
  • Async reprojection is off (the compositor log says it's disabled by default here).
  • VROverlayFlags_SortWithNonSceneOverlays on or off makes no difference.
  • Home's geometry doesn't occlude the overlay, so it is the compositor drawing it I think, not Home itself.

It's already wrong in the encoded stream

I recorded the Steam Link output with VRLINK_DUMP_BITSTREAM=1 and compared frames 6 apart (about 67 ms). Home's scene between two frames fits a single homography to within 0.2–0.4 px (SIFT features, overlay masked out), which is what you'd expect for head rotation. The overlay doesn't follow that homography:

head motion between frames scene fit error overlay corner error
still (0–5 px) 0.24 px 1.0 px
5–20 px 0.17 px 2.6 px
20–50 px 0.31 px 12.5 px
50+ px 0.36 px 18.4 px (max 26)

During head movement the overlay moves about 10% further than the scene does (ratio 1.10, same in both eyes). There's also a one-off jump of about 86 px at dump frame 2457 (0.63 s into the attached clip), which matches the glitch I see in the headset. Because it's already baked into what the PC sends, I don't think the headset side is involved.

Attached:

  • home-overlay-mismatch-left-eye.mp4: 18 s of the left-eye wide view from the dump, 90 fps, in Home with the test overlay. Easiest to see when stepping frame by frame while the head turns.
  • overlay-vs-scene-frame2919.png: dump frame 2919 (5.77 s into the clip) with the overlay as streamed (red) and where it would be if it had moved with the scene since 6 frames earlier (green).
  • world_overlay_test.py: the overlay I used (pyopenvr + PySide6). It shows a 2 m grid panel 2 m in front of the HMD with setOverlayTransformAbsolute in the standing universe.

To Reproduce

  1. Start SteamVR with Steam Link and load into any SteamVR Home environment.
  2. Run world_overlay_test.py (or pin any window in world from the dashboard).
  3. Look up/down/left/right at a normal speed. The panel swims against the head movement.
  4. Leave Home for the staging area or start any game. Same panel, no problem.

Expected behavior

World-locked overlays stay fixed relative to the Home scene, the same as they do over every other scene app.

Happy to attach a SteamVR system report or record another dump if that helps.

Code I used for the overlay:

import math, os, signal, sys, time

os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
from PySide6.QtGui import QGuiApplication, QImage, QPainter, QColor, QFont, QPen
from PySide6.QtCore import Qt
import openvr

HERE = os.path.dirname(os.path.abspath(__file__))
PNG = os.path.join(HERE, "world_test.png")
W_M, DIST = 2.0, 2.0


def make_image():
    app = QGuiApplication(sys.argv)
    img = QImage(1600, 900, QImage.Format_RGBA8888)
    img.fill(QColor(20, 24, 32))
    p = QPainter(img)
    p.setPen(QPen(QColor(80, 200, 255), 2))
    for x in range(0, 1601, 100):
        p.drawLine(x, 0, x, 900)
    for y in range(0, 901, 100):
        p.drawLine(0, y, 1600, y)
    p.setPen(QPen(QColor(255, 80, 80), 8))
    p.drawRect(4, 4, 1592, 892)
    p.drawLine(800, 0, 800, 900)
    p.drawLine(0, 450, 1600, 450)
    p.setPen(QColor(255, 255, 255))
    f = QFont("Sans", 64, QFont.Bold)
    p.setFont(f)
    p.drawText(img.rect(), Qt.AlignCenter, "WORLD TEST\n" + os.environ.get("LABEL", ""))
    p.end()
    img.save(PNG)
    del app


def main():
    make_image()
    vr = openvr
    system = vr.init(vr.VRApplication_Overlay)
    ov = vr.IVROverlay()
    h = ov.createOverlay("vr_theatre_test.world", "World Test")
    ov.setOverlayFromFile(h, PNG)
    ov.setOverlayWidthInMeters(h, W_M)

    def place(*_):
        poses = system.getDeviceToAbsoluteTrackingPose(
            vr.TrackingUniverseStanding, 0, vr.k_unMaxTrackedDeviceCount)
        hmd = poses[vr.k_unTrackedDeviceIndex_Hmd]
        if hmd.bPoseIsValid:
            m = hmd.mDeviceToAbsoluteTracking
            fx, fz = -m[0][2], -m[2][2]
            yaw = math.atan2(-fx, -fz) if (fx or fz) else 0.0
            x, y, z = m[0][3], m[1][3], m[2][3]
        else:
            x, y, z, yaw = 0.0, 1.6, 0.0, 0.0
        c, s = math.cos(yaw), math.sin(yaw)
        t = vr.HmdMatrix34_t()
        rows = [[c, 0.0, s, x - s * DIST], [0.0, 1.0, 0.0, y], [-s, 0.0, c, z - c * DIST]]
        for i in range(3):
            for j in range(4):
                t.m[i][j] = rows[i][j]
        ov.setOverlayTransformAbsolute(h, vr.TrackingUniverseStanding, t)
        print(f"placed at x={x:.2f} y={y:.2f} z={z:.2f} yaw={math.degrees(yaw):.0f}deg"
              f" (head pose valid={hmd.bPoseIsValid})", flush=True)

    nonscene = [True]

    def set_sort(*_):
        ov.setOverlayFlag(h, vr.VROverlayFlags_SortWithNonSceneOverlays, nonscene[0])
        print("SortWithNonSceneOverlays =", nonscene[0], flush=True)

    def toggle(*_):
        nonscene[0] = not nonscene[0]
        set_sort()

    running = [True]
    signal.signal(signal.SIGUSR1, place)
    signal.signal(signal.SIGUSR2, toggle)
    set_sort()
    signal.signal(signal.SIGTERM, lambda *_: running.__setitem__(0, False))
    signal.signal(signal.SIGINT, lambda *_: running.__setitem__(0, False))

    place()
    ov.showOverlay(h)
    print("overlay shown; pid", os.getpid(), flush=True)
    ev = vr.VREvent_t()
    end = time.time() + 45 * 60
    while running[0] and time.time() < end:
        while ov.pollNextOverlayEvent(h, ev)[0]:
            if ev.eventType == vr.VREvent_Quit:
                running[0] = False
        if system.pollNextEvent(ev) and ev.eventType == vr.VREvent_Quit:
            running[0] = False
        time.sleep(0.05)
    ov.destroyOverlay(h)
    vr.shutdown()
    print("done", flush=True)


if __name__ == "__main__":
    main()
Image

https://github.com/user-attachments/assets/8a2e206b-0d91-4a73-b5ba-9d1957bb1680

Lingua principale
Shell
Stelle
1.1k
Fork
56
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ValveSoftware/SteamVR-for-Linux

Tutte le issue di ValveSoftware/SteamVR-for-Linux

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.