ALVR icon indicating copy to clipboard operation
ALVR copied to clipboard

v21.0.0 Release Todos

Open zmerp opened this issue 3 years ago • 18 comments

To be done not earlier than just before releasing v21.0.0 stable, or after there was a devXX bump.

  • [x] Remove ClientControlPacket::VideoErrorReport
  • [ ] Merge ControlSocket with StreamSocket
  • [ ] Refactor packet protocol
    • [ ] Make prefix data little-endian
    • [ ] Make packet length contain itself (add 4 bytes to the count)
    • [ ] Remove extra 4 bytes to the max shard length
  • [x] Send combined eye gaze with separate field
  • [x] Send eyes already in local head space.
  • ~~[ ] Use a json string in place of the VideoStreamingCapabilities packet.~~ Using ext_str instead
  • [x] Make multimodal input protocol default
  • ~~[ ] Send velocity for skeletal hand tracking~~ decided not to do/not needed
  • ~~[ ] Use mesh foveated rendering~~ deferred. Needs protocol support to negotiate disabling FFE.
  • ~~[ ] Add static controller offsets on the client and make parameter exposed by dashboard default to [0,0,0]~~ was done already in v20
  • [ ] Include DecoderConfig packet in the video frame header, to avoid having to request another IDR and resend the DecoderConfig two times.
  • [x] Make ~~all~~ some stream header packets extensible with a ~~Vec<u8> (don't use json)~~ String decoded with json. Values can only be appended and not removed. ~~Alternatively investigate CapnProto or Flatbuffers which support protocol extensions natively.~~ overkill
  • [x] Use mutually exclusive tracking sources (e.g. 2 eyes or combined gaze, fb or htc face tracking, fb or pico body tracking), and wrap it with Option.
  • [x] Remove limited range encoding support
  • [ ] Change dashboard API to not require a body for requests. This aligns better with the ureq 3.0 API, and standard HTTP practices
  • [ ] Reorder settings: create SteamVR tab, rename headset to Tracking, for each tracking method, put source settings in Tracking and sink in SteamVR or Extra->Sinks (for example OSC/UDP/VMC)
  • [ ] Switch to bincode 2.0

zmerp avatar Jul 03 '23 06:07 zmerp

Adding some of my own additions:

  • Headset and controller types default to Automatic instead of Quest 2, driven by the client
    • I think it'd be neat to allow a headsets to send controller data and display a single tracked gamepad instead, maybe. Or at least differentiate between Joy-Con and whatever SLAM controllers might exist on AVP. Also, maybe differentiate controllers vs the Logitech stylus on Quest headsets.
  • Write-only SteamVR settings JSON, separate from session.json
  • (Tangential to mesh FFR) Allow padding at the edges of the video stream so that Weird Resolutions can be used?
  • Event signaling from OpenVR -> client, to allow passthrough to be driven by SteamVR
    • ie SteamVR sees a settings change, checks if passthrough was turned on, tells client to activate passthrough shaders
  • Extra video streams for alpha channel and/or depth or motion vectors? I'm less certain about this now, I think SteamVR composites all apps into a single layer.
  • Change headset FPS at runtime based on app performance?
    • Would need to handle the possibility of the client not being able to switch, due to passthrough constraints or whatever else.
  • Per-frame view transforms that don't cause SteamVR to hiccup, maybe?
    • Ocular parallax for instance can be simulated as a per-frame IPD change
    • Vision Pro also has 'comfort options' to introduce (I believe, not certain) a software-based vertical IPD (vertical offsets might also exist in other headsets as a display calibration thing, worth verifying)
  • Chaperone APIs for the client maybe

shinyquagsire23 avatar Nov 02 '24 02:11 shinyquagsire23

@shinyquagsire23 Your points are either don't need to be protocol breaks (they can be protocol extensions) or may take too long to be included in v21 assuming you haven't started working on it. For FFR i'm thinking we should leave it out, because we need to have android + windows + linux implementations which will take a long time. The idea is to first switch both windows and linux to wgpu like the client so it will be far easier to do all at once

zmerp avatar Nov 02 '24 13:11 zmerp

Yeah I'm mostly just spitballing on things that could be marginally improved if a protocol break is already happening. ie headset info is only sent as a single string and it gets kinda iffy to change that back to usable information on the streamer, IMO it could split out info a bit more to help futureproofing (ie A Quest 3 could split as manufacturer=Meta type=Quest subtype=Quest 3, so if the Quest 4 comes out the streamer could match on Meta and Quest and then the subtype could have aesthetic fallbacks targeted at Quests).

shinyquagsire23 avatar Nov 02 '24 19:11 shinyquagsire23

@shinyquagsire23 I understand what you're saying, but we can still have a universal generic fallback. it's not a big deal, to avoid that the user should have both client and server on the same version. So, let's also keep the display name as string, passing it as a Platform variable could fail deserialization. On the server side we should try to match one by one the strings.

Indeed we could make things clearer and rename display_name to platform.

zmerp avatar Nov 02 '24 20:11 zmerp

Proposal: Compression on tracking packets (zstd? needs to be fast to compress and decompress).

  • JSON will compress down much smaller for any shenanigans similar to the v20 don't-break-the-protocol changes
  • Compression reduces network latency because the last byte arrives faster
  • Probably also good for serialized FP32, the upper bits are probably repetitive enough to save a few bytes.
  • Should be optional per-packet via header u8 in case compression makes the result larger. Could be something like 0=uncompressed, 1=zstd, 2=[future new compression]. Kinda iffy on supporting different compression formats but it could be negotiated on connect.

shinyquagsire23 avatar May 09 '25 20:05 shinyquagsire23

needs to be fast to compress and decompress

lz4?

curoviyxru avatar May 09 '25 21:05 curoviyxru

@curoviyxru yeah LZ4 might be a better match, the compression+decompression time just has to be faster than the time it would take to send the byte difference between compressed and decompressed bytes over the network. I'd probably want to benchmark both just to be sure.

shinyquagsire23 avatar May 09 '25 21:05 shinyquagsire23

For compressing the tracking packet I was thinking of some ad hoc algorithm. A Pose could be compressed from 28 bytes to 12 bytes (DeviceMotion would be from 52 to 24). Vec3 can be represented by 3 u16. We can represent a space which is 20x20x20 meters with a precision of 0.3mm (this conversion could be configurable). The advantage over f16 is that we don't get degraded precision just by moving a couple of meters away from the center. Quat can be represented by a 3 component u16 vector using rodrigues formula. The size of the vector space would be 2pi x 2pi x 2pi. This has a precision of 0.0001 radians (or 0.005 deg). For the angular acceleration we may want to stick to f16 instead

@shinyquagsire23 personally i don't like the idea of compressing the data using any other compression methods, it may end up significantly slower, or at least more complex than needed

zmerp avatar May 10 '25 03:05 zmerp

@zmerp So, I've run tests on quantization at least in the context of hand tracking, int16 is probably my minimum but that was in view/camera space. And yeah fp16 is garbage. I'd be nervous applying int16 to velocities and head poses in particular in world space, 0.3mm will quickly become noticable at higher res and I'm not sure there's a good way to mask the quantization with dithering since velocity error would multiply.

To be honest, I have doubts that compressing pose packets will have good latency yields, but it would be good to be sure if there's (lossless) benefits on the table. Also kinda worry that some things like eye tracking might need double precision floats. But in any case I'll look into it and only push for it if the numbers look compelling enough (minimum: 1ms or more latency reduction)

shinyquagsire23 avatar May 10 '25 05:05 shinyquagsire23

The main usecase for this kind of compression is for trackers and skeleton (body/hands). We can choose to exclude head controllers and eyes. (Face tracking on the other hand could have more extreme compression down to 1 byte per parameter). I've heard issues with some people when enabling hand tracking. This is because hand skeleton tips the tracking structure size over the packet MTU, either converting it to a jumbo packet or triggering our packetization and reordering algorithm (i forgot how long ago the report was made).

zmerp avatar May 11 '25 02:05 zmerp

Would be nice if FOV-Tangent was added, it really is a big deal for me at least

psych0oR avatar May 25 '25 07:05 psych0oR

ok I'm officially adding timestamp synchronization to my wishlist, because AVP with wired networking apparently has these network latency molehills and I can't tell whose fault it is lol

More specifically:

  • Streamer: A timestamp from encoding finish to network write() start (ie, the latency of any intermediate memcpys or thread stalls on the streamer)
    • If possible, see if we can get a final timestamp on when write() finishes (to get the actual time it takes the host to push it across the wire)
  • Client: A timestamp at the start of the network read() (how long it takes the client OS/kernel to read contents into memory)
    • If possible, see if we can disambiguate waiting for content to start arriving vs the total transfer time, the former to get a true network-only latency not including bandwidth (though, I think timestamp sync actually gets us this?)
  • Client: A timestamp from network read() end to handing off the contents to the decoder (ie, the latency of any intermediate memcpys or thread stalls on the client)

shinyquagsire23 avatar Jun 29 '25 02:06 shinyquagsire23

Very sorry to bother if it does... but is linux direct mode still beeing worked on? Is it something for v21?

GK-Gaming avatar Nov 25 '25 10:11 GK-Gaming

@GK-Gaming The person that planned to do this is currently busy, he stated he has still plans for this but when this will happen we don't know.

zmerp avatar Nov 25 '25 11:11 zmerp

I have built the latest master build of ALVR streamer and client and noticed that while my face tracking works, my eyes keep facing forward, VRCFT is not receiving any eye tracking data at all and it's zeroed out

I'm not sure if I should add this here or if I should make an issue so if I should make an issue please tell me Streamer is dev12 and Client dev3 and I use the Pico 4 Pro with global firmware Everything works on the latest official build of ALVR

poprox24 avatar Feb 27 '26 12:02 poprox24

I have built the latest master build of ALVR streamer and client and noticed that while my face tracking works, my eyes keep facing forward, VRCFT is not receiving any eye tracking data at all and it's zeroed out

I'm not sure if I should add this here or if I should make an issue so if I should make an issue please tell me Streamer is dev12 and Client dev3 and I use the Pico 4 Pro with global firmware Everything works on the latest official build of ALVR

Try the temp fix here. https://github.com/KouzakiUmi/VRCFT-ALVR/releases/tag/Pico_fix

KouzakiUmi avatar Mar 06 '26 00:03 KouzakiUmi

I have built the latest master build of ALVR streamer and client and noticed that while my face tracking works, my eyes keep facing forward, VRCFT is not receiving any eye tracking data at all and it's zeroed out I'm not sure if I should add this here or if I should make an issue so if I should make an issue please tell me Streamer is dev12 and Client dev3 and I use the Pico 4 Pro with global firmware Everything works on the latest official build of ALVR

Try the temp fix here. https://github.com/KouzakiUmi/VRCFT-ALVR/releases/tag/Pico_fix

Hey sorry for my late response, I'll try it today and will see how it goes

poprox24 avatar Mar 06 '26 20:03 poprox24

Adding Linux direct mode to this https://github.com/alvr-org/ALVR/issues/3396

Vixea avatar Sep 21 '26 06:09 Vixea