Coder Social home page Coder Social logo

source's Introduction

Copyright (C) LIMSI-CNRS (2014)

BlenderVR website: https://blendervr.limsi.fr

contributor(s) : Jorge Gascon, Damien Touraine, David Poirier-Quinot,
Laurent Pointal, Julian Adenauer, Dalai Felinto

This software is a computer program whose purpose is to distribute
blender to render on Virtual Reality device systems.

This software is governed by the CeCILL  license under French law and
abiding by the rules of distribution of free software.  You can  use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".

As a counterpart to the access to the source code and  rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty  and the software's author,  the holder of the
economic rights,  and the successive licensors  have only  limited
liability.

In this respect, the user's attention is drawn to the risks associated
with loading,  using,  modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean  that it is complicated to manipulate,  and  that  also
therefore means  that it is reserved for developers  and  experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and,  more generally, to use and operate it in the
same conditions as regards security.

The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.


How to use BlenderVR - LIMSI
----------------------------
There is as many blender running than there is screen in the virtual environment (wall, HMD, occulus ...). Thus, there can be several blender running on a single computer. For instance, that is used inside SMART-I², where all four screens (ie. : 2 physical screens multiply by 2 - 1 stereoscopic on each screen) are rendered by the same computer.
Moreover, a virtual environment may display scenes for several users. For instance, EVE, allows two users working at the same time on the same screens. Each user has its own independant stereoscopic point of view on the scene.
Thus, the XML configuration file (look at configuration/main.xml to get documentation on the configuraion file) fully describe the Virtual Environment : users, screens, VRPN connexion ...

BlenderVR contains several files.
All .py files represent the classes and the modules used by BlenderVR. The main module is blendervr.

Follow the installation guide in our user manual:
http://blender-vr-manual.readthedocs.org/installation/installation.html

source's People

Contributors

dfelinto avatar jmespadero avatar lpointal avatar perezsaint avatar pyrapple avatar touraine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

source's Issues

Decide on a name and stick to it

We are using different names in the documentation: blenderVR, Blender-VR, BlenderVR.
We should stick to one and go with it.

My suggestion is either BlenderVR or Blender-VR

Add a dummy QT module to sys.modules before generating the pydocs

Any class that inherits a package that is not available (e.g., QT related classes) will fail at auto-documentation.

The solution is to create a 'dummy' replacement of those classes and add it to the sys.modules dictionary. I haven't tested this, but it was recommended by Campbell Barton (Python maintainer of Blender) during the Blender Conference 2014.

This is a subtask of #7 and related to #8

Unable to open a display

I'm trying to run BlenderVR on a local Linux box. When I click the Start button, the following appears in the console window:

No protocol specified
Unable to open a display

The DISPLAY environment variable is being set properly in the XML file (to :0.0) and I can run blenderplayer (and blender) locally without any problems.

Do you have any suggestions on how I can resolve or further troubleshoot this issue?

Configuration xml does not allow ~ or ~user in paths

Right now, BlenderVR does not properly handle paths containing ~ or ~user in the configuration xml. As a low-priority convenience, it would be useful to allow users to specify such paths.

Steps to reproduce:

  1. Create a configuration xml with either <starter blender='~/my/path/to/blender'> or <blenderplayer executable='~/my/path/to/blenderplayer'/>
  2. Attempt to run any sample using this configuration.

Expected behavior:
The sample should run without errors if the given path points to a valid blender executable.

Observed behavior:
Error message "Error : invalid blender path" or "Cannot start blenderplayer"

I have implemented a (trivial) fix for the specific issue of the blender and blenderplayer executables at wphicks/BlenderVR-source@6bbccfa, but it would be better to make sure that this issue does not exist for any other configuration option. Best of all would be to handle all configuration paths via some consistent path normalization function.

Remove all non-nested Python code

Move all the code that is not nested to under a def main, and make sure it works fine.
As a starter the files under //utils/ should be converted.

For the records, this only fails because in order to get the 'pydocs' out of the python files the script is 'executed'. If anything is not nested the code get executed and things go sour.

This is a subtask of #7

Daemon not launched on Windows, throwing "Fatal Python error: Failed to initialize Windows random API (CryptoGen)"

Run of blenderVR with powershell in a windows environment (by Vaclav Mares, beta tester) throws:


BlenderVR Log Window:
2015-02-20 22:44:22,317 blenderVR version: 1.0
2015-02-20 22:44:22,465 Creation of screen "console"
2015-02-20 22:44:22,479 Loading "Processor" class from
"D:/My/BlenderVRBuild/samples/basic\basic.processor.py" as main processor
2015-02-20 22:44:22,481 Get loader script name: C:\Python34\python.exe
D:\My\BlenderVRBuild\blender-vr\utils\update_loader.py --

D:/My/BlenderVRBuild/samples/basic/basic.blend

BlenderVR console:
2015-02-20 22:44:47,831 Command to run daemon: C:\Python34\python.exe
D:\My\BlenderVRBuild\blender-vr\utils\daemon.py Washek-PC:31415 console
debug
2015-02-20 22:44:47,831 Its environment variables: {}

2015-02-20 22:44:48,336 Cannot start daemon for screen 'console

PowerShell:

Fatal Python error: Failed to initialize Windows random API (CryptoGen)

It seems related to python issue:
"""
On Windows, if Python is started with an empty environment (no
environment variable at all), Python fails with: "Fatal Python error:
Failed to initialize Windows random API (CryptoGen)"
"""
http://bugs.python.org/issue20614

Next step: reproduce bug in windows env (may need to copy Valclav's PowerShell / Python config)

Oculus Rift Direct Mode not working

I tried all the example configurations that were included in the BlenderVR installation on Windows.
Head tracker works, but the view doesn't switch to Oculus, stays only on the monitor in a window.
Am I just missing a setting or is direct mode not supported?
When setting the Rift to extended mode, dragging the window to the Oculus desktop and maximizing it, I can get a windowed view in Oculus.

Added objects not added on Slave nodes

scene.addObject() and the like add objects only on Master node.
It seems that the list of objects to update* is not updated itself.

  • list created with the command, usually added to the .processor.py:
    if self.BlenderVR.isMaster():
    self.BlenderVR.getSceneSynchronizer().getItem(bge.logic).activate(True, True)

OSC-specific exceptions not defined (not correctly imported)

In the OSC section of the source code (more specifically in the modules/blendervr/plugins/osc/virtual_environment subsection), the imported "exceptions" module holds only the PluginError class (defined in modules/blendervr/exceptions.py) and none of the OSC-specific exception classes defined in modules/blendervr/plugins/osc/exceptions.py (e.g. the OSC_Invalid_Type class).
Hence, errors handled with these exception raise exceptions of their own
(e.g. in plugins/osc/virtual_environment/init.py l. 168 raise exceptions.OSC_Invalid_Type('getObjectUser waits an object then a user').

Design the site map

We need a clear picture of what will the final content of the site be. @PyrApple was working on it, but it would be nice to have it online (google docs? a wiki in github?).

This should spawn sub-tasks relative to produce the required documentation and make the site itself. Bur first and foremost we need the site map.

Expand Yo Frankie to excel at VR labs

Yo Frankie is a good tech demo, but it was built for traditional gaming.

  • Make the UI (user interface) optional/invisible
  • Support for double stereo game play for the 2 player mode.
  • Handle tracking + joystick controllers harmonically

--BlenderVR-root flag does not reset original root

Trying to launch blendervr with a profile_1.0.pickle pointing towards a old root (removed //blender-vr) naturally fails.
setting --BlenderVR-root flag to the correct root (//source) does the job but a relaunch of blendervr without this flag afterwards still holds the old //blender-vr as the --BlenderVR-root.

Updated version for Blender 2.9x, UPBGE and latest Qt

Hi! I have no idea if anyone will see this, but I'd like to make a request to get this updated for the newest versions of Blender and UPBGE.

With the Mandalorian showing that virtual production can be done live and in-camera, thousands of people have suddenly become interested in immersive display tech. The only current viable option is Unreal with their nDisplay system, which BlenderVR provides an almost 1:1 parity in functionality with--it just needs to be given a little love :)

Blender-VR commandline + addon within Blender

This is not a top priority, but for the records this involves:

Blender VR from command line

Passing the xml, .blend file and processor files as arguments, for example:

blenderVR --project=”Capture test” --xmlfile=/tmp/1.xml --blendfile=sample.blend --processor=processor.py

Blender VR from within a Blender Addon

The initial interface can have the options:

  • The project this .blend file belongs to
  • A path for the XML file [defined per project]
  • A path for the processor file [defined per project]
    ( Run

Blender VR from within a Blender Addon with an interface to save/load XML

The XML file could be built from within an interface inside Blender. That would generate a XML on-the-fly when running the application. That should also allow for saving/loading XML files.

This depends on #10

Blender-VR Software License

The current code is licensed as CECILL. If Blender-VR could adopt a more standard license (apache, GPL) there may be no need for CECILL. Make sure we comply with the license of the dependencies as well (VRPN, …).

Python 3.5; Cannot find BlenderVR root

I'm on fedora 24 which comes with Python 3.5, so PySide is not available (and won't be for python >3.4, see pyside/PySide#132)
So I try to run without the gui. here is my cln:
./blendervr start -configuration ../samples/basic.xml -screen 'Fullscreen' -processor "../samples/basic/head-navigation/roomVR.processor.py" -blend "../samples/basic/head-navigation/roomVR.blend"
see complete output [here] (https://gist.github.com/Cygn/daba136bcab1db8ed9acb52f744712ff)

I guess PySide errors are harmless, and the daemon starts, but dies with:

AttributeError:
'NoneType' object has no attribute 'useLoader'
Cannot find BlenderVR root !
Try adding --BlenderVR-root option to BlenderVR (./blendervr --BlenderVR-root="path") !

Adding different flavors of --BlenderVR-root pointing to source, . or /absolute/to/source didn't help.
note that above processor/xml/blend configuration were tested OK.
I guess there are other modules which won't take 3.5 ? Is there a workaround ?

XML: Media Folder and Projects

This is a low priority, specially since I'm the only one who may see the need for this ;)
But the idea is to specify for each 'client' node where the media folder is. The media folder would have a subfolder per "project", named after the project name.

The idea is to streamline the process of dispatching the files to the clients. This is a separate issue, and a more complicated one, but media folders would help that.

From the original document:
"""
The XML file should include in the definition of each client/master a media folder. The media folder will store subfolders for the individual projects being ran into the VR-Lab. The projects informations are not included in the XML definition.

A project is a simple combination of .blend file, processor file and name. The Blender-VR Interface should allow the operator to add/remove projects. Remember that a single VR-Lab can run the same projects in different XMLs VR-Lab setups, and different projects in the same XML VR-Lab.
"""

Blender-VR UI-Less Mode

As discussed in the October 1st meeting, we could explore having a version that runs without the UI requirements (thus without requiring the user to install QT and PySide). This would also be a first step to allow the files to be deployed as standalones.

@PyrApple said that @touraine would look at this, so there is no need for a quick hack for now. But it would be nice to have the plans somewhere, or a time frame, or at least a branch once the development kicks off.

Write the missing pydocs

This will take time, so it's low priority, but at least the parts that are accessible to the user (via the processor) should be well documented.

BlenderVR installer (Windows 64-bit): old references to blender-vr

I installed BlenderVR using the Windows 64-bit install.exe and it didn't work, because there are two references in BlenderVR.bat and in BlenderVR-install.bat that point to blender-vr, while they should point to source.
For BlenderVR.bat:
.\venv\Scripts\python.exe .\blender-vr\blenderVR
should be
.\venv\Scripts\python.exe .\source\blenderVR

and for BlenderVR-install.bat:
%BVR_PATH%\venv\Scripts\pip3 install -r %BVR_PATH%\blender-vr\requirements.txt
should be
%BVR_PATH%\venv\Scripts\pip3 install -r %BVR_PATH%\source\requirements.txt

I would like to give you a pull request, but cannot find the installer source code that creates these bat-files.

Make Yo Frankie to work in Blender 2.72

This is a top task, but its sub-tasks will be created in the yo-frankie repository.

The idea is to make Yo Frankie to work in Blender 2.72 as it once working, or close to it. We should at least have the basic level navigation interaction, graphics, and sound.

Work without any processor.py or at least better errors

We already have a default processor (modules/blendervr/processor/default.py). I think we should have an option to use it instead of forcing the user to create a processor file every single time.

Or at least to throw a more comprehensive error when the problem is that the indicated file is missing and not that the processor file is not correct.

Move Yo Frankie to GitHub

It was important to have a copy of the svn server for staged commits, but on top of that it's beneficial to have a place to push everyday's changes, and where everyone can follow the progress.

Since github allows us to access it via svn we should mirror the server here. I won't push the entire svn tree, but instead the git-svn version of it.

error 'BlenderVR_root' is not defined

I can't launch blenderVR after updating to current release.

I got an error in line 55 of blenderVR.py:
File "/home/jespa/bin/blender-vr/blender-vr/utils/blenderVR.py", line 55, in main
sys.path.append(os.path.join(BlenderVR_root, 'modules'))
NameError: name 'BlenderVR_root' is not defined

I have tried to define it in the previous line, just to receive the same error
in line 54 of console.py:
File "blender-vr/modules/blendervr/console/console.py", line 54, in init
self._update_loader_script = os.path.join(BlenderVR_root, 'utils',
NameError: name 'BlenderVR_root' is not defined

Defining the BLENDER_VR_ROOT enviroment variable does not help...

[NOT A BUG] Modal timing / watching inside Blender while running in VR

Hello all,
I am very new to Github so and I am not sure if this is the right place to post a question. if this the case,please advise me where to post this,

I have written a script in blender using modal timer that constantly watches a folder to a import .ply and a Georaster as they get updated in GRASS GIS via Kinect. The code also watches for new GIS shapefiles that define a camera path or spot.

I am looking for a recommendations on how to use this blender file in BlenderVR. Can I load the blender file in VR and write the processor file as such that read and run the script inside the blender file ?

Below is part of the code inside blender.

pointPath= "C:/Users/ptabriz/Desktop/Blender_raster/Test_1/new.ply"
scratchPointPath= "C:/Users/ptabriz/Desktop/Blender_raster/Test_1/scratch.ply"

class ModalTimerOperator(bpy.types.Operator):
"""Operator which runs its self from a timer"""
bl_idname = "wm.modal_timer_operator"
bl_label = "Modal Timer Operator"

_timer = 2

def modal(self, context, event):
    if event.type in {'RIGHTMOUSE', 'ESC'}:
        self.cancel(context)
        return {'CANCELLED'}

    if event.type == 'TIMER':
        if os.path.exists(pointPath):

            #bpy.context.selected_objects
            bpy.ops.import_mesh.ply(filepath=pointPath,directory="C:/Users/ptabriz/Desktop/Blender_raster/",filter_glob="1.ply")
            os.rename(pointPath,scratchPointPath)
            bpy.data.objects["new"].select = True
            bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN', center='MEDIAN')
            bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN', center='MEDIAN')   
    return {'PASS_THROUGH'}

def execute(self, context):
    wm = context.window_manager
    self._timer = wm.event_timer_add(0.1, context.window)
    wm.modal_handler_add(self)
    return {'RUNNING_MODAL'}

def cancel(self, context):
    wm = context.window_manager
    wm.event_timer_remove(self._timer)

def register():
bpy.utils.register_class(ModalTimerOperator)

def unregister():
bpy.utils.unregister_class(ModalTimerOperator)

if name == "main":
register()

# test call
bpy.ops.wm.modal_timer_operator()

def unregister():
bpy.utils.unregister_class(ModalTimerOperator)

if name == "main":
register()

# test call
bpy.ops.wm.modal_timer_operator()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.