
Realistic Skin Rendering in WebGL - mef
http://alteredqualia.com/three/examples/webgl_materials_skin.html
======
simonw
Here's the texture it uses (just from viewing source) - kind of interesting:
[http://alteredqualia.com/three/examples/obj/leeperrysmith/Ma...](http://alteredqualia.com/three/examples/obj/leeperrysmith/Map-
COL.jpg)

------
5hoom
Beautiful.

It's great seeing advanced 3D effects (sub-surface scattering and normal
mapping? I think thats what we're seeing here) escape the realm of typeA games
and show up on a web browser, running at a very acceptable framerate.

Looks like web3D really is taking off, can't wait for more 3D engines written
on top of webGL so non openGL-wizards can get in on the fun :)

------
moultano
Is this actually doing subsurface scattering or just taking normals that are
barely in shadow and giving them a red glow? I can't tell which it is (and I'm
not sure how I would visually.)

~~~
bd
Author here.

It's approximation of subsurface scattering, modeled by combination of
multiple Gaussian blurs done in texture space (there are 4 blur layers plus
original normal mapped Blinn-Phong layer).

If you are interested in details, it's basically a simplified implementation
of Nvidia's advanced skin rendering presented at GDC 2007:

[http://developer.download.nvidia.com/presentations/2007/gdc/...](http://developer.download.nvidia.com/presentations/2007/gdc/Advanced_Skin.pdf)

~~~
aschwo
This is awesome! Are you able to implement the physically based specular term
and still have acceptable performance?

You'll need the precomputed Beckmann distribution in a texture:
<http://developer.nvidia.com/node/171>

~~~
bd
Maybe. I didn't get yet to play with specular term, current one is just
vanilla Phong.

There should be still some performance margin left, I tried to tune it to keep
60 fps on my notebook.

~~~
bd
And it's done, if you clear cache and reload, it should be using physically
based specular term.

Visual difference is quite subtle - skin feels more "silky" and ears are more
shiny.

No noticeable degradation of performance.

------
mxavier
I opened the tab and then forgot about it while reading other stories. Scared
the shit out of me when I got around to this tab.

------
yangyang
Some of the other examples are pretty impressive too:
<https://github.com/mrdoob/three.js>

------
czhiddy
It's a little amusing how popular these WebGL reimplementations of 2004-era
OpenGL demos are.

~~~
saturn
That's like saying "It's a little amusing how popular these web
reimplementations of 2004-era word processors are". Dude, being on the web
makes a huge difference. No software to install is massive. You can't link to
a program running on your desktop. It's a great leap forward.

~~~
roel_v
Really? You feel that reimplementing a word processor on the web is a major
leap forward? To me it looks like old wine in new bags. I could link to word
processor-like Java Applets in 1998. I realize it's not 100% the same, but
trying to re-implement all these things we've had for 10 years in substandard
technology just seems like a procession of Echternach.

(btw current web word processors barely approach Wordpad level - the level of
functionality we had on the desktop in 1995).

~~~
ido

        (btw current web word processors barely approach 
        Wordpad level - the level of functionality we 
        had on the desktop in 1995).
    

And still I use google docs every day & can't remember the last time I used ms
word, so maybe there is something to it ;)

------
grantjgordon
So impressive, but so creepy.

~~~
beaumartinez
There's a certain "plasticity" to the skin—very uncanny valley.

~~~
tsumnia
I think the plasticity comes from the ears and eyes, which to me seem a bit
doctored.

I think the uncanny valley could be overcome with some subtle rigging to
simulate a person's micro-gestures. Its not often you look at a human
completely motionless, sans a wake.

------
wccrawford
Anyone got a screenie for those of us who don't have a computer than can
handle WebGL right this second?

~~~
vidar
<http://imgur.com/vFpwu>

~~~
pbhjpbhj
The head moves with mouse drag to present different angled views of the head
with the light source staying static.

------
code_jockey
I half expected it to suddenly open it's eyes and cause me to change my pants.

------
palish
Nice. I've actually been working on this. Work in progress:
[http://content.screencast.com/users/shawnpresser/folders/Jin...](http://content.screencast.com/users/shawnpresser/folders/Jing/media/bdc11708-5fde-40b0-8e20-252dc3fa3b93/2011-09-04_0227.png)

------
rplacd
The face is cool, but three.js - the engine behind this - actually has quite a
pleasingly orthogonal API as well. Worth taking a look at alongside this.

(And where is the save button when I need it ;_;)

~~~
dualogy
Upvote the story and it's in your "saved stories". Your submissions too -- so
in fact, HN has become my new bookmarks manager.

~~~
rplacd
Thanks - I think I've actually had someone remind me of that before as well.
Damn embarrassing.

------
drivingmenuts
OK, that's just creepy if you have a large screen.

Very good. But creepy.

------
delackner
Firefox 4.0 Mac, hung for about 10 seconds with a black screen, popped open a
window saying the script is unresponsive so I told it to Stop. It hung another
2-3 seconds, finally showed a face, and crashed the browser. Fun!

~~~
ericHosick
Macbook Pro 13" Core 2 Chrome. Worked for me and a little "choppy".

------
antimora
For fun, the figure should open eyes after a minute so of viewing =)

------
sirwanqutbi
everything in this looks real, except the eye lids dont have eye lashes so the
light rebounding off the sealed eyelid looks crap. otherwise cool stuff

------
tintin
Maybe a silly question, but can you abuse WebGL for lets say multi-channel
audio processing (byte array, data URI)?

------
nextparadigms
Any way to see what's there besides visiting the link? (no WebGL) - like
picture or video?

------
aj700
impressive. the lighting is a bit clipped - not smooth.

why didn't they do a beautiful girl's face instead?

~~~
drivebyacct2
>why didn't they do a beautiful girl's face instead?

Because it's a tech demo and it's a known texture in the OpenGL community? Not
everyone in CS wants to stare at "beautiful girls", fortunately the Internet
has created an outlet for such desires.

~~~
drivebyacct2
I'm sorry. I completely understand karma grubbing is frowned upon and I
couldn't care less, especially about this post, but I really don't understand
how people are downvoting this post. Feel free to downvote this one... I'm
just genuinely curious what part of my post above this one is at all
controversial.

Am I supposed to like women? Am I supposed to objectify women at every turn,
especially in an industry where they're already highly objectified and
slighted?

~~~
sc00ter
No, you're supposed to read the comment you're responding to in the context in
which it was written. Did you bother to read the linked article before you
responding?

No? Didn't think so.

------
Ryan_IRL
I think the lighting is more impressive than the skin. Still, a cool tech
demo!

------
saturn
Amazing. We are surely looking at the future of porn.

~~~
dualogy
Downvotes notwithstanding, I think saturn is fundamentally right.

