# subsurface scattering

This topic is 2791 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a realtime subsurface scattering algorythm which works in the fragment shader.
It works by averaging the surface with the sorrounding surface.

However this is just an approximation, what mathematics is there that complicates it from just being the "average of sorrounding surface"
I can get alright results just with this, but its missing realism, because its just a blur; what more to sss is there?
Im sure if I used a decent diffuse texture and modulated it all the right way with specular maps this could probably give me real skin already,
but I just wish I could get the procedural part of the skin perfect, its just something I wish I could do.

P.S. I have stared at Jensens paper for a long time now and I cant even understand the start of it, so that wont help me!

##### Share on other sites
I was going to suggest Jensen's book on photon mapping, which has a chapter on SSS towards the end. But if you don't understand him... What is it you don't understand in Jensen's paper? Perhaps the book would be easier to read because it does a better job of introducing all the definitions and naming conventions that he uses later on.

##### Share on other sites
Is there a more indepth book on the subject? All attempts of me learning sss properly have had me not understanding it at all, the problem is it starts with the BRDF, and I dont even really understand that properly, the maths just gives me a headache... but I must know how this works!!!

##### Share on other sites
With normal BRDF's, light hits a surface, then bounces off in certain directions (diffuse type materials == equal fractions over every direction in the hemisphere, specular type materials == focussed in a mirror-like reflection, etc...). With sub-surface, materials, the light hits one point on the surface, then enters the material, bouncing around on the inside, leaving the surface at another point.

In simple terms: To do this entirely correctly, you kind of need to do some kind of ray-tracing inside the geometry of the surface. Every real-time solution is basically a pile of hacks in comparison to the correct solutions.

Which other SSS/skin papers have you read?

Screen-space blurring:
http://jbit.net/~spa...rf/cbf_skin.pdf

Texture space blurring:
http://http.develope...gems3_ch14.html (some nice tables to steal real-world physical data from here, also, check out the references)
http://developer.amd...n_Rendering.pdf

##### Share on other sites
My method is similar to that screen space blurring. (hey nice link... i didnt realise i wasnt the only one picking screen space to do it, the main advantage being it being a single post process which would fit into deferred shading quite nicely.)
This is all well and good, its just a blur cant resemble real marble, it looks more like waxy plastic and its not very configurable... it seems
to resemble a subsurface scattering surface, but not skin or real marble like I say, what about single scattering? and all the rest of the realism
a blur misses thats in Jensens paper but im clueless how to understand it.
But the blur is nice how you can spread the rgb apart from each other, it can do that at least.

I also thought of a method that couldnt work in realtime, but with a voxel model, and actually pass the light through it with a 3d flood fill, I wonder how much more realistic that would be than just a brute average.
Could you maybe walk me through what actually happens to the light as it passes through the surface? talking refractions... absorption... reflection, why is just a blur just an approximation and not a realistic approach?
What is it missing?

Thankyou for any time, but thanks for the links Hodgeman, ill read that screenspace method in depth. (but alas its still just a blur)

##### Share on other sites
You don't have a real-time implementation of subsurface scattering. You have a real-time implementation of screen-space blurring, and that happens to be one way to approximate subsurface scattering in a very surface-based medium such as skin.

If you don't understand why blurring is just an approximation, then you should probably stop reading about how to implement subsurface scattering in real-time and read a little bit about what subsurface scattering is. This is a physical phenomenon that existed long before computers did, so try to understand what is actually happening to photons when they enter our skin. Once you have a good understanding of that, then you will understand why blurring is nothing more than a very rough approximation of what a scattering medium is actually doing.

To get you started... one visual effect that the phenomenon known as subsurface scattering can produce is apparent blurring. That apparent blurring happens because much of the light exiting the medium isn't exiting from the same point it entered from. It first entered the medium, bounced around a bit, and then exited from a different location. This has the result of blurring your lighting. For example, typically a surface whose normal is perpendicular to the light direction is not lit at all. Subsurface scattering changes this, allowing light to exit from a place in the surface of the medium that is not even facing the light.

##### Share on other sites

So if I just blurred, its a good enough approximation of sss? I still feel like im leaving important things out of the equation tho...
note I am getting the transmittence through the ear, even though its not really realistic.
Im pretty sure it could be more realistic than this and still be realtime tho... but I guess ill just go with this for the engine then!

##### Share on other sites
Just to share, I too looked at the Jensen 2001 SSS paper in the past and realized I can't understand the steps between the successive equations without already being familiar with the classic 1960's radiative transfer text heavily referenced. I.e., quite a few important equations are given without proof and used as the basis for further derivations.

I don't have that book and doubt I would understand it as it's written geared towards physicists, who may not use radiance as energy unit, and use more dx dt in integrals than I need. Don't think there is a good computer graphics book that discusses in great details either.

Maybe a recommended course site/note somewhere that's detailed with the maths between each successive equation? Or someone's dissertation? I get stuck because papers say integrate with respect to some gradient you get the next equation. But my math isn't strong enough get the same result as the next equation, if at all. More hand-holding and spoon-feeding is needed.

##### Share on other sites
heres my really naive look at something not even as advanced as jensens paper.

So, this will make it more realistic.

I compute E, as a write this instead of just ordinarily lighting the model before i blur it, this is actually standing for how much energy actually goes into the model.
only thing i dont understand is the dwi bit at the end, which is differentiation, what does that mean?

Then when im computing the subsurface scattering, i compute the dipole approximation for each sample of "e" (which gets you "b") thats in the neighbourhood of x0 (the exiting pixel, or target pixel) this is also ending in dxi and it has that funny sign at the start... does this mean summing the points and averaging by the amount wont work?

so basicly its fresnel in, dipole, fresnel out (and do you sum it??), and thats more realistic subsurface scattering, but I dont understand, could someone help me out?

As you can see, a basic summing of the reflectance of the model is a blur, but thats nothing like this, you actually compute transmitting light, then you use a dipole approximation which has neat variables in it to change the scattering, even takes into account the fact only some of the light from xi will even reach x0, then you fresnel it at the end as it exits x0 to the eye (to get from "b" to "l"). and you somehow "sum" all the results from all the samples, but its not a sum sign, its an integration with a d at the end, so what the hell do you do with that?!?!?

I get the basic gist, but not a real understanding so I could implement it.

##### Share on other sites
ill try and implement it, i think I know how to now. thanks guys for the help, ill come back with results maybe, depends on how quick i code it.

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
12

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633767
• Total Posts
3013738
×