Hacker News new | past | comments | ask | show | jobs | submit login
Photorealistic head in WebGL and WebVR (rawgit.com)
37 points by bkmn on March 12, 2015 | hide | past | favorite | 16 comments



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_eyes.html

But it does work in WebVR. :)


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


Yup, those are two even stronger.

I'm hoping to 'convert' those two aswell, but I'm hoping to get some kind of facial animation running first :)


Very impressive. The eyes are still glassy and the nostril seems to be lighten from the bottom or from the inside, which is weird.

But we are getting there.


Video: 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) or Chromium WebVR-build (https://drive.google.com/a/google.com/folderview?id=0BzudLt2...), and naturally a VR headset. It's only been tested with OVR DK2, so I'd love feedback on other HMDs too.


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.


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


Yeah, sorry about that. I've updated that but the CDN propagation is a bit slower than I'd like.


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.


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?


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...


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


Updated link with clearer instructions: https://cdn.rawgit.com/pbeck/head-webvr/release/index.html


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.


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





Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: