dfgHiatus / NeosVarjoEyeTracking

Integrates the Varjo's eye tracking into Resonite
MIT License
5 stars 5 forks source link

openness blink soo tightly #2

Closed kazu0617 closed 2 years ago

kazu0617 commented 2 years ago

Hi, i tried to use this one, but checking from neos and code, openness value just check status of gaze, and no threadings, so blinks so tightly. could i get the openness more softly or directly get openness from Varjo Eye Sdk? (i heard about this things from discord.)

kazu0617 commented 2 years ago

Checked from Varjo Native SDK, but this one could be check eyestatus while blinking.

leftStatus and rightStatus return a value for each eye as follows:

0 – eye is not tracked and not visible (e.g., the eye is shut)
1 – eye is visible but not reliably tracked (e.g., during a saccade or blink)
2 – eye is tracked but quality is compromised (e.g., the headset has moved after calibration)
3 – eye is tracked

VarjoCompanion is this one:

        public enum GazeEyeStatus : long
        {
            Invalid = 0,
            Visible = 1,
            Compensated = 2,
            Tracked = 3
        }

so, if openness returns from like this one is better: GazeEyeStatus = smoothvalue (tracked ? 1f : ( Compensated? 0.5f : (Visible? 0.25f : 0f ) )

dfgHiatus commented 2 years ago

This is a good idea! Currently, Varjo's SDK only tracks eye openess as an enum like you've mentioned, I'll make the the changes and let you know when I do

dfgHiatus commented 2 years ago

Ok, I've made a fork of the mod and have poked around with Neos's built-in smoothing. Here is my implementation and the methods we have available: (I should preface I have not used these before, but have an idea of what they do)

image

Likewise, I have created a pre-release of the mod if you want to try it out. I don't own the HMD myself, so I need people to test this on!

https://github.com/dfgHiatus/NeosVarjoEyeTracking/releases/tag/v1.0.5

kazu0617 commented 2 years ago

Thanks, I tried it. but It seems not worked in Local, and It seems already works without SmmothStep in Remote. for detail, I issue at #3 .

kazu0617 commented 2 years ago

Since I didn't know the source code and not posted, decompiled it and compared it to the actual operation.

First, SmmothStep did not seem to work properly. [Failed to ping] was displayed. Second, the Openness of RightEye was assigned "num2" when it should have been "val2". As a result, the left eye did not move, but the right eye did. image

dfgHiatus commented 2 years ago

Oops, it looks like I didn't push the new branch of the changes. I'll push this first thing in the morning tomorrow, thanks for the input!

dfgHiatus commented 2 years ago

I pushed the new branch to "blinking". I'll switch out the smooth step to a smooth lerp if it is not working.

dfgHiatus commented 2 years ago

Added in latest build