Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,806,858 Members 36,552 Now Online
XDA Developers Android and Mobile Development Forum

Nexus 5 + Durovis Dive = Oculus Rift

Tip us?
 
Marcin-prv
Old
(Last edited by Marcin-prv; 18th August 2014 at 07:44 PM.)
#1  
Junior Member - OP
Thanks Meter 16
Posts: 21
Join Date: Jul 2013
Location: London, UK

 
DONATE TO ME
Cool Nexus 5 + Durovis Dive = Oculus Rift

This is the first working HMD that use Head Tracking (FreeTrack) and FullHD stream from PC (USB Tethering) = 30 ms!



What do you need:
Code:
def update():
    global yaw
    yaw = -android[0].pitch * multiplier
    global pitch
    pitch = -android[0].roll * multiplier
    global roll
    roll = -android[0].yaw * multiplier

if starting:
    
    multiplier = 0.3
    
    centerYaw = 0
    centerPitch = 0
    centerRoll = 0
   
    yaw = 0
    pitch = 0
    roll = 0
    android[0].update += update

freeTrack.yaw  = yaw - centerYaw
freeTrack.pitch = pitch - centerPitch
freeTrack.roll = roll - centerRoll

if keyboard.getKeyDown(Key.LeftControl) and keyboard.getPressed(Key.C):
    centerYaw = yaw
    centerPitch = pitch
    centerRoll = roll

Input Lag test:

Input Lag Test #1

Input Lag Test #2

My website: First Ever
The Following 8 Users Say Thank You to Marcin-prv For This Useful Post: [ Click to Expand ]
 
wulsic
Old
#2  
wulsic's Avatar
Recognized Contributor
Thanks Meter 702
Posts: 936
Join Date: Aug 2013
Location: Nijmegen
Lol nice and for the one's who want to keep it google like use this https://www.unofficialcardboard.com/...-cardboard-vr/ I guess Oculus rift is bad for your eyes just like people say that you not most be too close to an display.
Devices History
Htc Elf-Htc Google Nexus One-LG Optimus 2X-Samsung Galaxy S2-LG Nexus4

"Simplicity is the ultimate sophistication."
"The greatest ideas are the simplest." William Golding
"Simplicity is the art of maximizing the amount of work not done." - Agile Manifesto
"Simplicity is the way a human/developer should think to easily solve problems." - Wulsic

My Work So far
 
Marcin-prv
Old
(Last edited by Marcin-prv; 18th August 2014 at 03:16 AM.)
#3  
Junior Member - OP
Thanks Meter 16
Posts: 21
Join Date: Jul 2013
Location: London, UK

 
DONATE TO ME
Default I need your help...

As you know (or not) there are only a few games that support the FreeTrack protocol.

FreeTrack interface:
  • ARMA 2 - [Yaw, Pitch, X, Z]
  • ARMA 2: Operation Arrowhead - [Yaw, Pitch, X, Z]
  • ARMA 3 - [Yaw, Pitch, X, Y, Z]
  • DayZ Standalone - [Yaw, Pitch, X, Y, Z]
  • GP Bikes - [Yaw, Pitch]
  • Iron Front: Liberation 1944 - [Yaw, Pitch, X, Z]
  • Kart Racing PRO - [Yaw, Pitch]
  • Take On Helicopters - [Yaw, Pitch, Roll, X, Y, Z]
  • World Racing Series - [Yaw, Pitch]
  • X3: Albion Prelude - [Yaw, Pitch, Roll]

With third-party support:
  • Battlefield 2 - [Yaw, Pitch, Roll, X, Y, Z] - BF2FreeLook
  • DCS: A-10C - [Yaw, Pitch, Roll, X, Y, Z] - FreeTrack compatible headtracker.dll plugin
  • DCS: Black Shark 2 - [Yaw, Pitch, Roll, X, Y, Z] - FreeTrack compatible headtracker.dll plugin
  • DCS: World - [Yaw, Pitch, Roll, X, Y, Z] - FreeTrack compatible headtracker.dll plugin
  • Unity (game engine) - [Yaw, Pitch, Roll, X, Y, Z] - Unity Package
  • X-Plane 9/10 - [Yaw, Pitch, Roll, X, Y, Z] - ft2xplane

For me, the most important is Project CARS, it already support FaceTrackNoIR but I can't use built in gyro, accel to control head tracking.
You can use FreePIE + FreePIE IMU app + my script with ARMA3 (but this is not supported by Project CARS)

We need to create Android app for FaceTrackNoIR!
Something like this: HeadTrack
The Following User Says Thank You to Marcin-prv For This Useful Post: [ Click to Expand ]
 
pillo787
Old
#4  
Junior Member
Thanks Meter 0
Posts: 20
Join Date: Apr 2012
This is amazing, run good with online games? Run al oculus rift tales? Forma example hl2, tf2,minecraft with the mod and more por online arma 3 and other bohemia games.
 
pillo787
Old
#5  
Junior Member
Thanks Meter 0
Posts: 20
Join Date: Apr 2012
I try yo do this with the same phone and game , the divide screen work, but the aceloremetre no. Can you do a tutoriales of freemuip. I copy the script, run the script, un the phone i put the ip and put y es and dont work
 
Marcin-prv
Old
(Last edited by Marcin-prv; 18th August 2014 at 05:20 PM.)
#6  
Junior Member - OP
Thanks Meter 16
Posts: 21
Join Date: Jul 2013
Location: London, UK

 
DONATE TO ME
When using USB Tethering, check your PC's IP address (IPv4): CMD -> ipconfig
Check your firewall (If you need add FreePIE to firewall exeptions)

In FreePIE IMU app:

- Run the app
- Type your PC's IP address and Port 5555 (for example my is: 192.168.42.137 and port 5555).
- Select "Send orientation" and "Send raw data"
- Select "Fastest" for 1000Hz refres (Nexus 5 uses MPU-6515 Six-Axis / Oculus DK2 MPU-6500 Six-Axis)
- Press OFF button to see ON.
- Disable Debug (otherwise it will crash the app)


In FreePIE PC:

- Run the program
- Menu: File -> New (Paste my script)
- Menu: Scripy -> Run script
- Run Splashtop Streamer and connect with your phone
- Run ARMA 3 using TriDef 3D Ignition launcher
- In game you have to see FreeTrack controller available

ARMA 3

If you can't see it installa nad uninstall FaceTrackNoIR
I don't know how but it helps.
The Following 2 Users Say Thank You to Marcin-prv For This Useful Post: [ Click to Expand ]
 
wulsic
Old
(Last edited by wulsic; 18th August 2014 at 11:27 PM.)
#7  
wulsic's Avatar
Recognized Contributor
Thanks Meter 702
Posts: 936
Join Date: Aug 2013
Location: Nijmegen
God I also want to try this looks cool but I do not have the phone neither do i have the money to buy the other stuff. Goodjob Marcin continue with your work/script seems interessting I will follow this thread

I also saw your other vids on your youtube and your website pretty nice inclusive your Monster Rig Jesus christ what an monster. And also your cooking video xD did it tasted good?
Devices History
Htc Elf-Htc Google Nexus One-LG Optimus 2X-Samsung Galaxy S2-LG Nexus4

"Simplicity is the ultimate sophistication."
"The greatest ideas are the simplest." William Golding
"Simplicity is the art of maximizing the amount of work not done." - Agile Manifesto
"Simplicity is the way a human/developer should think to easily solve problems." - Wulsic

My Work So far
 
Marcin-prv
Old
#8  
Junior Member - OP
Thanks Meter 16
Posts: 21
Join Date: Jul 2013
Location: London, UK

 
DONATE TO ME
Default Thanks...

Quote:
Originally Posted by wulsic View Post
God I also want to try this looks cool but I do not have the phone neither do i have the money to buy the other stuff. Goodjob Marcin continue with your work/script seems interessting I will follow this thread

I also saw your other vids on your youtube and your website pretty nice inclusive your Monster Rig Jesus christ what an monster. And also your cooking video xD did it tasted good?
It always tastes good when I make it!
For example, my New York cheesecake baked in the pot (becouse I couldn't find a cake pan)



I can also draw portraits...



Last week I (accidentally) hacked Google play (Android ASEC encryption)



Like you see... I'm so bored!
The Following 2 Users Say Thank You to Marcin-prv For This Useful Post: [ Click to Expand ]
 
pillo787
Old
#9  
Junior Member
Thanks Meter 0
Posts: 20
Join Date: Apr 2012
i dit this steps and all works without the freepie, i can see if i put the debug mode how the values changes but in the computer didnt do nothing, i try with arma 3 and the same mision, the exhibion of infantery and didnt work. I have gtx 780, i3770k, 16 gb ram, and windows 8.1? can you help me please?
 
Marcin-prv
Old
(Last edited by Marcin-prv; 19th August 2014 at 05:16 PM.)
#10  
Junior Member - OP
Thanks Meter 16
Posts: 21
Join Date: Jul 2013
Location: London, UK

 
DONATE TO ME
Quote:
Originally Posted by pillo787 View Post
i dit this steps and all works without the freepie, i can see if i put the debug mode how the values changes but in the computer didnt do nothing, i try with arma 3 and the same mision, the exhibion of infantery and didnt work. I have gtx 780, i3770k, 16 gb ram, and windows 8.1? can you help me please?
I'm using Windwos 8.1 Update 1 64-bit.
Before you run the game with my script, try to run this script (it works with mouse on Windows desktop),

Code:
def update():   
    #Apply deadband filter to avoid drift
    #And continousRotation filter to yaw axis to avoid jumps when passing tracker center
    x = filters.deadband(filters.delta(math.degrees(filters.continousRotation(android[0].yaw))), deadband)
    y = filters.deadband(filters.delta(math.degrees(android[0].pitch)), deadband)
      
    mouse.deltaX = x * multiply
    mouse.deltaY = y * multiply
   
if starting: 
    deadband = 0.01
    multiply = 5
    android[0].update += update
If it still doesn't work:

- Check your IP address
- Disable your Antivirus
- Check your Firewall

Tags
goggle, hmd, mobile, oculus, virtual
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes