BlenderVR Tutorial #1

BlenderVR: Starting Up

Blender does not directly port to mobile platforms; it has many other strengths, but is reliant on third-party software to integrate with other types of display than just a monitor. Je me l'introduce: BlenderVR! BlenderVR is a separate piece of software that interfaces between Blender and output displays. Disclaimer: I do not have a CAVE or YURT so could not test this at home. However, the BlenderVR folks provide some basic data and samples by which you can test its functionality on your own computer. As such, I can only provide a basic outline of how it works.

BlenderVR allows the user to port Blender's built-in game engine to other display devices. As such, you should be able to view any model made in Blender in VR. To do so, BlenderVR requires three things: a configuration file (.xml), a processing file (.py), and of course a Blender file (.blend). BlenderVR comes with a sample set by which you can at least test the setup, which I will use in this brief review. Of course you will need to tweak these files to fit your own system.

Configuration files

Below is a configuration file in typical .xml-file format, using simple HTML tag structure, and will provide the user with three display options. The first step is to load such a configuration file as you can see in the screenshot above. The file of the name is desktop.xml; after selecting the file, you need to press the > Load configuration button. After pressing this button, the .xml-file loads the three different screen display options, which should then appear under Screen sets.

<?xml version="1.0"?>

  <blendervr>

    <starter blender='C:/BlenderVR/blender/blender.exe'>

      <config name='Fullscreen 2D'>fullscreen</config>

      <config name='Stereo 3D - Side by Side'>sidebyside</config>

      <config name='Stereo 3D - Quadbuffer'>quadbuffer</config>

    </starter>

  <users>

    <user name="user A"/>

  </users>


  <computers>

    <system>

      <daemon transmit='True'>

        <environment>SystemRoot=C:/Windows</environment>

      </daemon>

      <blenderplayer executable='C:/BlenderVR/blender/blenderplayer.exe' />  

  </system>


  <computer name='Any' hostname='*' />


</computers>


<screens>


  <screen name="fullscreen" computer="Any">

    <display options="-f 1920 1080">

      <graphic_buffer buffer="mono" user='user A' eye="middle"/>

    </display>

    <wall>

      <corner name="topRightCorner">1.0, 1.0, -1.0</corner>

      <corner name="topLeftCorner">-1.0, 1.0, -1.0</corner>

      <corner name="bottomRightCorner">1.0, -1.0, -1.0</corner>

    </wall>

  </screen>


  <screen name="sidebyside" computer="Any">

    <display options="-f 1920 1080 -s sidebyside">

      <graphic_buffer buffer="left" user='user A' eye="left" />

      <graphic_buffer buffer="right" user='user A' eye="right" />

    </display>

    <wall>

      <corner name="topRightCorner">1.0, 1.0, -1.0</corner>

      <corner name="topLeftCorner">-1.0, 1.0, -1.0</corner>

      <corner name="bottomRightCorner">1.0, -1.0, -1.0</corner>

    </wall>

  </screen>


  <screen name="quadbuffer" computer="Any">

    <display options="-f 1920 1080 24 120 -s hwpageflip">

      <graphic_buffer buffer="left" user='user A' eye="left" />

      <graphic_buffer buffer="right" user='user A' eye="right" />

    </display>

    <wall>

      <corner name="topRightCorner">1.0, 1.0, -1.0</corner>

      <corner name="topLeftCorner">-1.0, 1.0, -1.0</corner>

      <corner name="bottomRightCorner">1.0, -1.0, -1.0</corner>

    </wall>

  </screen>

Processing files

Next thing up are processing files. A processing file basically defines user interaction with the model through the BlenderVR API; effectively, every .blend file you want to view will need its own .py file. Note that these files need to be in the same folder as the .blend file and named as "<filename>.processor.py". Once you load your .blend file, and your processing file is in the same folder, the BlenderVR GUI will automatically detect the file and load it accordingly. Once that is done switch over to the Run tab. On the Run tab, just press Start. Below is a screenshot of the provided 'simple' example in the Stereo3D - Side by Side screen set.

By Martin