Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
197 stars 9 forks source link

Node to return raw tracker positions assigned to user #3222

Open TheBasementNerd opened 2 years ago

TheBasementNerd commented 2 years ago

Is your feature request related to a problem? Please describe.

To accurately read the data from a user's trackers at the moment (as far as I know) it is required to directly reference the tracker slots of that user, and there is no way to identify which body or tracker is being referenced. This results in any program attempting to accurately read the users positional data will be lagged by having to read avatar references or inaccurately search through the user root for trackers

Relevant issues

No response

Describe the solution you'd like

A node that can accept either a tracker index or relative body node (trackers in this case including the hand and head position trackers) and output its positional data in the world or user space, as well as possibly gain other information such as gyroscopic readouts or force data

Describe alternatives you've considered

Searching through a user root for tracker names such as the name of the visuals, and reading for the parent to gain positional data within the user space

Additional context

The reason for this request is that I plan to begin work on systems that require force-accurate readouts and positional data of the user as directly as possible, in order to account for human speed and error, as following the avatar or the layered systems that currently exist will introduce lag I believe too significant for these systems to be reliable and process the data as needed. I also believe it will assist in other highly technical and precise systems, such as fine gesture controls or accounting for translating real world tracking into Neos on non-traditional items that may not be hardcoded

Frooxius commented 2 years ago

What makes you think that the data is lagged?

The trackers and positions update in a special early input update phase in the engine, before majority of components/LogiX run, so you should have the most up to date data available to the engine.

I don't see the need for this, as you wouldn't get any more up to date information this way.

TheBasementNerd commented 2 years ago

The lag results from having to read the avatar data, such as grabbing a relative body node then global position. There's also, as far as I know, no way to tell which tracker grabbed from under the root by an automatic system correlates to where on the body its assigned, and there's no way to grab the position of the head or hands tracker I believe, unless the position of the view and left/right controller under User Root provides this direct info?

Frooxius commented 2 years ago

Why do you think that results in lag? Those positions already have the latest data when you read them.

TheBasementNerd commented 2 years ago

I might be mistaken on what I believe its reading, as I had thought it was reading the bone positions but does the body node slot return something that's processed before the IK is? Also would the body node slot return positions of user hands and such if they were longer than the avatar for example? Or will it stay reading where the avatar hand is located in the world, and not the tracking data of the user's hand

TheBasementNerd commented 2 years ago

Also the body node slot or the position nodes under User Root in Users don't return values if the user is in an avatar that doesn't contain them I believe, such as reading the feet of a head and hands avatar

Frooxius commented 2 years ago

If you're getting the tracker itself, that's pretty much the raw position in the user root space, before any processing.

You get IK processed positions if you reference the bones on the avatar, but the IK is still evaluated early.

TheBasementNerd commented 2 years ago

Yes, but there is no easy way to get that tracker consistently or relative to the body

Frooxius commented 2 years ago

You stated that the issue was that there is a lag when you get it that way, that's the part I'm talking about.

Hayden-Fluff commented 2 years ago

This would be useful for other things, in example visualizing trackers using custom models (for something like 3.0 Vive trackers or otherwise) and as far as I know the only way to do this is by using TrackedDevicePositioner, which from what I've seen, causes unpredictable behavior when patented under an avatar.

TheBasementNerd commented 2 years ago

You stated that the issue was that there is a lag when you get it that way, that's the part I'm talking about.

That was in reference to requiring reference to the avatar in order to get positions consistently, rather than reading trackers directly

Frooxius commented 2 years ago

I feel like we're talking about bunch of different issues here. If you're getting the unbound trackers, you shouldn't need to have avatar at all, the references are there before they even happen.

If you want to figure out what body nodes are the trackers bound to, that's a different issue, but it doesn't really have much to do with latency.

We can add mechanisms to bind other things to trackers, but that's a bit complex - it'll need some way to identify the tracker and bind whatever you want to bind to it.

TheBasementNerd commented 2 years ago

The issue I was approaching is difficulty getting unbounded trackers, and wanting to try and grab what they're relative to as dictated by the full body tracking setup, as the current way to get the trackers that are under user root returns them with absolutely no info about what that tracker is defined for, just its transforms

Frooxius commented 2 years ago

I think there's some misunderstanding on how the system works. What you're requesting is mutually exclusive - you want to get unbound trackers, but at the same time you want to get what they're relative to - in other words what they're bound to.

Unbound trackers are just that - they're not bound to anything.

If you want bound poses, then I'd recommend binding to body nodes with the AvatarPoseNode component. Knowing more specifics about what you're trying to do could help.

shiftyscales commented 2 years ago

@Frooxius In discussing it with her, Basement's issue is specifically in finding the slots of the trackers generated in the user root.

E.g. for controllers there is the Left/Right Controller slot which is also available as a body node.

The reason the existing feet body nodes are unsuitable is because their streams are smoothed based on the user's settings, so neither the avatar's bones nor the proxy slots are suitable in this case.

The reason she was wanting to also know the corresponding body node the tracker is bound to is for use in a Martial Arts system, she wished to a high degree of accuracy determine the user's tracked device velocity at the point of impact.

TheBasementNerd commented 2 years ago

I also wanted to get accurate measurements of their tracker placements in order to determine real life pose positions and such, as in most martial arts the stance you hold is extremely important for what you're doing, and the height and such of things like kicks or strikes in relation to other parts of your body come into play heavily