/ Forums
New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

SOLVED:switching between room-scale and sit-down setups

TickTockTickTock Posts: 172
Art3mis
edited June 11 in General
My computer sits well outside my room-scale setup so it won't be a tripping hazard.  However, when I want to play sit-down games like ED from the desk chair for easy access to ed-db, roguey and the like I have to move a sensor to the desk and rerun setup.  I am considering buying an extra sensor just so I can leave the ones on the ceiling in place and just unplug them from the computer and plug in the desk sensor.  But I would still have to rerun setup.  Is there a set of files I can copy and swap back and forth via a bat file to create setup profiles to avoid all this?  Maybe even software-disable the unwanted sensors?  Is there a better way?

Udate: Posting my final files here which work. Assumes you've already saved copies of the sitting and standing profiles (roaming, local, locallow) - will have to save the Oculus directories to the same path as in the bat files.

How to set up:
  1. Setup the rift for your sitting profile (run setup in Oculus app)
  2. Run stop.bat to stop the oculus app
  3. Create a Directory named OculusProfiles in your Documents area.
  4. Copy the three AppData directories (%AppData%\Oculus, %LocalAppData%\Oculus, %AppData%\..\LocalLow\Oculus) to the OculusProfiles directory renaming to Oculus-roaming-sit, Oculus-local-sit, and Oculus-locallow-sit.
  5. Make identical copies of those three directories called Oculus-roaming-room, Oculus-local-room, and Oculus-locallow-room.  You should now have six directories in the Documents/OculusProfiles directory.
  6. Setup sensors for room scale (don't start the Oculus app yet)
  7. run room.bat.  This will set up links to the room profiles (You should not get any error messages. If so double check the paths and file names.).  This should restart the oculus app, too.
  8. Start the Oculus app if not already started (some times, it doesn't take in step 6 - hey, it's hack  )
  9. Set up for Room scale
You are now set up for room scale.  To change back to the sitting profile, run stop.bat, change the sensor arrangement, then run sit.bat.  Going back to room is similar.

If your Documents area is not "C:\Users\%USERNAME%\Documents", you will have to edit the bat files to point to the proper area.

sit.bat:
sc config OVRService start= demand
net stop OVRService
timeout /t 2 /nobreak >NUL
rmdir "%AppData%\Oculus"
mklink /d  "%AppData%\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-roaming-sit"
rmdir "%LocalAppData%\Oculus"
mklink /d  "%LocalAppData%\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-local-sit"
rmdir "%AppData%\..\LocalLow\Oculus"
mklink /d  "%AppData%\..\LocalLow\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-locallow-sit"
net start "OVRService"
timeout /t 2 /nobreak >NUL
Start "" "C:\Program Files\Oculus\Support\oculus-client\OculusClient.exe"

room.bat:
sc config OVRService start= demand
net stop OVRService
timeout /t 2 /nobreak >NUL
rmdir "%AppData%\Oculus"
mklink /d  "%AppData%\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-roaming-room"
rmdir "%LocalAppData%\Oculus"
mklink /d  "%LocalAppData%\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-local-room"
rmdir "%AppData%\..\LocalLow\Oculus"
mklink /d  "%AppData%\..\LocalLow\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-locallow-room"
net start "OVRService"
timeout /t 2 /nobreak >NUL
Start "" "C:\Program Files\Oculus\Support\oculus-client\OculusClient.exe"


stop.bat:
sc query OVRService | FIND "STATE" | FIND "STOPPED" >NUL
IF errorlevel 0 IF NOT errorlevel 1 GOTO alreadyStopped
net stop OVRService
:alreadyStopped

«1

Comments

  • elbofforelboffor Posts: 2,166 Valuable Player
    edited February 23
    Appdata roaming oculus sessions :)

    At least stopping yhe run time and deleting thise files causes you ti do full set up anyways, so i assume its where the files you need are stored.
    This is my forum signature.
    There are many others like it, but this is mine.
  • agenttoffagenttoff Posts: 324
    Trinity
    edited February 23
    Maybe this is something @ApollyonVR could implement into his already essential app. 
    Would be pretty useful to be able to switch profiles based on sitting, standing, and room-scale.  If we can find the file that stores that information might be fairly simple.  
  • elbofforelboffor Posts: 2,166 Valuable Player
    im fairly sure the stup files are in the sessions folder, not sure which ones. i cant see there being any problem in creating a couple of symbolic links and using the tray tool app to swap em. hell, i could eaily make a batch program to do it, compile it as an exe, make some atwork and replace a demo in OH with it lol
    This is my forum signature.
    There are many others like it, but this is mine.
  • TickTockTickTock Posts: 172
    Art3mis
    elboffor said:
    Appdata roaming oculus sessions :)

    At least stopping yhe run time and deleting thise files causes you ti do full set up anyways, so i assume its where the files you need are stored.
    Thanks!  This actually seems to work... mostly.  I copied the whole sessions directory to separate area and renamed sessions-room.  Then reran the setup for the desk with only one sensor, saved that as sessions-sit.  After playing a while, I shut down the oculus service replaced the sessions with the sessions-stand version and I was back.  There were two issues:
    1) Oculus software didn't like going back to one sensor and I had to skip the tracking setup and then reset my view when I went to the sitting profile
    2) Going back to the room scale, the guardian was shifted dramatically.  Rather than rerunning, I decided to just turn it off.  I have enough room that I don't really need it.

    Any Win10 gurus out there know of a command line to disable (and later re-enable) the sensors I can add to my bat files (so I can leave them plugged in)?
  • elbofforelboffor Posts: 2,166 Valuable Player
    You could disable the controllers they are on maybe?
    This is my forum signature.
    There are many others like it, but this is mine.
  • TickTockTickTock Posts: 172
    Art3mis
    Adding some more comments for anyone else wishing to pursue this.
    1) Going back to single sensor for sitting sessions.  Run the setup for Rift only - Touch controllers still work!
    2) Disabling sensors is probably not very critical at this time since I have to unplug and replug the sensors anyway to stop glitching
    3) Here is my bat file for sitting.   I have one similar for standing.  I had to comment out the net stop because the batch file would some times continue past the start of the OculusClient even when I don't exit.
    sc config OVRService start= demand
    net stop "OVRService"
    xcopy /E /I /Y C:\Users\TickTock\AppData\Roaming\Oculus\sessions C:\Users\TickTock\Documents\OculusProfiles\sessions-current
    xcopy /E /I /Y C:\Users\TickTock\Documents\OculusProfiles\sessions-sit C:\Users\TickTock\AppData\Roaming\Oculus\sessions
    net start "OVRService"
    D:\Oculus\Support\oculus-client\OculusClient.exe
    ::net stop "OVRService"
    ::taskkill /F /IM OVRServiceLauncher.exe /T
    ::taskkill /F /IM OVRServer_x64.exe /T

  • elbofforelboffor Posts: 2,166 Valuable Player
    edited February 26
    Looking good buddy
    You might want to look into just writing a symbilic link in though ;)
    This is my forum signature.
    There are many others like it, but this is mine.
  • TickTockTickTock Posts: 172
    Art3mis
    Well, duh, I should have thought of that.  :p   
  • TickTockTickTock Posts: 172
    Art3mis
    I got the guardian and view to come up properly, too, by also swapping the local/Oculus area.
  • elbofforelboffor Posts: 2,166 Valuable Player
    bosh.
    once you have them all set, get visual studio downloaded and make yourself a little app for it.

    There will be some use for the comunity :)
    or at least say you are going to and it'll get built into another tray app we know of ;)


    This is my forum signature.
    There are many others like it, but this is mine.
  • sraptorsraptor Posts: 1
    Virtual Boy (or Girl)
    Will be nice is somebody write the app for the 3 modes.
  • TickTockTickTock Posts: 172
    Art3mis
    OK here is my working bat file if anyone else wishes to do this.  It assumes you have already made copies of:
    • AppData\Roaming\Oculus
    • AppData\Local\Oculus
    • AppData\LocalLow\Oculus
    to a save area.

    sit.bat:
    sc config OVRService start= demand
    
    net stop "OVRService"
    
    rmdir "C:\Users\TickTock\AppData\Roaming\OculusBak"
    move "C:\Users\TickTock\AppData\Roaming\Oculus" "C:\Users\TickTock\AppData\Roaming\OculusBak"
    mklink /d  "C:\Users\TickTock\AppData\Roaming\Oculus" "C:\Users\TickTock\Documents\OculusProfiles\Oculus-roaming-sit"
    rmdir "C:\Users\TickTock\AppData\Local\OculusBak"
    move "C:\Users\TickTock\AppData\Local\Oculus" "C:\Users\TickTock\AppData\Local\OculusBak"
    mklink /d  "C:\Users\TickTock\AppData\Local\Oculus" "C:\Users\TickTock\Documents\OculusProfiles\Oculus-local-sit"
    rmdir "C:\Users\TickTock\AppData\LocalLow\OculusBak"
    move "C:\Users\TickTock\AppData\LocalLow\Oculus" "C:\Users\TickTock\AppData\LocalLow\OculusBak"
    mklink /d  "C:\Users\TickTock\AppData\LocalLow\Oculus" "C:\Users\TickTock\Documents\OculusProfiles\Oculus-locallow-sit"
    net start "OVRService"
    
    "C:\Program Files\Oculus\Support\oculus-client\OculusClient.exe"
    net stop "OVRService"
    taskkill /F /IM OVRServiceLauncher.exe /T
    taskkill /F /IM OVRServer_x64.exe /T

  • TickTockTickTock Posts: 172
    Art3mis
    For some reason I cannot post the entire bat file.  I keep getting a "your post will be seen once it is approved" if I include more than one line (and, of course, it is never approved). 

  • elbofforelboffor Posts: 2,166 Valuable Player
    edited February 28
    sc config OVRService start= demand
    net stop "OVRService"
    rmdir "C:\Users\UserName\AppData\Roaming\Oculus"
    mklink /d  "C:\Users\UserName\AppData\Roaming\Oculus" "C:\Users\UserName\Documents\OculusProfiles\Oculus-roaming-sit"
    rmdir "C:\Users\UserName\AppData\Local\Oculus"
    mklink /d  "C:\Users\UserName\AppData\Local\Oculus" "C:\Users\UserName\Documents\OculusProfiles\Oculus-local-sit"
    rmdir "C:\Users\UserName\AppData\LocalLow\Oculus"
    mklink /d  "C:\Users\UserName\AppData\LocalLow\Oculus" "C:\Users\UserName\Documents\OculusProfiles\Oculus-locallow-sit"
    net start "OVRService"
    "C:\Program Files\Oculus\Support\oculus-client\OculusClient.exe"
    This is my forum signature.
    There are many others like it, but this is mine.
  • elbofforelboffor Posts: 2,166 Valuable Player
    Also try %User% and %AppData%
    Just looks cleaner and works independant of drive letter
    This is my forum signature.
    There are many others like it, but this is mine.
  • TickTockTickTock Posts: 172
    Art3mis
    Thanks.  I'll give those a try tonight.
  • TickTockTickTock Posts: 172
    Art3mis
    edited March 6
    .
    @kojack : if you have a moment, would you be willing to remove all the junk-posts I replaced with "."

  • agenttoffagenttoff Posts: 324
    Trinity
    Maybe this is something @ApollyonVR could implement into his already essential app. 
    Would be pretty useful to be able to switch profiles based on sitting, standing, and room-scale.  If we can find the file that stores that info it might be fairly simple.  
  • TickTockTickTock Posts: 172
    Art3mis
    Too funny.  Sorry for the spam above.  The Forum was not accepting my posts (for days) because I was unverified.  I guess it flushed all my attempts out when I was updated to verified.  Too bad there is no way to delete posts or I would be able to clean up a little better.
  • TickTockTickTock Posts: 172
    Art3mis
    Posting my bat files now that I've stopped messing with them and they seem to work pretty well.

    sit.bat:
    sc config OVRService start= demand
    net stop OVRService
    timeout /t 2 /nobreak >NUL
    rmdir "%AppData%\Oculus"
    mklink /d  "%AppData%\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-roaming-sit"
    rmdir "%LocalAppData%\Oculus"
    mklink /d  "%LocalAppData%\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-local-sit"
    rmdir "%AppData%\..\LocalLow\Oculus"
    mklink /d  "%AppData%\..\LocalLow\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-locallow-sit"
    net start "OVRService"
    timeout /t 2 /nobreak >NUL
    Start "" "C:\Program Files\Oculus\Support\oculus-client\OculusClient.exe"

    room.bat:
    sc config OVRService start= demand
    net stop OVRService
    timeout /t 2 /nobreak >NUL
    rmdir "%AppData%\Oculus"
    mklink /d  "%AppData%\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-roaming-room"
    rmdir "%LocalAppData%\Oculus"
    mklink /d  "%LocalAppData%\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-local-room"
    rmdir "%AppData%\..\LocalLow\Oculus"
    mklink /d  "%AppData%\..\LocalLow\Oculus" "C:\Users\%USERNAME%\Documents\OculusProfiles\Oculus-locallow-room"
    net start "OVRService"
    timeout /t 2 /nobreak >NUL
    Start "" "C:\Program Files\Oculus\Support\oculus-client\OculusClient.exe"


    stop.bat:
    sc query OVRService | FIND "STATE" | FIND "STOPPED" >NUL
    IF errorlevel 0 IF NOT errorlevel 1 GOTO alreadyStopped
    net stop OVRService
    :alreadyStopped

  • zoenphluxzoenphlux Posts: 20
    Virtual Boy (or Girl)
    This seems like a good fix to a problem that shouldn't exist to start with.  I don't have my rift yet (tomorrow), but if there is a need to change between sit down and stand up modes, and you can do it by swapping config files, then this should be part of Oculus software to start with.  Oculus devs take note.  This seems like a very easy update.

    however, why again do people need to change?  Does it matter if the HMD is being used with a remote, or not? 
  • TickTockTickTock Posts: 172
    Art3mis
    This is for a less common situation where the sitting area is in a separate space than the standing area.  If you play room-scale games facing your computer desk where you play sit-down games then there you don't need this.
  • elbofforelboffor Posts: 2,166 Valuable Player
    I'm making an app for this ;)
    and a few other niceties
    This is my forum signature.
    There are many others like it, but this is mine.
  • zoenphluxzoenphlux Posts: 20
    Virtual Boy (or Girl)
    Ahh, thanks for explaining that TickTock. RIFT comes TODAY!
  • elbofforelboffor Posts: 2,166 Valuable Player
    here we have it, first build does exactly what your scripts do (for the time being) and will soon disable whatever sensors you need and much much more ;)


    This is my forum signature.
    There are many others like it, but this is mine.
  • cyberealitycybereality Posts: 21,760 Oculus Staff
    I deleted the spam posts. Also, if the forum isn't showing your post and says it needs to be approved by a moderator, please wait. Usually people click like 2 or 3 times, seems you got happy with the submit button. It's all good though.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i
    PowerColor RX 480 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
  • TickTockTickTock Posts: 172
    Art3mis
    Yeah, I did.   Sorry,.  :/ I tried spamming it at one point in hope one would get through.
  • elbofforelboffor Posts: 2,166 Valuable Player
    Albert EInstein said:
    Insanity: doing the same thing over and over again and expecting different results.
    :p 
    This is my forum signature.
    There are many others like it, but this is mine.
  • Oops01Oops01 Posts: 57
    Hiro Protagonist
    edited June 11
    @TickTock could you walk me through how to set up the batch files, I'm a bit of a rookie when it comes to this type of thing I have made copies of the three files:-  (AppData\Roaming\Oculus, AppData\Local\Oculus, AppData\loclLow\Oculus) and saved them to my desktop and also copied your bat files (made them into bat files) on my desktop but when I run them I get windows cannot find them make sure you have typed the name correctly?
    Where do I put the three bat files?
    I also tried elboffer's program but I'm afraid it wouldn't work for me.
  • TickTockTickTock Posts: 172
    Art3mis
    edited June 11
    If you take a look at the bat files, you'll notice that they are looking for the copies of the AppData stuff in a folder called "OculusProfiles" in your Documents area(C:\Users\%USERNAME%\Documents\OculusProfiles) - not on the desktop.  You can put the bat files there, but you will either need to move the AppData to the folder mentioned (you need to create the folder) or edit the bat file to point to where you put them.

    Best way to set it up is to:
    1. Setup the rift for your sitting profile
    2. Run stop.bat to stop the oculus app
    3. Copy the three directories to the OculusProfiles directory renaming to Oculus-roaming-sit, Oculus-local-sit, and Oculus-locallow-sit
    4. Make identical copies of those three directories called Oculus-roaming-room, Oculus-local-room, and Oculus-locallow-room.  You should now have six directories in that folder.
    5. Setup sensors for room scale (don't start the Oculus app yet)
    6. run room.bat.  This will set up links to the room profiles (You should not get any error messages. If so double check the paths and file names.).  This should restart the oculus app, too.
    7. Start the Oculus app if not already started (some times, it doesn't take in step 6 - hey, it's hack :) )
    8. Set up for Room scale
    That's it.  Since you already setup the links, the room scale setup was actually saved in your -room copies in Documents/OculusProfiles.  Now if you want to go back to the sitting profile, run stop.bat, configure your sensors for sitting, and then run sit.bat.  

    Let me know how it goes.


«1
Sign In or Register to comment.