Blender Git Loki

Blender Git "soc-2019-openxr" branch commits.

Page: 14 / 18

July 9, 2019, 08:56 (GMT)
Enable grid floor in VR session

Helps quite a bit orientating.
July 8, 2019, 12:18 (GMT)
Merge branch 'master' into soc-2019-openxr
July 8, 2019, 12:13 (GMT)
Use base pose from Blender camera

I was trying to set the camera pose as OpenXR reference pose. But then I
got really strange poses for drawing back from OpenXR. Couldn't figure
out a way to solve this.
Now we just apply OpenXR's draw pose to the Blender camera pose. If we
later want to support moving around in the scene (e.g. via teleporting),
that has to be changed.

Also uses flipped drawing for DirectX surface to correct DirectX upside
down drawing (compared to OpenGL).
July 7, 2019, 11:07 (GMT)
Don't recreate reference local space on each redraw

Set this up on session start.
July 7, 2019, 10:45 (GMT)
Add GHOST_XrSession class for cleaner & safer session management

Session code and data structures are now localized. But also, this
enables sessions to use deterministic destruction to end itself cleanly.
So whenever an error occurs, we can use stack unwinding which will cause
graceful ending of the session.
July 3, 2019, 19:01 (GMT)
Properly end VR sessions fixing crash on next session start

Previously, you had to restart Blender to start another session.
July 1, 2019, 17:04 (GMT)
Cleanup GHOST_Xr types and functions

* Move GHOST_Xr types to GHOST_Types.h
* Add GHOST_XrPose. We'll have to pass around pose data at multiple
places.
* Don't require extra call to prepare session rendering, handle
everything through GHOST_XrSessionStart
* Naming
July 1, 2019, 13:57 (GMT)
Initial HMD viewport rendering (DirectX only first)

Finally: This makes it possible to render a viewport to an HMD via
OpenXR. Pure OpenGL rendering will need some more tweaks to work.
To my great delight, performance is quite good for reasonably sized
scenes.

Had to do some hacks and marked some TODOs. Nothing too bad though.

Here are a couple of notes:
* Current initial pose is pretty useless, think it just looks downwards
from world origin. Will change that soon.
* The rendered viewport has some issues: Too dark (bad lighting?), grid
doesn't show up even though I told it to, lighting seems to change with
view position/rotation, etc. Needs some polish.
* Ideally we'd just use the D3D11 Texture given to us via the OpenXR
swapchain and blit the OpenGL framebuffer into that. However the
NV_DX_interop extension fails doing this. Seems like this is a NVidia
Optimus only issue, but I'm missing the hardware to confirm.
So instead, we blit into the D3D11 back buffer first and then into the
Texture.
* The draw-manager uses its own offscreen context so we have to get the
render result from the draw-manager context to the VR session's
context first. Luckily I've already added code to support blitting from
one OpenGL context into another. But it requires blitting twice.
Blitting should be very cheap, but still...
Draw-manager could get a context to use passed instead.
June 29, 2019, 00:30 (GMT)
Draw offscreen viewport in XR session surface callback

Not visible yet, but it should draw in the offscreen. The way this is
now, we don't depend on the Window->Workspace->bScreen->... chain. We
simply draw an offscreen viewport in the draw callback of the XR session
surface.

The drawing also uses view and projection matrices from OpenXR (or
calculated from OpenXR data).
June 28, 2019, 20:53 (GMT)
Move WM level XR functions to wm_xr.c

Operator is still in wm_operators.c, but only calls wm_xr.c functions.
June 28, 2019, 14:24 (GMT)
Support Window-less (offscreen) VR session on Windows

Uses the new wmSurface type (non-window drawable container) to manage
the OpenGL, DirectX and GPU module contexts. The draw callback of the XR
surface calls the GHOST_Xr session drawing routines.

What you should see when starting a VR session now (using the WMR
runtime): The Windows Mixed Reality Portal pops up, and a blue
background is drawn on the HMD. This is from the blue color clear call
we do in the drawing preparations of the GHOST_Xr session drawing.
June 28, 2019, 12:09 (GMT)
Merge branch 'master' into soc-2019-openxr
June 28, 2019, 11:56 (GMT)
Avoid std::vector copy
June 28, 2019, 11:38 (GMT)
Add wmSurface for non-Window offscreen VR session drawing

Adds a wmSurface type which acts as a container for non-Window (offscreen)
draw surfaces. Ideally wmWindow would of course also just do C-style
inheritance from wmSurface, but I guess they can co-exist too.
For the VR session a surface is created on Linux and passed to the
graphics binding to use.

Note this is not used on Windows yet, it still opens a window there.
June 27, 2019, 17:55 (GMT)
Fix compile/CMake errors and warnings on Linux
June 27, 2019, 17:17 (GMT)
Finish VR view drawing callback set up

* Allow passing custom data to session draw function, passed to the
callback
* Actually call the callback
* Create and bind a WM level callback. Will later be used to draw the
viewport.

Also, check if session is actually visible before drawing.
June 27, 2019, 16:56 (GMT)
Don't use Microsoft::WRL::ComPtr<...> for COM types

Makes things difficult if you're not familar with COM.
June 26, 2019, 16:39 (GMT)
Merge branch 'master' into soc-2019-openxr
June 24, 2019, 19:22 (GMT)
The first pixels pushed to Windows Mixed Reality HMDs!

Just a clear call for now, so all you see is a blue world. This blue
"world" is however drawn by Blender!

Also fixes use after destruction of compositor layer data.
June 24, 2019, 14:44 (GMT)
Set up OpenXR compositing layers for drawing

That should be one of the last steps to prepare pushing pixels to HMDs.
Fingers crossed!
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021