Home Forums Eye Tracking Devices Trying to recreate gaze region indicator as seen in Learn Documentation

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #21432
    Marc Auf der Heyde
    Participant

    Hi there,

    As recommended in the learn section of the TobiiXR documentation, I have been trying to recreate a gaze region indicator, rather than a cursor. I currently have a raw image circle, which I am repositioning based on a raycast using the gaze data onto a Canvas panel. This works, however, the region is continuously flickering, likely because of the high sample rate. I have tried only changing its position every second using Unity’s Time.deltaTime but this has not worked as planned. I would be extremely grateful for any pointers at all regarding how to properly move gaze regions in Unity.

    Kind regards,
    Marc

    #21456
    Grant [Tobii]
    Keymaster

    Hi @marcaufderheyde, as you have realized, it is necessary to filter the gaze signal.

    There are some very basic ones you could use to improve it significantly. Check out this demo page to try out different filters: https://cristal.univ-lille.fr/~casiez/1euro/InteractiveDemo/

    Perhaps you already spotted this, but we have a reusable gaze visualizer in the SDK https://vr.tobii.com/sdk/develop/unity/tools/xr-dev-tools/#a-gaze-visualizer

    You should be able to find a prefab “Gaze Visualizer” or similar and put it under the camera and it should work.

    Let us know how you get on. Best Wishes.

    #21457
    Marc Auf der Heyde
    Participant

    Hi there Grant,

    Thank you so much for getting back to me! I see this as an early Christmas present as I hadn’t gotten any closer to figuring out this issue!

    I’ve been sick with COVID the past week and a half and have been unable to try out different filters, so I will start hopefully tomorrow with trying out some of the examples you linked above! I will update here with my progress!

    Wishing you and the Tobii team a lovely holiday season, and thank you again for coming to my aid!

    Kind regards,
    Marc

    #21481
    Grant [Tobii]
    Keymaster

    Thanks Marc! Do let us know how you get on, would be great to see you project work. Best Wishes.

    #21520
    Marc Auf der Heyde
    Participant

    Hi there,

    I’m finally getting back to work now and have been trying to implement the gaze visualizer found in the developer tools example. When adding it as such to my scene, it works a lot better than the visualizer I had built, due to the applied smoothing, however, the gaze visualizer disappears behind my canvas screen which I am trying to interact with. Do you have any tips on how to use the gaze visualizer to interact with a canvas screen?

    I am currently raycasting my gaze visualizer that I had built onto the canvas screen and using the local raycast position to interact with the canvas screen (a web browser screen). I want to use the gaze visualizer available from Tobii however since it works a lot more smoothly. Alternatively I am trying to apply the smoothing to my own gaze visualizer, but am struggling with this!

    Hope this finds you well, happy to expand on the issue if you need!

    Kind regards,
    Marc

    #21532
    Grant [Tobii]
    Keymaster

    Hi @marcaufderheyde, you should be able to change the render queue of the gaze visualizer material to always render on-top of everything else (even though it is positioned behind something). Usually something Unity allows you to do in the Material.

    And for more precision, position gaze visualizer between canvas and camera, and then adjust render queue so that canvas is not rendered on-top (which it usually is given it is a UI)

    #21533
    Marc Auf der Heyde
    Participant

    Hi Grant,

    Thanks again for getting back to me so quickly. I’ve just finished work for the day so will be unable to test out your suggestion!

    I’ve actually managed to get the gaze visualizer from dev tools visible on my canvas window again, I’m now just trying to figure out how I can use it in the way I need! I need to get the coordinate of it on the canvas window and to freeze the gaze visualizer and manipulate (move to the left/right and up/down) and then act on the new position coordinate. I’ve probably over-complicated the setup, but now I’m not sure how to get it working with your far better visualizer.

    I will continue exploring and keep you updated, thank you again for your quick response!

    Kind regards,
    Marc

    #21534
    Grant [Tobii]
    Keymaster

    Great! looking forward to reading your feedback 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.