Blender Git Commit Log

Git Commits -> Revision dc2df83

Revision dc2df83 by Julian Eisel (master)
March 17, 2020, 20:42 (GMT)
VR: Initial Virtual Reality support - Milestone 1, Scene Inspection

NOTE: While most of the milestone 1 goals are there, a few smaller features and
improvements are still to be done.

Big picture of this milestone: Initial, OpenXR-based virtual reality support
for users and foundation for advanced use cases.
Maniphest Task: https://developer.blender.org/T71347
The tasks contains more information about this milestone.

To be clear: This is not a feature rich VR implementation, it's focused on the
initial scene inspection use case. We intentionally focused on that, further
features like controller support are part of the next milestone.

- How to use?
Instructions on how to use this are here:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test
These will be updated and moved to a more official place (likely the manual) soon.

Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC
headsets don't support the OpenXR standard yet and hence, do not work with this
implementation.

---------------

This is the C-side implementation of the features added for initial VR
support as per milestone 1. A "VR Scene Inspection" Add-on will be
committed separately, to expose the VR functionality in the UI. It also
adds some further features for milestone 1, namely a landmarking system
(stored view locations in the VR space)

Main additions/features:
* Support for rendering viewports to an HMD, with good performance.
* Option to sync the VR view perspective with a fully interactive,
regular 3D View (VR-Mirror).
* Option to disable positional tracking. Keeps the current position (calculated
based on the VR eye center pose) when enabled while a VR session is running.
* Some regular viewport settings for the VR view
* RNA/Python-API to query and set VR session state information.
* WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data
* wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU
context)
* DNA/RNA for management of VR session settings
* `--debug-xr` and `--debug-xr-time` commandline options
* Utility batch & config file for using the Oculus runtime on Windows.
* Most VR data is runtime only. The exception is user settings which are saved
to files (`XrSessionSettings`).
* VR support can be disabled through the `WITH_XR_OPENXR` compiler flag.

For architecture and code documentation, see
https://wiki.blender.org/wiki/Source/Interface/XR.

---------------

A few thank you's:
* A huge shoutout to Ray Molenkamp for his help during the project - it would
have not been that successful without him!
* Sebastian Koenig and Simeon Conzendorf for testing and feedback!
* The reviewers, especially Brecht Van Lommel!
* Dalai Felinto for pushing and managing me to get this done ;)
* The OpenXR working group for providing an open standard. I think we're the
first bigger application to adopt OpenXR. Congratulations to them and
ourselves :)

This project started as a Google Summer of Code 2019 project - "Core Support of
Virtual Reality Headsets through OpenXR" (see
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).
Some further information, including ideas for further improvements can be found
in the final GSoC report:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report

Differential Revisions: D6193, D7098

Reviewed by: Brecht Van Lommel, Jeroen Bakker

Commit Details:

Full Hash: dc2df8307f41888bab722f75fa9e73adecf86b72
Parent Commit: 406bfd4
Lines Changed: +2425, -221

7 Added Paths:

/release/windows/batch/blender_oculus.cmd (+14, -0) (View)
/release/windows/batch/oculus.json (+9, -0) (View)
/source/blender/makesdna/DNA_xr_types.h (+58, -0) (View)
/source/blender/makesrna/intern/rna_xr.c (+229, -0) (View)
/source/blender/windowmanager/intern/wm_surface.c (+118, -0) (View)
/source/blender/windowmanager/intern/wm_xr.c (+759, -0) (View)
/source/blender/windowmanager/wm_surface.h (+57, -0) (View)

67 Modified Paths:

/CMakeLists.txt (+1, -2) (Diff)
/intern/ghost/CMakeLists.txt (+3, -0) (Diff)
/intern/ghost/GHOST_C-api.h (+12, -0) (Diff)
/intern/ghost/GHOST_IContext.h (+9, -0) (Diff)
/intern/ghost/GHOST_Types.h (+20, -11) (Diff)
/intern/ghost/intern/GHOST_C-api.cpp (+14, -0) (Diff)
/intern/ghost/intern/GHOST_Context.h (+8, -0) (Diff)
/intern/ghost/intern/GHOST_IXRGraphicsBinding.h (+2, -0) (Diff)
/intern/ghost/intern/GHOST_XrContext.cpp (+3, -1) (Diff)
/intern/ghost/intern/GHOST_XrContext.h (+3, -0) (Diff)
/intern/ghost/intern/GHOST_XRGraphicsBinding.cpp (+2, -0) (Diff)
/intern/ghost/intern/GHOST_XRSession.cpp (+33, -10) (Diff)
/intern/ghost/intern/GHOST_XrSession.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_global.h (+2, -0) (Diff)
/source/blender/blenkernel/CMakeLists.txt (+4, -0) (Diff)
/source/blender/blenkernel/intern/object.c (+4, -2) (Diff)
/source/blender/blenlib/BLI_math_geom.h (+7, -0) (Diff)
/source/blender/blenlib/intern/math_geom.c (+19, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+35, -0) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+18, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+6, -0) (Diff)
/source/blender/CMakeLists.txt (+1, -0) (Diff)
/source/blender/draw/CMakeLists.txt (+4, -0) (Diff)
/source/blender/draw/DRW_engine.h (+9, -0) (Diff)
/source/blender/draw/intern/draw_manager.c (+38, -2) (Diff)
/source/blender/editors/include/ED_view3d.h (+17, -1) (Diff)
/source/blender/editors/include/ED_view3d_offscreen.h (+19, -0) (Diff)
/source/blender/editors/screen/screen_ops.c (+2, -1) (Diff)
/source/blender/editors/sculpt_paint/paint_cursor.c (+9, -4) (Diff)
/source/blender/editors/space_view3d/CMakeLists.txt (+4, -0) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+62, -25) (Diff)
/source/blender/editors/space_view3d/view3d_draw.c (+145, -8) (Diff)
/source/blender/editors/space_view3d/view3d_edit.c (+77, -53) (Diff)
/source/blender/editors/space_view3d/view3d_fly.c (+1, -1) (Diff)
/source/blender/editors/space_view3d/view3d_gizmo_navigate.c (+19, -16) (Diff)
/source/blender/editors/space_view3d/view3d_utils.c (+10, -10) (Diff)
/source/blender/editors/space_view3d/view3d_view.c (+91, -8) (Diff)
/source/blender/editors/space_view3d/view3d_walk.c (+1, -1) (Diff)
/source/blender/gpu/GPU_viewport.h (+3, -0) (Diff)
/source/blender/gpu/intern/gpu_viewport.c (+38, -8) (Diff)
/source/blender/makesdna/DNA_view3d_enums.h (+1, -0) (Diff)
/source/blender/makesdna/DNA_view3d_types.h (+28, -5) (Diff)
/source/blender/makesdna/DNA_windowmanager_types.h (+14, -0) (Diff)
/source/blender/makesdna/intern/makesdna.c (+2, -0) (Diff)
/source/blender/makesrna/intern/CMakeLists.txt (+5, -0) (Diff)
/source/blender/makesrna/intern/makesrna.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_space.c (+67, -37) (Diff)
/source/blender/makesrna/intern/rna_wm.c (+26, -0) (Diff)
/source/blender/makesrna/intern/rna_wm_gizmo.c (+6, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+2, -0) (Diff)
/source/blender/python/gpu/gpu_py_offscreen.c (+1, -0) (Diff)
/source/blender/windowmanager/CMakeLists.txt (+9, -0) (Diff)
/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c (+3, -2) (Diff)
/source/blender/windowmanager/gizmo/WM_gizmo_types.h (+7, -0) (Diff)
/source/blender/windowmanager/intern/wm.c (+5, -0) (Diff)
/source/blender/windowmanager/intern/wm_draw.c (+70, -12) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+2, -0) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+81, -0) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+29, -0) (Diff)
/source/blender/windowmanager/wm.h (+10, -0) (Diff)
/source/blender/windowmanager/WM_api.h (+16, -0) (Diff)
/source/blender/windowmanager/WM_types.h (+2, -0) (Diff)
/source/creator/CMakeLists.txt (+6, -0) (Diff)
/source/creator/creator_args.c (+24, -0) (Diff)
/tests/python/bl_load_addons.py (+3, -0) (Diff)
/tests/python/bl_load_py_modules.py (+3, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021