tornavis/source/blender/blenlib
Julian Eisel dc2df8307f 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
2020-03-17 21:42:44 +01:00
..
intern VR: Initial Virtual Reality support - Milestone 1, Scene Inspection 2020-03-17 21:42:44 +01:00
BLI_alloca.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_allocator.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_args.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_array.h Cleanup: doxygen comments 2019-11-25 01:51:11 +11:00
BLI_array_cxx.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_array_ref.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_array_store.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_array_store_utils.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_array_utils.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_assert.h Fix: Build error with clang on windows. 2019-06-08 18:10:48 -06:00
BLI_astar.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_bitmap.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_bitmap_draw_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_blenlib.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_boxpack_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_buffer.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_compiler_attrs.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_compiler_compat.h Cleanup: work around clang-format differences between versions 2020-02-15 14:03:51 +01:00
BLI_compiler_typecheck.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_console.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_convexhull_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_delaunay_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_dial_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_dlrbTree.h Cleanup: spelling 2020-03-06 11:52:32 +11:00
BLI_dynlib.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_dynstr.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_easing.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_edgehash.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_endian_switch.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_endian_switch_inline.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_expr_pylike_eval.h Depsgraph: fix false positive time dependencies for simple drivers. 2020-01-24 20:48:02 +03:00
BLI_fileops.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_fileops_types.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_fnmatch.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_ghash.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_gsqueue.h Blenlib: Add C++ guard for Queue 2020-01-07 13:49:10 +01:00
BLI_hash.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_hash_cxx.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_hash_md5.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_hash_mm2a.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_hash_mm3.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_heap.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_heap_simple.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_index_range.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_iterator.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_jitter_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_kdopbvh.h BLI_bvhtree_overlap_ex: add 'max_interactions' parameter 2019-12-11 22:21:24 -03:00
BLI_kdtree.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_kdtree_impl.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_lasso_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_link_utils.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_linklist.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_linklist_lockfree.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_linklist_stack.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_listbase.h Python API: add methods for reordering constraints. 2019-09-04 22:38:33 +03:00
BLI_listbase_wrapper.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_map.h Cleanup: work around clang-format differences between versions 2020-02-15 14:03:51 +01:00
BLI_math.h doxygen: add newline after \file 2019-02-18 08:22:12 +11:00
BLI_math_base.h Cleanup: Replace ABS/SQUARE/CUBE with function calls 2020-03-09 14:47:59 +01:00
BLI_math_bits.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_math_color.h Cleanup: unused math colorspace defines 2020-02-15 15:24:02 +11:00
BLI_math_color_blend.h Cleanup: `make format` 2020-02-07 15:29:46 +01:00
BLI_math_geom.h VR: Initial Virtual Reality support - Milestone 1, Scene Inspection 2020-03-17 21:42:44 +01:00
BLI_math_inline.h doxygen: add newline after \file 2019-02-18 08:22:12 +11:00
BLI_math_interp.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_math_matrix.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_math_rotation.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_math_solvers.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_math_statistics.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_math_vector.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_memarena.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_memblock.h DRW: Refactor to support draw call batching 2019-09-17 15:16:43 +02:00
BLI_memiter.h Cleanup: redundant struct declarations 2019-08-25 16:45:47 +10:00
BLI_memory_utils.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_memory_utils_cxx.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_mempool.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_noise.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_open_addressing.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_optional.h Cleanup: add license header, use header guards 2020-02-11 11:37:35 +11:00
BLI_path_util.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_polyfill_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_polyfill_2d_beautify.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_quadric.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_rand.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_rect.h Merge branch 'blender-v2.82-release' 2020-01-27 19:48:54 +11:00
BLI_scanfill.h Cleanup: unused enums 2020-02-20 12:19:55 +11:00
BLI_set.h BLI: Improve forwarding semantics of some data structures 2019-09-14 12:11:14 +02:00
BLI_smallhash.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_sort.h Cleanup: spelling 2019-09-30 17:07:05 +10:00
BLI_sort_utils.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_stack.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_stack_cxx.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_strict_flags.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_string.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_string_cursor_utf8.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_string_map.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_string_ref.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_string_utf8.h Cleanup: remove unused BLI_strncat_utf8 2020-03-04 15:24:06 +11:00
BLI_string_utils.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_sys_types.h Fix T71273: Bad encoding of utf-8 for Text objects 2019-11-22 12:27:34 -03:00
BLI_system.h Cleanup: Fix build error with MSVC 2019-08-27 08:13:23 -06:00
BLI_task.h Cleanup: Remove unused task scheduler constants 2020-01-07 12:19:57 +01:00
BLI_threads.h Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
BLI_timecode.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_timer.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_utildefines.h Cleanup: Replace ABS/SQUARE/CUBE with function calls 2020-03-09 14:47:59 +01:00
BLI_utildefines_iter.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_utildefines_stack.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_utildefines_variadic.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
BLI_utility_mixins.h Cleanup: add license header, use header guards 2020-02-11 11:37:35 +11:00
BLI_uvproject.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_vector.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_vector_set.h BLI: improve various C++ data structures 2020-02-10 14:09:01 +01:00
BLI_vfontdata.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_voronoi_2d.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_voxel.h Cleanup: make remaining blenlib headers work in C++ 2020-03-02 15:05:15 +01:00
BLI_winstuff.h ClangFormat: apply to source, most of intern 2019-04-17 06:21:24 +02:00
CMakeLists.txt Build: add compatibility between precompiled libraries and new glibc 2020-02-26 18:13:14 +01:00
PIL_time.h Cleanup: comment blocks 2019-04-18 07:59:28 +02:00
PIL_time_utildefines.h Cleanup: comments (long lines) in blenlib 2019-04-22 06:30:08 +10:00