
Photorealistic head in WebGL and WebVR - bkmn
https://cdn.rawgit.com/pbeck/head-webvr/master/index.html
======
bhouston
It isn't that photorealistic. :( I much prefer these two:
[http://alteredqualia.com/xg/examples/deferred_skin.html](http://alteredqualia.com/xg/examples/deferred_skin.html)
[http://alteredqualia.com/xg/examples/deferred_skin_eyes.html](http://alteredqualia.com/xg/examples/deferred_skin_eyes.html)

But it does work in WebVR. :)

~~~
nsxwolf
The way he stares at me when he moves is terrifying :(

------
bkmn
Video:
[https://www.youtube.com/watch?v=g-Ynyq8e7dE](https://www.youtube.com/watch?v=g-Ynyq8e7dE)

Hello VR devotees,

I've been working on getting the Three.js head and skin demo working in a
WebVR context. The basics are now working (press 'f' for vr fullscreen) and
I'd love some feedback – and ideas on what you'd like to see next.

Note: to get this demo working you'll need a firefox nightly build (more info
at [http://mozvr.com](http://mozvr.com)) or Chromium WebVR-build
([https://drive.google.com/a/google.com/folderview?id=0BzudLt2...](https://drive.google.com/a/google.com/folderview?id=0BzudLt22BqGRbW9WTHMtOWMzNjQ&usp=sharing#list)),
and naturally a VR headset. It's only been tested with OVR DK2, so I'd love
feedback on other HMDs too.

~~~
teach
It would be nice if you included this info on the page itself. It wasn't
obvious to me from the title that this demo _requires_ VR; it's not just
WebGL.

~~~
Aoyagi
Oh, so that's why I see only 5 or so skin-coloured pixels.

------
mondainx
Dangit [.WebGLRenderingContext]GL ERROR :GL_INVALID_OPERATION :
glDrawElements: Source and destination textures of the draw are the same.
index.html:1 WebGL: too many errors, no more errors will be reported to the
console for this context.

------
moron4hire
So, the basics for taking any ol' Three.JS scene and getting it to run on a
WebVR enabled browser comes down to querying for HMDs and Orientation sensors;
passing an HMD object to the requestFullScreen function; handling resize
events to set the render dimensions of the canvas by the HMD dimensions, but
its CSS dimensions by the window dimensions; creating a THREE.VRControls
object to wrap the camera object; and creating a THREE.VREffect object to wrap
around the renderer.

What sort of difficulties were you running into with this particular demo that
made it more difficult than that?

------
sakri
Here's a blog post by David Lenaerts about Deferred Subsurface Scattering
using Compute Shaders for generating realistic skin :

[http://www.derschmale.com/2014/06/02/deferred-subsurface-
sca...](http://www.derschmale.com/2014/06/02/deferred-subsurface-scattering-
using-compute-shaders/)

------
wahsd
Anyone know why it might not be working for me? All the other demos in this
thread work.

------
bkmn
Updated link with clearer instructions: [https://cdn.rawgit.com/pbeck/head-
webvr/release/index.html](https://cdn.rawgit.com/pbeck/head-
webvr/release/index.html)

------
forrestthewoods
Opened in Chrome on a Windows 8 PC. It didn't work. I'm genuinely surprised
anytime anything ever works in a WebGL context. It does not seem to happen
very often.

------
castell
Is the code available (e.g. github)?

~~~
bkmn
Yup, [https://github.com/pbeck/head-webvr](https://github.com/pbeck/head-
webvr)

