Three.js: Physically-based real-time subsurface scattering

Created on 29 Jun 2016  路  7Comments  路  Source: mrdoob/three.js

Description of the problem

We should implement some type of standard sub-surface scattering algorithm. I hacked somethig into Clara.io that does this but it is just a hack that doesn't have a true physical basis:

happy buddha webgl sub-surface scattering

https://clara.io/view/5c7d28c0-91d7-4432-a131-3e6fd657a042

My technique is a customization of this technique here, but it fairly unphysical or requires a lot of precomputation:

https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/

Three.js version
  • [x] Dev
  • [x] r78
  • [ ] ...

    Browser
  • [x] All of them

  • [ ] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer

    OS
  • [x] All of them

  • [ ] Windows
  • [ ] Linux
  • [ ] Android
  • [ ] IOS
    Hardware Requirements (graphics card, VR Device, ...)
Enhancement

Most helpful comment

@mattdesl Sweet! We should get this into a PR!

All 7 comments

I think Matt DesLauriers has already extended the current MeshStandardMaterial in order to support fast subsurface scattering.

More info on his technique and source code can be found here:

https://twitter.com/mattdesl/status/805784465725419520
https://gist.github.com/mattdesl/2ee82157a86962347dedb6572142df7c

@mattdesl Sweet! We should get this into a PR!

@bruno-quintela The technique @mattdesl implemented is the same one I linked to above. :) So this is perfect and fast.

screen shot 2018-03-05 at 6 46 03 pm

Following the approach from @mattdesl. It looks like using a thickness map to define the translucent in surfaces for computing the diffuse reflectance. Is there any progress for now?

If we decide to adopt this approach, should we have a separate material from StandardMaterial?

should we have a separate material from StandardMaterial?

I think so. You could start with adding an example using a ShaderMaterial. Or alternatively, extend MeshStandardMaterial similar to MeshToonMaterial.

screen shot 2018-03-07 at 3 09 11 am

Updating the progress of point lights support. It is very close to send a PR. Currently, I decide to create a MeshTranslucentMaterial extends MeshStandardMaterial.

Nice!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akshaysrin picture akshaysrin  路  3Comments

donmccurdy picture donmccurdy  路  3Comments

seep picture seep  路  3Comments

boyravikumar picture boyravikumar  路  3Comments

clawconduce picture clawconduce  路  3Comments