blendervr / source Goto Github PK
View Code? Open in Web Editor NEWBlender Virtual Reality Main Code
Blender Virtual Reality Main Code
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
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, …).
David, any update on that? We are waiting to see if we can produce "final" 2.72 patched Blender for all platforms.
While the configuration file (.xml) can be used to define the path towards blender binary*
it doesn't seem to be taken into account, as e.g. a misspelled declaration throws no errors in BlenderVR run.
Line concerned in .xml configuration file:
[...]
*(blender bpy used to modify the .blend on the go to add blender-vr related features prior to the BlenderVR run)
I'm running the dk2 config file and its not doing the barrel distortion to look good in the oculus. I was wondering what i could be doing wrong?
It's doing a small amount of distortion but nothing like this http://www.roadtovr.com/wp-content/uploads/2014/04/oculus-rift-sdk-0.3.1-sbs-rendering-2.jpg
This is not a top priority, but for the records this involves:
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
The initial interface can have the options:
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
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.
Yo Frankie is a good tech demo, but it was built for traditional gaming.
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.
all samples functional on osx and linux laptop but for animation sync. master/slave in spider.blend
Try this file with the split screen config
http://dalaifelinto.com/ftp/tmp/momo.blend
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.
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.
"""
which means the function may be interrupted half-way without the python writer knowing
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.
scene.addObject() and the like add objects only on Master node.
It seems that the list of objects to update* is not updated itself.
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.
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.
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.
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
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()
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:
<starter blender='~/my/path/to/blender'>
or <blenderplayer executable='~/my/path/to/blenderplayer'/>
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.
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 :)
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 ?
I would like to use these tools in my own work, however I require many upbge python api commands,
They have added or improved (suspend Physics(), reinstancePhysicsMesh(3rd argument), XboxSDL2, etc.
https://www.youtube.com/watch?v=tZOW8msMWk0
I also would love to use a 3d mouse to control IK in the actor, :D
https://www.youtube.com/watch?v=qVRzy54SuYc
I will add a test file later to the samples folder, but for now you can test with this file:
http://www.pasteall.org/blend/34089
(and the same processor file as the basic sample).
Note: Set Scene also fails, and Open Game too.
At the moment if you move an object as part of a VRPN device (e.g., to move a cube with an external VRPN device) we will see a delay of 1 frame between the master and the other screens.
Following Dalaï's issue on VRPN, we'll eventually have to rename the different Base.py and their associated classes to improve the code's affordance.
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').
This task doesn't include writing the documentation itself, but to make sure the auto-generated documents are parsed correctly. This requires some changes in the source code.
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.
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.
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?
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...
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.
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 --
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: {}
PowerShell:
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)
Since windows have an auto-installer, we could use the default installation place as the location for blender.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.