LuxVR: Virtual Reality with LuxRender

Discussions related to GPU Acceleration in LuxRender

Moderators: Dade, jromang, tomb, coordinators

LuxVR: Virtual Reality with LuxRender

Postby Dade » Thu Feb 07, 2013 9:49 am

WARNING: this post requires the usage of the most visionary spyglass you have.

Edit: a demo video of LuxVR is available at http://youtu.be/JrvyjqYX6o8

Introduction

I have worked in Virtual Reality field most than 20 years ago:

vr.jpg


It was a field with a lot of promises but it didn't really delivered an usable product at the end. We were using HMD (Head Mounted Display) with a weight of 5-6Kg and a resolution of 320x240. Sensors were expansive and inaccurate. Graphics output required very expansive SGI workstations that were slower than a today tablet.

LuxVR

Today technology offers what wasn't available 20 years ago. HMDs are light weight, sensors are cheap and GPUs can deliver real-time path tracing. Just imagine to enable full screen LuxGUI and to be able to mover around with an experience similar to Sfera: http://www.youtube.com/watch?v=Dh9uWYaiP3s The image is blurred when moving around but it fast converges to a good rendering when you stop. It would be an amazing application for virtual prototyping, virtual architecture, etc.

LuxVR: The Output

The best candidate seems to be The Oculus Rift HMD: http://www.oculusvr.com

Oculus_VR_2.jpg


Cheap, light, good resolution and with low latency sensors. Another possible type of output will be a CAVE setup:

CAVE_christie_2.jpg


While this solution is useful to share the same experience among multiple people, it is also quite expansive to setup. At the end of the day, you can also use a desktop monitor but it doesn't even come near to other options.

LuxVR: The Input

Nintendo Wii control is a cheap device and provide more than enough data for moving around and interact with a virtual scene:

wii.jpg


The device can be connected to any PC/Mac because it just uses bluethoot as connection protocol. There is some open source project showing how to use the device. Again, even a mouse can be used but it doesn't come near to other options.

LuxVR: The Computing Hardware

GPUs, many GPUs, a loooot of GPUs. It will works with one GPUs but more GPUs you have and better the experience is going to be.

LuxVR: The Computing Software

It is going to be a special SLG render engine with some of the trick used by Sfera GPU in term of post-processing and Sampler setup (code name RTPATHOCL as discussed in another thread).

The (Not) Virtual Reality

The Oculus Rift HMD isn't yet available, LuxRender API doesn't include any of the functions required for real-time/interactive rendering, etc. So what you can expect in a short future ?

I have written a new Render Engine for SLG, named FILESAVER. It is a render engine that allows you to save a scene in SLG format (instead than producing an image). The result is that you can use LuxGUI or LuxConsole (with SLGRender) to translate a scene from LuxRender SDL (Scene Description Language) in SLG SDL. This mean you can now use the SLG GUI (and all SLG real-time/interactive mechanics) to render a LuxRender scene. This is LuxTime scene running inside SLG GUI:

slg.jpg


I may rename SLG GUI executable in LuxVR in the future and extend the current code to support all the idea described in this post.

Now you can take off your visionary spyglass ;)
User avatar
Dade
Developer
 
Posts: 8393
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxVR: Virtual Realty with LuxRender

Postby Dade » Thu Feb 07, 2013 9:58 am

Some note on how the trick works. To translate a scene in SLG format, you have just to add the following line to a Lux scene:

Code: Select all
Renderer "slg" "string config" ["renderengine.type = FILESAVER" "filesaver.directory = slg-export"]


and then run something like:

Code: Select all
luxconsole luxtime.lxs


This will export, inside the directory "slg-export", a complete and stand alone SLG scene. You can than:

Code: Select all
cd slg-export
slg4 render.cfg


and just run around the Lux scene inside the SLG GUI.

NOTE: the process can be totally automated. For instance, LuxBlend could have a flag or a (virtual) Renderer to run luxconsole and the SLG GUI under the hood as it usually run Lux GUI.
User avatar
Dade
Developer
 
Posts: 8393
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxVR: Virtual Realty with LuxRender

Postby tomb » Thu Feb 07, 2013 11:44 am

This sounds and looks awesome indeed :) Apparently there is going to be dev devices of the vr glasses shipped soon, looking forward to all the cool things devs all around the world will cook up - just look at all the neat things hackers have done with the quite basic kinect hw.

Nice work on the filesaver thingy too, I wondered what it was all about :) Very useful!
User avatar
tomb
Developer
 
Posts: 2677
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: LuxVR: Virtual Realty with LuxRender

Postby SATtva » Thu Feb 07, 2013 1:56 pm

tomb wrote:Nice work on the filesaver thingy too, I wondered what it was all about :) Very useful!

Yep, guessed it would end up like something like this, especially after Dade leaked recently about a trick he has to allow realtime interaction in Lux. Very nice indeed. Oh, if we could also have something like the old SLG Live mode so scene settings are kept in sync between the renderer and the modeler...
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 7164
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: LuxVR: Virtual Realty with LuxRender

Postby HoloFan » Fri Feb 08, 2013 12:42 pm

@Dade: Very cool idea!
Regarding the file saver: I don't quite understand why there are two scene description languages being supported. Wouldn't it be easier in future development to just have to bother with one SDL and the RT-Version of LuxRender only supporting a part of the full features? I hope the question is not too silly...

Another thing for realtime: How is this with animation? Is it performance wise practical to have two QBVH-trees with one rebuilt for every frame?
What do you experienced guys think about DACRT? (http://www.reedbeta.com/blog/2012/09/29 ... aytracing/) This blog-entry was posted here in the forums and I had a look into the linked papers as well, but I didn't find any mention of it in the forums here...
HoloFan
 
Posts: 103
Joined: Sat May 14, 2011 7:04 am

Re: LuxVR: Virtual Realty with LuxRender

Postby Dade » Fri Feb 08, 2013 1:43 pm

HoloFan wrote:@Dade: Very cool idea!
Regarding the file saver: I don't quite understand why there are two scene description languages being supported. Wouldn't it be easier in future development to just have to bother with one SDL and the RT-Version of LuxRender only supporting a part of the full features? I hope the question is not too silly...


It is mostly for "historically" reasons: SLG had is very simple SDL and it evolved over time. At the moment it can see just as an internal format.

HoloFan wrote:Another thing for realtime: How is this with animation? Is it performance wise practical to have two QBVH-trees with one rebuilt for every frame?


For animation, QBVH rebuilding times are still a lot smaller than single frame rendering time so there is little incentive to optimize accelerator construction code instead that rendering code.

HoloFan wrote:What do you experienced guys think about DACRT? (http://www.reedbeta.com/blog/2012/09/29 ... aytracing/) This blog-entry was posted here in the forums and I had a look into the linked papers as well, but I didn't find any mention of it in the forums here...


DACRT is an interesting idea but it looks like something very tailored for CPUs (i.e. recursion, dynamically built structure, etc.). Has ever been a GPU implementation ?
User avatar
Dade
Developer
 
Posts: 8393
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxVR: Virtual Realty with LuxRender

Postby HoloFan » Fri Feb 08, 2013 2:29 pm

Thanks for the answers and this awesome piece of software! :)
HoloFan
 
Posts: 103
Joined: Sat May 14, 2011 7:04 am

Re: LuxVR: Virtual Realty with LuxRender

Postby Zom-B » Fri Feb 08, 2013 6:55 pm

Dade wrote:DACRT is an interesting idea but it looks like something very tailored for CPUs (i.e. recursion, dynamically built structure, etc.). Has ever been a GPU implementation ?
http://asgerhoedt.dk/?page_id=240
Zom-B
 
Posts: 61
Joined: Sun Oct 14, 2007 10:30 pm

Re: LuxVR: Virtual Realty with LuxRender

Postby Dade » Sat Feb 09, 2013 7:59 am

Zom-B wrote:
Dade wrote:DACRT is an interesting idea but it looks like something very tailored for CPUs (i.e. recursion, dynamically built structure, etc.). Has ever been a GPU implementation ?
http://asgerhoedt.dk/?page_id=240


Thanks, very interesting, there are even the sources available: https://github.com/papaboo/dacrtGPU (but why people use CUDA ... :| ).
User avatar
Dade
Developer
 
Posts: 8393
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: LuxVR: Virtual Realty with LuxRender

Postby neo2068 » Sat Feb 09, 2013 12:57 pm

Dade wrote:Some not on how the trick works. To translate a scene in SLG format, you have just to add the following line to a Lux scene:

Code: Select all
Renderer "slg" "string config" ["renderengine.type = FILESAVER" "filesaver.directory = slg-export"]


and then run something like:

Code: Select all
luxconsole luxtime.lxs


This will export, inside the directory "slg-export", a complete and stand alone SLG scene. You can than:

Code: Select all
cd slg-export
slg4 render.cfg


and just run around the Lux scene inside the SLG GUI.

NOTE: the process can be totally automated. For instance, LuxBlend could have a flag or a (virtual) Renderer to run luxconsole and the SLG GUI under the hood as it usually run Lux GUI.


The ply export/import does not work correctly on windows due to CR LF line endings. If I start SLG it aborts with an error:
Code: Select all
RPly: Not a PLY file. Expected magic number 'ply\n'
[SLG] RUNTIME ERROR: Unable to read PLY mesh file 'scenes/export-test/mesh-00000.ply'

If I change the code in rply.cpp according to the rply.c used by luxrender, e.g. change magic number code to
Code: Select all
if (strcmp(magic, "ply\n") && strcmp(magic, "ply\r")) {

it aborts with an error:
Code: Select all
RPly: Error reading value number 7 of 'vertex_indices' of 'face' number 0
[SLG] RUNTIME ERROR: Unable to parse PLY file 'scenes/export-test/mesh-00000.ply'

If I manually replace all CR LR endings with LR endings it works fine.
i7 5820K, 32 GB RAM, NVIDIA Geforce GTX 780 + GTX 560, Windows 10 64bit, Blender 2.77a
neo2068
Developer
 
Posts: 742
Joined: Sun May 03, 2009 2:11 am
Location: Germany

Next

Return to GPU Acceleration

Who is online

Users browsing this forum: No registered users and 1 guest