Integrating VR in your Stingray Project

Login to Follow
  • Design Visualization
  • 1.2
  • Creating Interactions
  • Stingray
Skill Level
  • Intermediate
25 min

For those of you who want to see how your scenes feel in virtual reality, Stingray has a basic VR template equipped with all the settings required to support the Oculus Rift. The template can be used to create a new VR project, but what you may not realize is that it can also be used to bring an existing project into virtual reality.

The VR template can be found in your Program Files/Autodesk/Stingray/version#/editor/templates folder. Inside the VR/script/lua folder are several files, including:

  • oculus_input_mapper.lua
  • oculus_vr.lua
  • player.lua
  • project.lua
  • S3d_ui.lua

These script files are all you need to support the Oculus device and link the appropriate settings to your in-game controls. Simply copy and paste them into your existing project’s script/lua folder.

Since the template has different levels than your project, you need to change a reference in the files so your scenes load correctly. Open and edit the script project.lua to specify the level (floorplan), just like you would to specify which level to start from the main_menu.

Then open the settings.ini file at your project’s root and change the render_config parameter from "render" to "vr_render". This allows the engine to render both displays needed for the VR experience.

Once your changes compile, run the project with the Oculus Rift and experience it in virtual reality.

Posted By
  • Stingray
  • 1.2
  • Creating Interactions
To post a comment please login or register
*Save $66 per month on Autodesk's Suggested Retail Price (SRP) when purchasing 1 year term 3ds Max or Maya subscription.