Pioneer head tracking demonstration

Post Reply
Keeper
Posts: 97
Joined: Thu Jan 04, 2018 9:23 pm
Location: Indian Hills, Nevada, USA
Contact:

Pioneer head tracking demonstration

Post by Keeper »

bszlrd
Posts: 1084
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Pioneer head tracking demonstration

Post by bszlrd »

I really should fix that cockpit model, it's abysmal.
impaktor
Posts: 1008
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Pioneer head tracking demonstration

Post by impaktor »

cool!
Keeper
Posts: 97
Joined: Thu Jan 04, 2018 9:23 pm
Location: Indian Hills, Nevada, USA
Contact:

Re: Pioneer head tracking demonstration

Post by Keeper »

nozmajner wrote: Sat Feb 09, 2019 9:44 am I really should fix that cockpit model, it's abysmal.
Even just removing the big disc on the right side would be all right. (I also modified the textures to get rid of absolute white/black/red/green/blue values so the lighting/shading has room to breathe.) I just think of it like a "virtual cockpit" that the pilot sees through a VR system attached to cameras around the ship -- this is why you can even look behind you and straight down and such without your own ship getting in the way.

Any ideas about how to smooth out the mouse-control camera movements?
bszlrd
Posts: 1084
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Pioneer head tracking demonstration

Post by bszlrd »

It's actually a cockpit capsule, with monitors all around, that's why it doesn't match the ship at all. I have a replacement model in the freezer, but didn't had the capacity to work on it for quite a while now.
Keeper
Posts: 97
Joined: Thu Jan 04, 2018 9:23 pm
Location: Indian Hills, Nevada, USA
Contact:

Re: Pioneer head tracking demonstration

Post by Keeper »

(Your link is the same as this post.)

I was playing yesterday, now that I got the tracking to work, but eventually I messed something up which caused the Windows cursor to appear on screen, then a short time later the mouselook stopped functioning, and eventually the game crashed to desktop. I think it was either from Alt-Tabbing in and out of the game, or maybe I hit the middle mouse button on the mouse while the UCR program was already holding the middle mouse button, which confused things.

Since I'm now editing the source to get the smoother mouselook on anyway, I think for now I'll try to invert the middle mouse button function in my build of the game -- basically change the internal camera control from if MMB to if !MMB and do the same for the code that hides the mouse cursor (if it is in a different place; that I don't know yet), the effect of which would be that mouselook would be on by default, and holding the middle mouse button would only be needed when actually using the mouse. This would allow temporary disconnection of mouselook without having to turn off my headtracker's camera, which would make things quicker, but also less likely to cause problems by basically having the middle button pressed most of the time. (If it crashes when I'm using mouse at a station, no big deal as I would have just saved the game anyway.)

Of course, the ideal solution -- for all users and not just my own installation -- would be to introduce axis control of the internal camera similar to how currently we can set an axis to control the external camera. Then a headtracker could just be set up as a virtual joystick, which is super easy for the end user to do. The difference would be in how the axis input is treated. The external camera treats the axis data as camera speed setting ("move the camera at the indicated speed"), rather than absolute direction ("move the camera to the indicated position"). So the code would have to be more like how the rotational damping thruster code is set ("make the ship turn at the indicated speed"). I imagine a max value along the axis would equal 180 degrees, so if you move your stick all the way right/left/up/down, the forward view would become a rear view.

While I think all the code to do this is already in place throughout the game, just needing to be copied and slightly modified here and there, I'm not sure I'd be able to accomplish that as I'm no programmer. (I have no idea how the game sets up an input axis, etc.) Any help toward that? It would be useful for plenty of users, I think, as it does make the use of head trackers very simple indeed. Only two axes should be set -- no roll, as the UI of the game is not equipped to indicate to the player that the camera is rolled. (Until such time as 3D cockpits are a real thing, anyway.)

I'll poke around and see what I can find. Not sure I can succeed in this, but I'm sure you programming boffins could do it pretty easily.
Keeper
Posts: 97
Joined: Thu Jan 04, 2018 9:23 pm
Location: Indian Hills, Nevada, USA
Contact:

Re: Pioneer head tracking demonstration

Post by Keeper »

Hmm. While I was able to get it to have mouselook going when the button wasn't pressed, I couldn't figure out how to hide the mouse cursor by default or require the middle mouse button to bring up the mouse cursor.

And as for the most desirable solution, I can't figure out how the regular external camera even gets joystick axis data to even begin trying to use a similar method to move the internal camera. Like I said, I'm no programmer, so it's real stab-in-the-dark stuff for me.
bszlrd
Posts: 1084
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Pioneer head tracking demonstration

Post by bszlrd »

Damnit, I wasn't paying attention. I've updated the link.
Keeper
Posts: 97
Joined: Thu Jan 04, 2018 9:23 pm
Location: Indian Hills, Nevada, USA
Contact:

Re: Pioneer head tracking demonstration

Post by Keeper »

With the more up-close-and-personal views I get with the modified FOV, the "pop-up" on the terrain detail as I get closer to a planet surface is even more evident. As I have plenty of CPU & GPU to spare, I'd like to change the distances at which the terrain details lessen. I've tried editing a bunch of different values but no to avail (only some really weird stuff when the value was for something else!).

Anyone know where in the source I should be looking? Clearly I'm missing something...
impaktor
Posts: 1008
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Pioneer head tracking demonstration

Post by impaktor »

Link to other thread on forum here:
Head tracking with Opentrack/Freetrack
Post Reply