Page 1 of 3

LÖVR - a LÖVE-like engine for virtual reality

Posted: Tue Oct 04, 2016 10:31 pm
by bjornbytes
This is an experimental port of LÖVE I started that is geared towards virtual reality. The main goal is to provide an alternative to some of the bigger engines when it comes to making VR games, and to allow people to use the wonderful LÖVE API to do so. I'm also using it as a fun project to learn more about engine/graphics development :). Right now the following is supported:

- Rendering to each eye of the headset automatically
- Getting pose information for the headset and controllers
- Getting input state for the Vive controllers and triggering haptic feedback
- Playing audio, spatialized using HRTFs and the headset's pose.
- 3D models with textures and normals (most 3D file formats are supported)
- 3D graphics primitives (points, lines, triangles, planes, and cubes)
- Skyboxes (equirectangular panoramas, cube maps)
- Custom shaders
- Fairly complete port of Mesh for rendering arbitrary textured geometry
- Most of the graphics state functionality with additions for 3D (3D matrix stack, depth test, backface culling)
- Filesystem IO
- Font rendering

Notably, it currently doesn't support:

- Headsets that don't support OpenVR
- Keyboard/Mouse

The project compiles on Windows/OSX with CMake and is available on Github:

https://github.com/bjornbytes/lovr

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Wed Oct 05, 2016 6:33 am
by undef
Don't have a Vive, but that's pretty cool!
How does it perform? GIFs?

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Wed Oct 05, 2016 8:02 am
by Ulydev
Amazing!

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Wed Oct 05, 2016 9:59 am
by Tanner
Very cool!

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Thu Oct 06, 2016 12:07 pm
by GreenWing
Very exciting it!

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Sun Oct 09, 2016 4:26 am
by bjornbytes
undef wrote:Don't have a Vive, but that's pretty cool!
How does it perform? GIFs?
Here's a video with a bunch of cubes: https://twitter.com/bjornbytes/status/7 ... 2998105088

The code for that was pretty simple:

Code: Select all

function lovr.draw(eye)
  lovr.graphics.setColor(80, 0, 160)
  for x = -4, 4 do
    for y = -4, 4 do
      for z = -4, 4 do
        lovr.graphics.cube('fill', x + .5, y, z, .2)
      end
    end
  end
end
Along with a custom shader for the lighting. Each call to lovr.graphics.cube is a draw call, but I think that could be improved by using a Mesh.

Performance seems pretty good so far. Most drawing operations are just drawing a VBO with a handful of vertices, although everything is rendered twice (once for each eye). There are a lot of smaller optimizations I'd like to make, but right now I'm focusing more on getting additional functionality done.

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Wed Nov 02, 2016 1:44 pm
by Ranguna259
Awesome !
Any thoughts on model animations ?

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Wed Nov 02, 2016 3:48 pm
by kicknbritt
O_O omg this is really cool! keep it up!

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Mon Nov 07, 2016 6:30 am
by D0NM
Well... at least we can add
some Nintendo 3DS depth effect into 2d games ^__^

Re: LÖVR - a LÖVE-like engine for virtual reality

Posted: Mon Nov 07, 2016 7:26 am
by raidho36
But why didn't you use existing framework and patch it to work in 3d and VR?