Question about AoA subsurface shader,,
I am now learning about AoA subsurface setting,
I bought video tutoriall of AoA and have read pdf documents few times,
the Video tutoriall is good, but I am not native, so that, the important process
of Pre , and Post SSS , I felt difficulity to understand How AoA shader calculate
when adjust each shader property value (diffuse, and subsurface )
about Pre and Post subsurface setting.
then I tried to make formula to see clear,,
how diffuse and Subsurface proeprties work
I hope to check and correct please if there is miss understanding.
===================================
AoA Subsurface shader (diffuse, subsurface only, and no subsurface color texture)
Diffuse Color Texture RGB value= Dtex
Diffuse Color RGB value = Dcol
Diffuse Strength value = Dstr
Subsurface calculation RGB value = Fsub (r,g,b)
SubSurface Color RGB value =SuBcol
SubSurface Strength value =SuBstr
Pre SubSurface setting (Edit2)
R,G,B = (Fsub (???)) * SuBcol * SuBstr) (Linea dodge?) ( Dtex * Dcol * Dstr)
Post SubSurface setting
R,G,B = (Fsub(Dstr * (255,255,255)) * SuBcol * SuBstr ) * (Dtex * Dcol)
Then,,, 1 more quesiton,,,
I hope to know about "absorb" and
"scatter" RGB value, how work ,,
I can see easy how it work when render,,
but can not grab well,, multiple or add etc,,
and when it calculated,,
and I hope to know,, when I need to adjust these setting?
I can not get same effect, by adjusting other values ?
(subsurface color, or diffuse color, texture etc,,)
When and what these value cause effect on?
are they included when subsurface effect are calculated as Fsub() ?
===================================
(I found one mistake already ^^;)
Fsub(???) is I can not understand,,, what subsurface calculate, when diffuse strength zero?
decided by Absorb and scatter color value, only?
or Subsurface color and strength are included when calculate Fsub ,
not multiple?
===========================
No No No No, completely No,,
I believed about Pre SSS mode, it is simply "add" subsurface and Diffuse,
Now I check again Video,, it is not simple "add" ^^;
then,, How (Linea dodge) are calculatede? I do not have Photo shop,,
IN gimp which layer mode means?
Comments
I'll have to go back and watch that part of the video again to comment on the differences between the Pre and Post SSS options (or maybe Will can weigh in here himself?)
But a couple of other comments in answer to your questions...
Here is something to keep in mind once you want to start understanding the math in shaders. When someone says that two colors are "added", what they may really mean is multiplied.
Here is a funny thing ... In Poser, colors are expressed in values of 0 to 1. So Black is (0,0,0) and white is (1,1,1) with other colors being somewhere in between. In DAZ Studio, we're used to expressing them as 8-bit numbers (0..255). So while Black is still (0,0,0), white becomes (255,255,255). This helps some since most painting programs use 0..255 for their color channels; so it makes the transition easier for some artists. However, in the 3Delight engine, they use decimal numbers from 0 to 1 just like in Poser.
So, if I want to tint one color by another, I multiply them together. You see this when someone uses something other than white in the Diffuse Color channel that also has a texture map loaded. Say that a given point on a surface has a value from the texture map of orange (1,0.5,0) and they use a light cyan color (0.25,1,1) in the Diffuse color channel. The rendering engine will tint the orange with the cyan value and you'll end up with (1 * 0.25), (0.5 * 1), (0 * 1) = (0.25,0.5,0) which is kind of a dark green color.
The SSS calculations are doing something similar. They are tinting the surface (diffuse) color by a factor based on the absorption and scattering of light underneath the surface. Which is why you see them multiplied together.
I'm not sure in GIMP if you would be looking at the "Dodge" option or the "Lighten Only" option from the Layers window to correlate to Photoshop's "Linear Dodge".
(I keep editing when I find anotehr mistake about formula,,in this reply,,)
OH, very thank you,, I felt my first formula was too far from right way ,^^;
last night , I thought again in my bed, then my brain seems return clean,
and maybe understand,,, what process has been used .
When I tweaked sub surface shader, I used product skin materials,and test with documents and videos.
there are diffuse map already, so that I felt somehow diffuse map wroked when
calculated subsurface effect,,
AoA seems clear said, not add, but I miss understanding
to see photo shop layer process ^^; it is simply my miss understanding ^^;
After that,,, I tested with no diffuse texture, then tweak again,,
may be I understand,,
subsurface effect are only calculated by Subsurface color, strnegth,
and scater color,,, absorb color,,, then maybe replaced like that,,
subsurface calculated color = Fsub ( SuBcol( ) , absorb( ) , scatter ( ) )
I think subsurface strength are simply multipled, after calculated this Fsub() section,,
Fsub ( SuBcol( ) , absorb( ) , scatter ( ) ) * SuBstr ,
I may need to understand , in this Fsub formula,, how absorb RGB and scatter RGB are calculated
with subsrface color,,, and how subsurface strongth are worked.
and I have not found the formula about Renea dodge how work,, but
I have two layer A, layer B, when adapt (Linea dodge) on lyaer B,
Then I explain as ,,
Fld (A,B)
Pre SubSurface setting
R,G,B = Fld( Fsub( ) * SuBstr , ( Dtex * Dcol * Dstr))
Post SubSurface setting
R,G,B= Fld (Fsub( ) * SuBstr, Dstr * (255,255,255) ) * (Dtex * Dcol)
@@; ?
=====================
And Thank you Jonny Again,,, I will read your reply details again,, and compare with my current formula,,
about more detail,,,then will try again gimp Linea dodge,,,
( I think,, I must keep some miss understanding ^^;)
I've just posted an article on my blog about the physics of subsurface scattering to try to help people understand what it is that an SSS enabled shader is trying to simulate.
Light and SSS Surfaces
So in addition to the blog post I linked above, kitakoredaz and I had an additional bit of conversation in my JonnyRay's Tutorials thread about the general operation of SSS enabled shaders. Since the convo is back now to how Will's shader specifically works, this thread makes more sense for that.
Quoting Kitakore's last questions here to continue the discussion...
Yes,, I can understand it. I think they are intended to change subsurface effect from same subsurface color.
can be option, to change Subsurface effect, from same subsurface color (or map),
and can change them.
But,,, If the each value of RGB simply represent , what part of color,
we may need simple Color picker style parameter, as same as diffuse or subsurface color, I think^^;
or simply represent about each R,G,B value, with parameter limits, R 0 to 255, or 0 to 1.00 ,,(100%)
about these case, I can tweak and decide the Scattered lay color easy,,, ^^;
about absorb color, limits is min 0 to max 1,
about scatter color , limits is min 0 to max 10.
So that I am little confuse,, if there is clear meaning , and these are not same units.
or it is same, about 0 to 100% ? (though we can not apply 0, as we checked already)
Then,, now I hope to know,,the correct reasonable way to adjust this shader^^;
that means, we may start better from subsurface color = white?
or we may start from subsurface color = black?
how we decide them? I know they should change with scatter, and absorb color already,
but eg, If I change shader about skin material which used by daz default shader,
to SSS, and hope to make sss translucency effect,
basically, at start point, we may set subsurface color with white,
then adjust each value?
Strictly speaking, if it is desigend , to apply sbusurface color map to get real subsurface effect for each human skin?
at start point? after that adjust Scatter R,G,B and absorb R,G,B ?
I think,, about Scatter R,G,B and absorb R,G,B,, it should be decided proximately for each material,,
as same as Reflaction index, so that there is preset eg SkinA and SkinB?
I'll need to read your question a few more times to make sure I am fully understanding your question. Later I will try to post a few images better showing what is going on in the shader, but for now here is a brief explanation...
Lighting = (Light Color * Light Strength) - Shadow
In Pre-SSS diffuse mode it works like this: ((Diffuse map * Diffuse Color * Diffuse strength) * Lighting) + (Subsurface Calculation * Lighting).
You can read about the SSS calculation from the original designers at http://www.graphics.stanford.edu/papers/bssrdf/bssrdf.pdf
The SSS calculation is quite complex. It is beyond my math understanding for sure hehe. Fortunately, that part of subsurface calculation is built into the 3delight renderer so I did not need to program that math, only tell the shader to use it.
The basic summery is (Lighting * Subsurface Strength * Subsurface Color) is sent to the subsurface calculation. Inside the calculation the red green and blue vales of the light are either absorbed by the volume or they are refracted and scattered.
In Post-SSS diffuse mode it works as: ((Subsurface Calculation * Lighting) * (Diffuse map * Diffuse Color)) + ((Diffuse Strength * Diffuse Map) * Lighting).
Note that, in both cases, when I say (Subsurface * Lighting) it is not literal... What is technically happening is the lighting is sent to the SSS algorithm where it is considered in the calculation.
I hope that helps. If it is hard to understand please don;t feel bad. I get very confused by it and I made the shader LOL!
uu,, sorry,, my first post is really bad,, (there were many miss understanding) and wrong,,
about Light. I simply fix as white light color 100% strongneth,
to exlude about lighting at now @@;
my question is,,(Now I merge my question,,,, which is in daz studio discussion, jonny ray tutorial topic,,,)
http://www.daz3d.com/forums/discussion/34338/P30
then thank you,, I must try to understand the link documents ^^;
but I it seems far from my limits of math knowledge ,,><<br />
One class short of a major in math, in college (took a minor in instead)...and that paper stretches my understanding and skills...
The physics of light and it's interactions with matter are a very complex branch of science-math, so don't worry too much if you don't 'get it' when reading those very technical documents. There aren't all that many that do...but thankfully at least one that did transferred that math into shader code.
My favorite example of this was an article I read once about accelerating raytracing using ray classification. Rays were grouped using a five dimensional coordinate system (x, y, z, rho, theta). I was following the article fairly well. He had some very interesting ideas. Then about 2/3 of the way through the paper, he made this statement...
:ohh:
And THAT is why I took a minor in math as opposed to a major...when we were assigned a problem (basically multidimensional calculus) and told that it was expected to take 3 days work to solve, I decided I had more than enough math for a lifetime...yes...it was called a 'simple' problem too.
And THAT is why I took a minor in math as opposed to a major...when we were assigned a problem (basically multidimensional calculus) and told that it was expected to take 3 days work to solve, I decided I had more than enough math for a lifetime...yes...it was called a 'simple' problem too.
Which reminds me of: this! ;)
You ever wonder why all the advanced math types are either old guys that look like they've been around since Newton discovered 'gravity'...or someone that if you met them in an alley on a foggy night, you'd be reaching for 'Mr. Pointy'...that's because they haven't seen the light of day in months.
For me,, It seems better start from 3delight documents ^^;
http://www.3delight.com/en/uploads/docs/3delight/3delight_40.html#SEC170
I often feel same difficulity when play with 3d graphic tool.
Eg I just hope to change key value, which rotate actor hand,
then find strange parameter, there is not only x, y, z but w,,
Documents say"quaternion rotation,,,, ", OK,, I understand ,how you call then,, how it work?
why it need ? I serch again. New big wall which I need to jump.
when I left colledge, If someone adviced me,,
"keep studying mathmatics,they are very useful to rotate 3d figure hand,,eg Aiko 2.5 beta,,
I must keep studying,,,.:shut:"
Thanks for the input Will. I think that helps explain what's happening in the math between Pre and Post options for the SSS effect. I'm going to add a post in my blog that captures this information as well.
I think there are a couple of outstanding questions in regards to some of the more advanced parameters.
There are sliders for both Scatter and Absorb for Red, Blue and Green. How do those values affect the SSS effect?
- My take on it was that they are used as an additional factor in the SSS calculation (i.e. adding additional absorb or scatter effects for specific parts of the spectrum)
- It has been postulated that if you leave them alone, the SSS color (and/or texture map) automatically affect those values as Absorb and Scatter are normally calculated in the SSS function
Also, does changing the SSS Material have a significant effect on the result, or is that a way to provide some "presets" in the shader?
Yeah,, thank you AoA and all,,
I finally understand,, (but not accurate mathmatics,,^^;)
each SSS prameter how work and make effect,,
it seems better when test SSS, only set subsurface color, (255,255,255)
it simply mutliple, with subsurface strength, and scattered absorbed calculated color
on each point.
when I set another color, it simply effect all points on surface as multiple.
the subsurface effect simply be decided, by scatter and absorb value.
I finally understand,, why we need two different parameter.(scatter, and absorb) ^^;
my mistake was,, when I test this shader, I try to use with 3 ight setting
as same as AoA tutoriall video. and micheal 5 skin .
ofcourse it need to get human like skin,
but it cause me difficult,,how subsurface translucency work with light ^^;
and may better set subsurface scale, eg 20 or 30 to see scatter and absorb effect clear.
then I set one direction light only. and check ,,now
scatter and absorb effect clear ,,, I feel I get some clear progress
when I use this shader^^;
The last problem for me,, the photoshop " Linear Dodge " clear meaning,,
when I render, and test,, I think it is never simple add calculation.
but some web documents say, it is simply add R,G,B of two layer,,, @@;
is it right? if it is right, when I set diffuse color 255,255,255
all render image,, (which Linea Dodge applied with SSS layer)
should be white. but not,,, and I test same thing in GImp with "add" type layer,
it never show me same effect,,
Hi Kitakoredaz,
Sorry for taking so long to reply. The last test you did using the single light was a great one! It does show a lot of how the colors are absorbed and scattered.
As you can see, the light can change colors depending on the absorption and scattering values as it passes through the object. So the presets in the drop down menu automatically adjust the settings to match some settings that were measured in the research paper I linked earlier. I can not take credit for figuring them out myself hehe :)
The reasoning behind the different limits was simply that, at an absorption of 1, the effect becomes so faint that it hard to see. I figured that it would be unlikely that anyone would want to use any settings above 1.
While testing, I noticed that I could tell a difference when the scattering values were higher than 1. As you illustrated in your renders, you can see noticeable changes even above 10 but I made an arbitrary decision to set the limit at 10.
The thinking behind the limits were intended to give the user an idea of what ranges of values might be common. The limits can certainly be increased or disabled though.
When I first started using DS and Poser, I found it difficult to adjust any shader which did not have limits because I never knew what general range the shader designer intended the settings to be. Because of this I try to include limits which give a "Ball Park" idea of the most useful range of settings.
As far as how Linear Dodge works... I have Photoshop CS5.5. When I create a solid color of R100, G100, B100 then create another layer above it using the color R0, G0, B125 and set the mode to Linear Dodge (Add) It yields a combined color of R100,G100,B225. Do you get a different color when you try it? If so, is there an adjustment layer above it or maybe a gamma setting someplace?
Hi,, thank you AoA, I may need more test to make good setting what I hope,
about absorption and scattering value combination ^^;
but now I can understand basic design roughly.
then I test with linea dodge, (actually it is calculated when I render)
I render use only diffuse, and subsurface, as same as you guide in your video,,)
I send two image to GImp,
Layer 1 (diffuse calculation only) (add option)
Layer 2 (subsurface calclulation only)
I expected Layer1 + layer2 = final rendered R,G,B , at first time, (in my first formula^^;)
but somewaht different when I checked them in gimp with "add" type
each parameter again,but if there were some missing I think.
And,,, the Gamma Correction is really important for me,,
I hoped to ask you when I use gamma correction with your shader.
About many case, I need to weaken light strength, and adjust specular etc, when I use Gamma correction,
but it show me clear colors, and natural shadow effect.
then I usually set Gamma Correction On. (2.20 for my windows PC) in render setting tab.
when I set Gamma Correction for textures with your SSS shader,
Actually it make me more confused, to adjust material preset (made with other shader) for your SSS ^^;
I know in your VIdeo, you do not check it on, so that I hesitated to ask you about gamma correction,,
but I have used Gamma Correction setting for many Mat presets with ds or UberSurface shader,,
so that I hope to use it with your SSS shader too,,^^;
If you have some advice which I need to adjust values, when use gamma correction setting , with SSS shader,
and daz skin textures,, (eg V6) I really hope to know these how to ^^; you are so popular vendor, that I do not hurry,
but if you know good way,, advice please here , when you have some time ^^; I must wait. )
Then I do not know about gimp setting much ^^; if I need to set Gamma Correction in GImp too?
If Rinea dodge = just add each R,G,B! I really feel good,, :)
because now I can get simple formula which show how your shader work .
(though about how SSS calculaed as formula, it seems still black box for me ,)
If you are rendering at a different gamma then that might be why the results don't quite add up when using linear dodge in Gimp. I was using a gamma of 1.0 for the tutorial since that is the default setting of DS which most people will be familiar with. Not to worry though, that was just an example and not necessary to use the shader.
As far as subsurface compatibility with gamma, I do use the SSS shader with higher gamma often so I know it will work and look good. But, whether it is giving physically correct results, I don't know at this time. I'm a bit embarrassed to admit that I am not sure in what ways gamma affects the renderer. I do know how the basic math behind gamma and the look it achieves, but there may be a lot more going on between gamma, the shaders and the renderer than I notice at first glance. It is something I do intend to read up on and test more in the future though.
With all that said, you should still be able to use a higher gamma with the SSS shader though you may need some adjustments of the settings. While initially learning about the SSS shader or following the tutorial, I would recommend using a gamma of 1 until you are familiar with what each important setting does. Once you do feel confident about the main functions of the shader then use any gamma you prefer and make adjustments to the shader settings as you think look good.
Thank you to confirm. Finally I could see same effect in My Gimp too.
the eye around are not used AoA subsurface shader,
about right face edge,, I do not know,, a little bit difference,, when compare,, different layer mord.
(some scatter color flow?)
Gimp add = photo shop Linead dodge, I believe. then SSS pre setting work, as it was said in your Video with GImp test too.
it is really simple fact,, but as for me it was very helpful .I can concentrate only SSS effect to make final render,
from other diffuse textures.
And thank you advice. I undersatnd,, I should do more render with SSS shader, without gamma correction setting
to know each setting clear.
(Honestly, my first plan was to ask you, about SSS shader with gamma correction setting .
But after studying SSS shader with your tutoriall, more and more question I had ^^;
if I have another difficulity ,, may be ask again.. after I render more.) :-)
I still can't understand 100% about SSS "Absorb" and "Scatter".
To my understanding, Absorb value is how much the skin absorb and negate the color of the lighting ?
Scattering value is how strong each of color reflected within the skin.
Is this right?
Also, does Absorb value and Scattering value act independently from each other value?