5dof support for TrackIR and improved 6dof for VR
Moderator: JeremyaFr
5dof support for TrackIR and improved 6dof for VR
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
I haven't had much time to work on XWA during these holidays; but after the hyperspace effect I finally understood how XWA's coordinate system works (more-or-less anyway). So I figured I could hijack the cockpit shake (that thing that happens when we get hit by lasers or get damage by engine wash) to support positional tracking inside the cockpit look hook. This is what it looks like:
https://www.youtube.com/watch?v=UY93UgHgbcU
There's one drawback to this approach: we'll lose cockpit shake. So, if someone else has figured out a better way to alter the cockpit's camera position/translation, do please let me know
On the other hand, with this hack we get 5dof support for TrackIR (which I believe is pretty much the Endgame for TrackIR since I don't think camera roll would add much); and we also get a much better support for 6dof in VR. I don't actually have TrackIR, so the video above was recorded on the regular game and it's a simulation of what it's going to look like.
I've got one question for TrackIR users, though: which axis is "up"? Is that the Y+ axis perhaps?
https://www.youtube.com/watch?v=UY93UgHgbcU
There's one drawback to this approach: we'll lose cockpit shake. So, if someone else has figured out a better way to alter the cockpit's camera position/translation, do please let me know
On the other hand, with this hack we get 5dof support for TrackIR (which I believe is pretty much the Endgame for TrackIR since I don't think camera roll would add much); and we also get a much better support for 6dof in VR. I don't actually have TrackIR, so the video above was recorded on the regular game and it's a simulation of what it's going to look like.
I've got one question for TrackIR users, though: which axis is "up"? Is that the Y+ axis perhaps?
You do not have the required permissions to view the files attached to this post.
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
A couple more screenshots:
Also, thanks Jeremy for pointing out where the Gunner Turret orientation could be read from and keiranhalcyon7 for requesting that I fix the hyperspace effect for the Gunner Turret. Honestly, keiranhalcyon7's request took me several days of but I think it was well worth it in the end
Also, thanks Jeremy for pointing out where the Gunner Turret orientation could be read from and keiranhalcyon7 for requesting that I fix the hyperspace effect for the Gunner Turret. Honestly, keiranhalcyon7's request took me several days of but I think it was well worth it in the end
You do not have the required permissions to view the files attached to this post.
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
HOLLY Sh....!!!
It finally works without culling or clipping :):):)
Cant wait to test and re-write the fov numbers again to match (since remember I "overscanned" to compensate for viewport clipping)
Trev
It finally works without culling or clipping :):):)
Cant wait to test and re-write the fov numbers again to match (since remember I "overscanned" to compensate for viewport clipping)
Trev
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
That's right, Trevor, no more clipping! (Unless of course, you actually lean so far that you end up outside the cockpit). Sorry; but yes, that means you'll probably have to adjust the FOV once again.
Also, I figured that maybe I could "park" my X-Wing and walk around it, and sure enough:
And it's also possible to duck below the dashboard:
My wife was probably wondering what the hell I was doing crawling on the floor
Also, I figured that maybe I could "park" my X-Wing and walk around it, and sure enough:
And it's also possible to duck below the dashboard:
My wife was probably wondering what the hell I was doing crawling on the floor
You do not have the required permissions to view the files attached to this post.
- Driftwood
- Posts: 2174
- Joined: Wed Oct 22, 2003 11:01 pm
- Contact:
Wow, this would definitely improve dynamic HUD functions if/when enough cockpits get reworked.
I dunno if losing cockpit shake is a big deal or not either way honestly. Maybe? I'll have to see...
I dunno if losing cockpit shake is a big deal or not either way honestly. Maybe? I'll have to see...
- Vince T
- Posts: 14045
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
Ah crap, this means I can no longer cheat by ommitting those faces you don't see in default cockpit view!
Looking really great! This makes the whole cockpit so much more vivid!
Looking really great! This makes the whole cockpit so much more vivid!
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
I wouldn't worry too much about that. I checked several cockpits yesterday and none of them had any blank spots within a normal (sitting) motion range. The noseless X-Wing was the exception; but Darksaber fixed that several months ago (thanks again, DS!) It's only when I try to lean outside the cockpit, or walk around that I start seeing blank spots and none of these actions are regular use anyway.General_Trageton wrote: ↑Mon Dec 30, 2019 6:25 pmAh crap, this means I can no longer cheat by ommitting those faces you don't see in default cockpit view!
BTW, the TIE-* cockpits are very small and feel somewhat claustrophobic. It's really easy to "bump your head" against the cockpit walls; but I think that's actually by design.
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
Forgot to ask: does anyone know what's the equivalence between in-game fixed-point units and meters? Empirically, it looks like it's somewhere around 400 in-game units to 1 meter.
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
I thought it was 65536 units = 1 mile (which is almost, but not quite, one inch per unit), as a legacy from the engine's decent from SWotL. That would be approximately 40 units per meter, though, not 400.
- JeremyaFr
- Posts: 3922
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
The scale is 0.0244140625 (1 / 40.96)
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
Hmmm... Well, maybe the cockpit/X/Y/Z/Reference units are using a different scale then? ~40 definitely does not work
- JeremyaFr
- Posts: 3922
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Which variable are you referring to?
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
I'm referring to cockpitX/Y/ZReference in PlayerDataEntry:
My XWAObject.h is a bit old, so maybe they've been renamed. I'll post the offsets later when I get back home.
Code: Select all
...
__int16 pitch;
__int16 yaw;
__int16 roll;
__int16 cameraRoll;
__int16 cameraPitch;
__int16 cameraYaw;
int cockpitXReference;
int cockpitYReference;
int cockpitZReference;
__int16 cockpitPitchReference;
__int16 cockpitYawReference;
__int16 cockpitRollReference;
...
- JeremyaFr
- Posts: 3922
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
The game engine multiplies these values by 0.0625.
0.0625 * 0.0244140625 = 0.00152587890625
1 / 0.00152587890625 = 655.36
It appears that scale is 655.36
0.0625 * 0.0244140625 = 0.00152587890625
1 / 0.00152587890625 = 655.36
It appears that scale is 655.36
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
That makes sense. The 3d cockpits were a new feature in XWA, and ~one-inch resolution would be too coarse for positioning in the cockpits. 0.0625 is 1/16, so the scaling operations are very fast.
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
The Falcon's cockpit is large enough that you can actually walk around inside the cockpit a little bit:
Also, I've got a beta version that needs testing for TrackIR -- any volunteers?
Also, I've got a beta version that needs testing for TrackIR -- any volunteers?
You do not have the required permissions to view the files attached to this post.
- Driftwood
- Posts: 2174
- Joined: Wed Oct 22, 2003 11:01 pm
- Contact:
If you're looking to test the limits of your 5DOF try using the AEG-77 Vigo, its bridge is rather huge.
- Vince T
- Posts: 14045
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
Geeze so after all it wasn't all for nothing building more complete interiors for some of my transport ships! A dream come true at last
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- Driftwood
- Posts: 2174
- Joined: Wed Oct 22, 2003 11:01 pm
- Contact:
Your corvette interior designs in fact came to mind when I saw the extent of the movement capabilities. You would be able to get rid of the multiple POV placement coordinates with this.General_Trageton wrote: ↑Wed Jan 01, 2020 8:47 pmGeeze so after all it wasn't all for nothing building more complete interiors for some of my transport ships! A dream come true at last
I am curious though, how little/much movement translates the view so radically?
And a thought I had was if you can implement head roll I don't think it would be a bad thing, being able to alter one's view naturally like in most modern simulators, ARMA, DCS, ect. makes a huge difference in comfort and performance. For me at least, it was always hard to play a modern sim and then jump into XWA with no head tracking at all. It's so static and it really is amazing how much situational awareness you lose not being able to, or at the very least jerkily be able to change your view.
As for losing the camera shake on collision/damage, can you copy the section of code and modify one to implement the 5DOF and keep the camera shake?
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
Where can I find this craft? In the DSUCP?
The extent/scale of motion is fully configurable. For the test above I actually had a factor of 3 because I don't have much room, so I was able to walk around the Falcon with a few steps. However, when I'm actually playing I like to keep something that is closer to a natural feel.
Head roll is currently implemented in VR as a hack because the edges cannot be seen anyway so it doens't matter; but I can't do that for non-VR users. However, for TrackIR I don't think head-roll is too relevant... unless I misunderstood your comment?
If it helps, most of the screenshots above where taken without VR or TrackIR support. The way I've got positional tracking setup is with a ping-pong ball glued to a green LED and a couple of PS3 Eye cameras. The whole setup is about $30 or so. I just attach the ping-pong ball to the VR visor or to a headband that I wear around my forehead using velcro. To turn around I just activate mouse look. I imagine that for people without TrackIR or VR, this ping-pong setup would actually make the Dynamic Cockpit more usable and it does help create an illusion of depth too.
I'll see if it's possible to recover cockpit shake due to damage *and* still have 5dof.
And yes, thank you guys for making such detailed interiors
EDIT: I figured that since I published the fix for the Dynamic Cockpit in a different thread, I might as well put it here too. So, here's the preview of 6dof (you'll need release 1.0.10 and then put these file on top):
https://www.dropbox.com/s/2vl1yrmbfgskp ... w.zip?dl=0
Just be aware that the Dynamic_Cockpit.cfg file is customized to shrink the HUD. So, keep that file from version 1.0.10 if you don't want that effect.
Oh, and there might be bugs
- Driftwood
- Posts: 2174
- Joined: Wed Oct 22, 2003 11:01 pm
- Contact:
Vigo is up for download on my google page, also on DTM's website. http://www.mtdindustries.com/xwa/OPT/AE ... -03-18.zip
Other stuff is available on my google page also. https://sites.google.com/view/rebel-spe ... authuser=0
Other stuff is available on my google page also. https://sites.google.com/view/rebel-spe ... authuser=0
- blue_max
- Posts: 2295
- Joined: Wed Mar 20, 2019 5:12 am
I finally got the AEG-77 working. Thanks Driftwood! It's really fun to explore this bridge and it looks great in VR too:
That hologram in the middle appears to be floating in the air in VR. This cockpit is also going to be very helpful for a number of things soon...
That hologram in the middle appears to be floating in the air in VR. This cockpit is also going to be very helpful for a number of things soon...
You do not have the required permissions to view the files attached to this post.
-
- Posts: 7
- Joined: Thu Dec 26, 2019 4:59 pm
This is amazing work. Is it possible to play in a capital ship or at least watch it from a vantage point somewhere inside?