PDA

View Full Version : Realtime Ultra realistic SKIN SHADER



silviotoledo
10-01-2011, 03:52 PM
http://www.iryoku.com/teasing-our-real-time-skin-rendering-advances

gerardstrada
10-03-2011, 04:43 AM
Interesting approach, Silvio. Thanks. I have not tried that idea yet but I've been playing around with the screen-space SSS idea in the DP FNE:

Lambertian diffuse shading (no GI) - 4.5 seconds

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/lambert.jpg

multilayered-SSSS applied in screen-space with DP FNE in post-process - 5.2 seconds

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/screen_SSS.jpg

The real thing takes about 700% more time (38 seconds) - I haven't touched the default setup that comes with the model (simple skin material):

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/SimpleSkin.jpg

the free model (and setup) courtesy of ten24 (http://www.ten24.info/index.php/shop/3d-head-scans/free-3d-head-scan-model-52/)

Same screen-space SSS effect but with OrenNayar diffuse model:

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/ONscreenSSS.jpg

In my test, instead of using the final color render like in the documentation, I've used a custom-made illumination buffer. I've used also a different approach for the convolution, but tests looks somewhat promising. Guess I could improve the epidermis and sub-dermis scattering, perhaps.

Would like to try also an implementation based in the real-time realistic skin translucency document you have linked, I suppose it would provide better results :)



Gerardo

jdomingo
10-03-2011, 05:33 AM
just wondering why most cg character skin test or sss test are fare complexion? very very few in coloured as they called it. so what makes a perfect sss shader then?

lardbros
10-03-2011, 06:06 AM
I've seen someone here with some nice black skin shaders, Lee Perry-Smith did over at Infinite-Realities, think it was a Wesley Snipes like character, and was kindly given away on 3dWorld a few months or maybe a year or so ago, and then there's this one too:

http://forums.newtek.com/showthread.php?t=8599&highlight=photoreal+character

But don't think he uses Lightwave any longer unfortunately.

lardbros
10-03-2011, 06:10 AM
Interesting approach, Silvio. Thanks. I have not tried that idea yet but I've been playing around with the screen-space SSS idea in the DP FNE:


In my test, instead of using the final color render like in the documentation, I've used a custom-made illumination buffer. I've used also a different approach for the convolution, but tests looks somewhat promising. Guess I could improve the epidermis and sub-dermis scattering, perhaps.

Would like to try also an implementation based in the real-time realistic skin translucency document you have linked, I suppose it would provide better results :)



Gerardo

Some lovely effects there Gerardo! How exactly are you achieving this? Very fast render times indeed, and looking very nice too! How complex are your FNE nodes are to get a look something like this? :D

erikals
10-03-2011, 06:23 AM
http://www.iryoku.com/teasing-our-real-time-skin-rendering-advances

those are beautiful renders i must say, interesting. waiting for Q4 2011 then :]

erikals
10-03-2011, 06:27 AM
Gerardo, wonder, is screen-space SSS sort of like using the Z depth trick?

gerardstrada
10-03-2011, 09:05 PM
I proposed the use of the Z depth to achieve sss effects since 2004-2005 I think, but for controlling the absorbed color. In this case the depth buffer is used to control the blurriness, which achieves the scattering effect. It makes me remember somehow to my old trick for real-time blurred refractions, but in this method the blurriness is applied at different levels and driven by the depth buffer.

I did pick that sample model because the lighting and shading setup is free and available for general domain and this provides a good reference for render time comparisons. I think an ideal model would be a similar free scene but with a female caucasian model. The reason for this, and I guess the reason why most of these tests use caucasian skin, is because the absorption of light in the epidermis can be more apparent in this type of skin. Forward scattering can be usually more notorious because lighter melanin (mostly pheomelanin) has a wider absorption than darker melanine (commonly eumelanin) - this highest absorption in the UV range makes caucasian skin more sensitive to UV rays and it's known that it's a good safeguard against solar radiation in african skin. Also if the hemoglobin in the dermis is high in the caucasian skin, backward scattering can be even more notorious, too. Both, melanine and hemoglobin, are key aspects in the skin color/tone and the reason why epidermis and dermis color are key parameters in the skin color of our models. Notice that although the epidermis in african skin usually contain mostly eumelanine (darker melanine), it could be also composed by greater quantities of lighter melanines, which makes this layer of the skin more translucent. There's also some cases where levels of hemoglobin (in caucasian and mostly asian dermis) are low, and backward scattering is not so apparent. The reason why a female model would be more suitable for these tests is because the structure of the female epidermis is commonly softer and more translucent, so scattering effects are more notorious, too.

This is a test with an anim light:

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/diffuse.gif

With the post sss effect:

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/screenSSS.gif

Would like to make more tests with other lighting setups to see the consistency and maybe improve a bit the backward scattering effect before thinking of sharing the node setup. If tests with other lighting conditions are promising, I'll post them here :)



Gerardo

erikals
10-04-2011, 06:55 AM
...forgot about that one, need to look into it again i think,... \:]
http://forums.newtek.com/showpost.php?p=512035&postcount=18

cool :]

gerardstrada
10-05-2011, 10:41 PM
I was actually referring to this one (http://www.spinquad.com/forums/showthread.php?11182-RealTime_Refraction_Effect).

I haven't had the time of improving the setup yet, but these are some side-by-side comparisons in different lighting conditions (lighting sets courtesy of Blochi's sIBL).

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/ambientLcomparison.jpg

Difference in render time is still less than a second. I've used Backdrop radiosity only but it seems the results of the sss effect in screen-space is consistent with direct and ambient lighting indistinctly. To try the consistency of the effect it would be interesting also test the lighting in other model.



Gerardo

erikals
10-06-2011, 06:27 AM
looks great! :]
i really wonder how far it can be taken...

ok, hmm,... so am i right to say that you blur the depth map in post?

gerardstrada
10-09-2011, 09:07 PM
In the documents, the depth buffer is used to perform a depth-based blur removal so that the pixels far from the camera get narrower levels of blur. There are several implementations of the same principle but they commonly use a sum/average of about 6-7 one-dimensional gaussian convolutions, while in DP IFNE, I'm using DP Denoiser with several passes of bilateral blur weighted by the depth buffer, which provides good results so far. My setup is then not so fast but it's really simplified by DP Denoiser :)

In my previous tests I was coloring (multiplying) the dermis and epidermis layers like in skin materials, but I've noticed this tends to change the overall color of the texture skin, and since it's supposed we are using a photograph-based texture, I suppressed the epidermis color in these lastest tests and I filtered each RGB channel differently for the epidermis and dermis layers with DP Curve.

With one direct neutral light, this seems to work better than my initial setup. We can even notice the scattered red color in the shadowed areas.

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/Comparison1.jpg

With neutral ambient color schemes (IBL) things seems work well too; however with this way of filtering the layers after the convolution, the skin looks not so multi-layered (a bit like rubber, I think) and too soft.

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/Comparison2.jpg

Besides, with cold lighting, colors vary too much.

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/Comparison3.jpg

A more 'correct' way would be to apply different weights for the blur function (convolution) of each channel, since red light scatters much farther than green and blue, we can suppose that the kernel of the red channel should be larger. This slows things down from 0.7 seconds to 1.2 seconds but results are more natural, I think.

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/Comparison4.jpg

and the original skin color is preserved better as well (with direct or ambient lighting).

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/Comparison5.jpg

...and even with cold lighting.

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/Comparison6.jpg

Still would like to improve the dermis layer.



Gerardo

erikals
10-10-2011, 08:46 AM
interesting, interesting,.. : ]

...another great thing about it is that it is flicker-free :]
 

silviotoledo
10-10-2011, 03:19 PM
This is amazing Geraldo!

I need it:)!

Newtek must include Mr. Dennis and you in the next Lightwave update :).

Step by step Tutorial pleaseeeeeeeeeeeeeee :)

jasonwestmas
10-10-2011, 03:35 PM
mmm yeah, that's crazy good skin there. Why is this not known until now I wonder. Is there some kind of underground development? What are the chances that we will be able to use something like this in our rendering package for animation? I mean the realtime skin, not the really nice 30s skin ;)

nikfaulkner
10-11-2011, 02:44 AM
I was actually referring to this one (http://www.spinquad.com/forums/showthread.php?11182-RealTime_Refraction_Effect).



care to expand on the process\steps involved in your new skin setup? looks very nice, not sure how to make the jump from the refraction post above into sss

erikals
10-11-2011, 05:16 AM
more info,
http://www.iryoku.com/screen-space-subsurface-scattering

videos too,... (and pdf)
http://www.iryoku.com/sssss/
http://www.iryoku.com/skincolor/
http://www.iryoku.com/translucency/
http://www.iryoku.com/wrinkles/

 

jasonwestmas
10-11-2011, 08:15 AM
Yeah that is a good point Oliver. Just to clarify, I think one of your points were that a skin shader in something like a game engine may look good with a more simple setup of lights and specular. But once we start making a scene more complex and the hardware shading illusion may fall apart.

I've seen what the Unreal skin shaders can do, I was just wondering why this stuff wasn't available inside of our favorite animation packages for real time solutions. I guess there isn't much of a pull for it yet.

johnliebler
10-11-2011, 08:51 AM
It's funny, I was just last week experimenting with the depth buffer to fake sss in a still, but couldn't see how it would work in an animation when the object was moving in z space. I guess there's a way to get a per object local Depth Buffer using the dp node editor? I'm very interested to know more about this!

dpont
10-11-2011, 09:08 AM
This shader takes the depth of the pixel
and the depth of its surrounding neighbored pixels
for getting a relative measure and blur the color,
this shouldn't vary with an animated view.

This is what the Denoiser node does with
its Reference inputs, it uses pre-defined weights
scaled with the sigma value.

Denis.

silviotoledo
10-12-2011, 09:31 AM
Hey Rob ( Powers ) are you tuned to this? :)


it would be so great having these kind of shaders and velocity of rendering in lightwave. No matter if it's real of fake, the result looks amazing.

erikals
10-12-2011, 12:39 PM
posted this suggestion in the hardcore forums, so yup, NT at least should be informed...

jasonwestmas
10-12-2011, 12:58 PM
posted this suggestion in the hardcore forums, so yup, NT at least should be informed...

But we will not be, muuuwahhahahahah!

erikals
10-12-2011, 01:18 PM
...not before November,... ;]

rcallicotte
10-12-2011, 02:41 PM
...and it is before November! muuuwahhahahahah!

erikals
10-12-2011, 04:46 PM
p.s. for good ear-shading, check... >
http://forums.newtek.com/showthread.php?t=105896

(well, of course,... the over-all setup is darn good too... ;]
 

gerardstrada
10-14-2011, 06:26 AM
Erikals, yes it's flickering&noise-free.

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/GIssstest.gif

...and it's working decently in other tests too.


http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/test3sss.gif

http://imagic.ddgenvivo.tv/forums/FNE/screenSSS/test2sss.gif
(free model and scene courtesy of Ten24 (http://www.ten24.info/index.php/shop/character-training/making-of-the-patient-35/))

Though I don't think my current implementation could be used for animations yet. Not due to the screen-space skin method but to my implementation :) I think the new Skin material solves the issue of your last link and it's far more realistic than the RT solutions.

Silviotoledo, would like to address some limitations before sharing the node setup. Just take into account this is not a shader solution, it's post-process in screen-space (after rendering).

Nikfaulkner, in both cases (sss and soft refractions) the light scatters in transparent/translucent materials. In basic terms, the way the light scatters in homogeneous materials is very similar to convolution operations (blur filters). That's why it's so easy to simulate frosted glass by blurring (in screen space) what is behind the transparent object. In translucent materials (sss) there are some other aspects to take into account (absorption, attenuation, trammitance, etc) to control the blurring. In a multilayered sss effect (like the skin), the application of the blur is commonly adapted for each layer by taking into account only the aspects that really contribute to the final effect. In my implementation there's only 2 layers for the sss effect, the front scattering layer (epidermis) and the backscattering layer (the sub-dermis).

Jasonwestmas, according to the linked document, the lighting setup for the real-time realistic skin method imposes the use of 3D lights (I think that's a limitation compared with the use of skin materials). Also, although the backscattering behaves more realistically in the the RT realistic skin method, it implies a more complex setup than the screen space skin method.

The additional consideration in the RT realistic skin method is the way the trammitance of the backscattering is solved. Maybe a critical aspect for being implemented in LW (at user level at least) is that it uses depth maps casted from lights to estimate the distance a light ray travels inside an object. This is common in PRenderman and several 3D packages that use depth map shadows. A package that doesn't have this option would need a separate render from each light’s point of view to create a depth map that stores the distance from the objects nearest to the light, which would complicate the setup too much, I think. There's a DP Light that uses depth maps and maybe the z-map data could be accessed as a buffer (maybe not), but even if it's possible, the implementation on packages that supports depth map shadows presents also a problem of artifacts that can appear around the projection’s edges. The documentation proposes to shrink the object in the normal direction to solve this problem, but I think there must be a better solution in LW for solving the attenuation parameter (perhaps a gradient based on the distance of a light).

John Liebler, I'm using the depth buffer in two ways here. The un-normalized depth buffer for DP Denoiser (which, as Denis has explained, works perfectly for blurring the illumination pass respecting the edges of the forms independently of the distance to the camera), and the normalized depth buffer to control the way the epidermis and sub-dermis layers are mixed, which behaves differently according to the distance of the object to the camera or vice versa. At certain range of distance, the normalized depth buffer works fine, but at closer distances (or very far away), the depth buffer values changes too much. I think, the depth buffer needs to be linearized before being used for this (...still investigating).

The other situation is that this effect is resolution dependent. The number of blur passes in DP Denoiser need to be adjusted proportionally to the resolution or its distance to the camera. i.e. if we are using 3 passes for the blue channel at 50% of resolution, we'd need 6 passes at 100% of resolution.

Still have to run some more tests in this regard...



Gerardo

erikals
10-14-2011, 06:55 AM
hm, so you have a moving camera or something?
that's why it won't work with animation?


I think the new Skin material solves the issue of your last link and it's far more realistic than the RT solutions.

had a second look, hadn't noticed, ear-shading is fixed in the new skin shader indeed. nice! :]

 

jasonwestmas
10-14-2011, 09:25 AM
I used to have a hell of a time trying to get the skin shading to look soft but not rubbery. Whatever this new skin material is doing to minimize the rubbery feel is working really well imo. The sss is exaggerated in these picts but it gets the point accross I think.

That is interesting info about the real time depth maps Gerardo, thanks.

erikals
10-14-2011, 09:41 AM
looks very good indeed :]
(curious, did you use any SSS for the eyes? the shading looks quite nice)

p.s. (ear need a bit more SSS i think)

jasonwestmas
10-14-2011, 09:47 AM
No sss for the eyes I just used an old technique I learned from Dan Alban's inside LW7 book. The eyes have a cornea and aqueous to do the reflection and refraction. Other than that it's just getting the diffusion and color right which can be tricky in itself. An of course I put up a bounce geometry to help with the reflections. I didn't use any specular 'sheen' in the eyes, just interferes with the reflection effect imo.

Yur right, the ears need some work.

erikals
10-14-2011, 10:23 AM
cool, it might cause troublesome renders if going for realism i guess,
(scene dependent tweaking) but works perfect for this render. http://erikalstad.com/backup/anims.php_files/023.gif

jasonwestmas
10-14-2011, 10:31 AM
cool, it might cause troublesome renders if going for realism i guess,
(scene dependent tweaking) but works perfect for this render. http://erikalstad.com/backup/anims.php_files/023.gif

Fortunately I'm not interested in absolute realism but yeah that's true. When you only use reflection for your highlights you always have to have something in the environment to make it happen and reflect. It's kinda like playing pool, it's all about the geometry, values and the angles. ;) I have been getting into using HDR reflection maps though. Which do speed up the setting up of your reflections.

gerardstrada
10-22-2011, 03:34 PM
hm, so you have a moving camera or something?
that's why it won't work with animation?
Yep, I've moved the camera in Z axis and the effect is not consistent with the distance (more noticeable in close-ups where the sss effect disappears completely or is too strong with distance). This is due to that I'm mixing the sss layers with the Normalized Depth buffer and since this buffer changes according to relative distances of the objects in scene, it has a non-constant values relationship. Also, we can't scale the kernel in the Denoiser node, we need add more passes instead, and even if we would have an envelope the number of blur passes, we wouldn't get an smooth transition according to the distance. This is good for the purpose of a denoiser filter, since the size of the noise doesn't vary with the distance, but rather it's constant and what may change is the strength of the blur. So my empiric implementation is not consistent in animations for farther or nearer distances, it's limited to a fixed distance range and the node setup is not user-friendly. Besides, as I've been saying, the backscattering effect needs to be really improved.



--- o ---



Fortunately, the brilliant Denis Pontonnier has developed (in record time) a real implementation, very user-friendly and consistent with distance.


http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/DPSSS1.jpg

Results are not only faster but also very controllable. It takes into account the multi-layering nature of the SSS effect and has a really nice solution for the back-scattering effect.



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/DPSSS2.jpg

No radiosity in above renders, but Denis' solution works with direct lighting (3D lights) or ambient lighting (radiosity) indistinctly.



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/DPSSS3.jpg
Yep, even the back-scattering effect works automatically with radiosity! (just Backdrop Radiosity in these samples)

The new DP nodes that make this possible are DP SSBlur and DP Back Lit. A classic node setup in DP Image Filter Node Editor for a skin effect would be as simple as this:



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/simpleSetup.png

The main skin effect is achieved by the DP SSBlur filter, while the back-scattering effect comes from the DP Back Lit shader. The shader can be set up individually per surface in Surface Node Editor and stored in a DP Store Extra Buffer. Or it can be set up globally (easier if all models share the same/similar settings) in the DP Pixel Filter Node Editor and stored in a DP Global Buffer:



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/backlitesetup2.png

We'll want to filter the back-lit pass with other DP SSBlur or DP Fast Blur (depending on the case) to smooth out the pass.



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/simpleSetup2.png

DP Back Lit shader can be used not only for skin but also to mimic the back-lite effect for other translucent materials. Parameters are described in Denis' website (http://dpont.pagesperso-orange.fr/plugins/nodes/DP_Filter.html). For skin, in Surface Node Editor, we can chose a reddish epidermis color or we might want to use a back-translucency texture. In such case a quick way to get one is by multiplying our common color texture by a reddish color.



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/backlitecolor.png

In DP Pixel Filter Node Editor we can chose just a reddish color or white color if we want to adjust the color interactively later in Viper through DP Image Filter Node Editor.

Normal input is for modifying original surface normal or connecting the bump/normal map.



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/backlitesetup.png

Notice that diffuse is driven by the intensity and colors of direct and ambient lighting, so if you are using a diffuse map in Surface Node Editor, it can be connected here. In DP Pixel Filter Node Editor we just can leave it at 100% and control its strength later in DP Image Filter Node Editor by multiplying it by the color we want.

Denis' Tip: DP SSBlur and DP Back Lit work with real world scale. For predictable results better use (or re-adjust) your models to real scales.

Parameters for DP SSBlur are explained in Denis' website (http://dpont.pagesperso-orange.fr/plugins/nodes/DP_Filter.html) too, but something really nice about this filter is its skin and marble profiles based in real physical measures. They are excellent starting points to generate our own configurations depending on the color of the skin, how soft or hard we need that it looks, either for realistic skin, cartoon characters, marble, plastiline, etc.

In the specific case of skin, DP SSBlur filter tries to reproduce a multi-layered SSS effect by using convolutions (blur filter) in screen-space. These convolutions try to reproduce the way the light is diffusely transmitted from layer to layer. Since these methods try to reproduce the 2-layer model of skin from Donner&Jensen, we can use this criteria for re-adjusting the layers colors:



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/DPSSBlurLayers.png

The reflection of light in the oily stratum is solved with specular reflection (DP Cook-Torrance may be a good option). After that, the first layer of the skin is the epidermis. We have input and output trasmittance points that are represented by our two pairs of layers. We always assume white color for the first input transmittance point (our first layer) for maintaining the original illumination colors neutral (it's the stratum corneum, quite thin and absorbs almost no light). The output transmitance point (our second layer) are composed by stratums of dead cells and proteins, we commonly use a bluish or greenish colors here. The third layer is the input transmittance point of the dermis, and its color is defined by the bottom stratums of the epidermis composed mainly by melanocytes (cells that produce the different types of melanins), this third layer can go from yellow to very dark brown (depending on the overall skin color). The output transmittance point of the (sub)dermis is red since the dermal stratum color is defined mainly by blood vessels.

Denis' Tip: The default SSS Strength option at 31.5 is based on an arbitrary resolution of 720p and 20° FOV.

Then we can more easily re-adjust this value according to that. Consider also that when rendering skin with this method, OrenNayar diffuse model is commonly a good choice.

Consider also the limitations of this method. First, this post-method can not replace skin or sss materials but it can be very useful in many cases. The original method supposes we have to render each character with different skin settings in different render layers. We need also an alpha for each surface where the effect should be applied. Haven't tried this yet but since in Lightwave we can't store an alpha from FiberFX on the fly, volumetric hair and fur would have to be rendered in a different layer and composed later. Consider also that thanks to DP Extra Buffers we can store alphas for these surfaces and probably adjust several different skin settings in a single render.

Notice as well that the DP Back Lit shader in DP PFNE (Global Buffers) works with True Normal option, but not with radiosity, while with DP Extra Buffers it works with radiosity but not with the True Normal option.



http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/distancetest.gif
quick distance test



Thanks very much to Denis Pontonnier once again (really a genius for understanding and converting complex things so quickly in simple tools), we can now try this useful filter and shader for many creative purposes.



Gerardo

-EsHrA-
10-22-2011, 03:38 PM
i just hope all this stuff gets saved somewhere! :)
awesome stuff gerardo!

mlon

jasonwestmas
10-22-2011, 04:22 PM
Hot damn! Thanks Dennis/ Gerardo, what a team.

Steve, sticky this when you can. ;)

We need a Dennis Sticky some where. . .all in favor?

erikals
10-22-2011, 04:45 PM
:]

this is VERY interesting...!
(are the render-times still as fast as they used to be? (700% faster than the skin shader?)


"We need a Dennis Sticky some where... all in favor?..."
check my signature... ;]
 

gerardstrada
10-22-2011, 04:57 PM
Oh, forgot that! These tools are faster than my implementation :)



Gerardo

erikals
10-22-2011, 05:02 PM
Coooool...!! :]

thank you so much for this explanation! :]

allabulle
10-23-2011, 01:55 AM
Fantastic!

nikfaulkner
10-23-2011, 06:23 AM
wow this looks great,

ok yep i'm and idiot when it comes to these extra nodes. i've NEVER got any of them to work. just tried following gerardos post and all i get is a black screen.

i think i may be using them all wrong. anybody care to jot down SIMPLE beginners "put this there, plug this here" instructions?

if thats to much to ask, how about a simple scene with the basic skin setup
(the simple one gerardo mentions first)

sorry if its a big ask, it just seems that i just don't GET these for some reason. anybody care to help me have a "penny drop" moment?

thanks a bunch

gerardstrada
10-23-2011, 09:31 PM
Just to let you know Marvin Landis has updated the x64 version for Windows (LW 9.6 and LW 10) and Michael Wolf has updated the UB versions (LW 9.6 and LW 10) for MAC. Thanks to them!


Nikfaulkner, you might be having some trouble with DP Back Lit shader because it only shows up when we have backlighting (90° or more).

The setup with DP Extra Buffers could be + or - like this:

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/backlitesetup.png

In Surface Node Editor we store the back lite pass (DP Back Lit)

Btw, the setup doesn't show your particular setup for that surface to not distract from the DP Back Lit setup, but obviously we need a setup for our skin surface, but without a skin material or any SSS effect. Just your regular diffuse-specular-reflection solution for hard surfaces, since the multilayered sss effect will be added later in post.

So in DP Image Filter Node Editor (also known as Node Image Filter) we get that pass from the same buffer number. more or less like this:

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/simpleSetup2.png
That's all.

As far as I can see, the back lite pass got from DP Extra Buffer is not preview-able in Viper (yet), but we can preview the back lite pass got from DP Global Buffer.

The DP Global Buffer setup is even simpler (I used this in my tests without any texture). Just add a DP Pixel Filter Node Editor (also known as Node Pixel Filter). Double click in the Buffer Root and turn on MultiThread/Persp.AA and RayTrace/Global 3D Shad. and connect the DP Back Lit node in a DP Global Buffer:

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/backlitesetup2.png

and in DP Image Filter Node Editor we get that pass from the same buffer number.

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/simpleSetup.png
Then we should be able to see some results.

For DP SSBlur we need to double click in the Image Filter node and check the appropriate buffers we are going to use. In this case Depth buffer and Diffuse Color buffer at least - additionally you might want to check Reflection Color, Refraction Color, Specular Color and maybe Raw buffers - depending on your materials and compositing setup.

Note: We need to render (F9) at least once to store these buffers in memory and be able to preview in Viper what we are doing.

A good strategy for test would be to begin first with SSBlur, and then try the back lite pass.



Gerardo

nikfaulkner
10-24-2011, 06:08 AM
thanks for that gerado, i think i'm getting there now. although no proper render yet.

i set up a test file, and planned on applying the effect to only one of the surfaces. followed your post now i'm getting a black scene with what appears to be an outline of the rear light hitting the object. render attached as well as scene.

obviously i'm making a fundamental error somewhere, anybody fancy checking the scene and helping me feel a bit less stupid? :)

many thanks in advance

nik

Boris Goreta
10-25-2011, 02:46 AM
I'm also not competent enough to build this myself. A test scene would be much appreciated. I just get black.

gerardstrada
10-26-2011, 04:04 PM
Nikfaulkner, in your scene the black result is due to this reason:


For DP SSBlur we need to double click in the Image Filter node and check the appropriate buffers we are going to use. In this case Depth buffer and Diffuse Color buffer at least - additionally you might want to check Reflection Color, Refraction Color, Specular Color and maybe Raw buffers - depending on your materials and compositing setup.

Besides that, the DP Back Lit result is due to that it only works with backlighting, and perfect backlight in LW provides no illuminated areas for the viewer, and I think this is what's happening in your scene too. Denis has solved the rim effect and some other details in a new update in his web site (http://dpont.pagesperso-orange.fr/plugins/nodes/DP_Filter.html).

Other aspect your scene needs to consider is this:


Denis' Tip: DP SSBlur and DP Back Lit work with real world scales. For predictable results better use (or re-adjust) your models to real scales.

For people like in your case or Boris' case, whom for any reason, are not getting proper results, I've prepared a simple setup with The Patient scene (again courtesy of Ten24):

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/DPSSBlurComparison.gif

Hoping you can study it and perhaps may be useful as starting point for more enhanced setups. Since I have no permission to re-distribute the project files, you need to download the original files from Ten24 web site (http://www.ten24.info/index.php/shop/character-training/making-of-the-patient-35/). Then download my scene from here (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldmanSSBlurBackLitTest.rar) and the skin surface file here (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldManHeadReplace.rar). Load the scene by using the original objects and texture files. Then replace the OldManHead surface by the OldManHeadReplace.srf. or if you are pre-gamma correcting your textures, use this .srf file (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldManHead.rar). F9 and that's all.

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/before&after.gif
DP SSBlur and DP Back Lit declare this patient cured :D

Hope it helps,


Thanks again to Denis Pontonnier (http://dpont.pagesperso-orange.fr/main_en.htm) for this new update :beerchug:



Gerardo

Boris Goreta
10-26-2011, 04:43 PM
Thanks Gerardo for explaining but your scene and srf files are not reachable.

gerardstrada
10-26-2011, 04:52 PM
hmmm... links work perfectly here :)



Gerardo

jasonwestmas
10-26-2011, 05:04 PM
Links don't work from here either. =( Only the first one does.

gerardstrada
10-26-2011, 05:18 PM
All links are working in this way here:

In Firefox, RMB => Save Link As...



Gerardo

erikals
10-26-2011, 05:25 PM
-------

gerardstrada
10-26-2011, 05:33 PM
Just in case, I've replaced the links. Do let me know if that's solves the situation.



Gerardo

erikals
10-26-2011, 05:53 PM
all good now :]

thank you Mister!... \:]

CookTorrance
http://forums.newtek.com/showpost.php?p=991296&postcount=35
CC Tools
http://www2.informatik.hu-berlin.de/~goetsch/CCTools/

gerardstrada
10-26-2011, 06:04 PM
Great! thanks for confirming.



Gerardo

jasonwestmas
10-26-2011, 06:12 PM
All links work now, thank you sir! ;)

caesar
10-26-2011, 07:03 PM
I just can't bear 2 guys can create excellent LW tools (edit - for free) as fast as lightning and NT...just remembers me a ...paper brick....

Boris Goreta
10-27-2011, 02:46 AM
How do I get DP_Cook Torrance ? Is it part of DP_Kit ?

erikals
10-27-2011, 02:51 AM
i wondered about that too, i found it posted by Denis in these forums though...
(note, 32bit)

check my post #54 (http://forums.newtek.com/showthread.php?p=1190901#post1190901)

Boris Goreta
10-27-2011, 03:03 AM
There are actually two cook-torrance shaders in a Light Group node from DP Kit.

nikfaulkner
10-27-2011, 03:46 AM
wow, thanks gerado.

got it working in 9.6, gonna tinker with it when i get tme to try and get my thick head around the concepts

thanks again

nik

dulo
10-27-2011, 04:19 AM
I can not find the DP_SSBlur Node in the win64 versions of DP Filter for Lightwave 10.0. from 10/26/11 if i load a scene which contains this node LW tells me that no NodeHandler was found with the name DP_SSBlur. Anybody else has the same problem ?

erikals
10-27-2011, 09:57 AM
There are actually two cook-torrance shaders in a Light Group node from DP Kit.

true, didn't notice,... http://dpont.pagesperso-orange.fr/plugins/nodes/Additionnal_Nodes_2.html

i used the one linked in post #54 though, seemed to work,...

gerardstrada
10-27-2011, 03:46 PM
Yes, DP Light Group node has also Cook Torrance models, but the variation of the Beckmann distribution I'm using in the DP Cook Torrance shader is not the same that the DP Light Group shader. The Beckmann 2 distribution as Denis explain in the thread posted by Erikals (thanks for the link, btw) is more brighter in glazing angles, this behavior looks more realistic I think, and and it's more near to the original algorithm. I had to darken a bit also the specular map and brighten the glossiness map in the nose area.

For some reason I can not edit the first post of these tools, but the True Back Normal option in DP Back Lit shader works with DP Extra Buffers. With DP Global Buffers the shader doesn't work with radiosity, but this may be almost irrelevant if we are using a 3D light for the backlighting.

Setting up the DP Back Lit shader in DP Global Buffers might be more convenient if we have many characters with similar/same skin settings and we don't want to set up one by one individually in Surface Node Editor.

Denis' Tip: We can use a SurfaceID node in Global Buffer (LW SurfaceID Buffer is not AntiAliased) if there are more than one surface in the scene, a Logic node may help for filtering surfaces. But SurfaceID node calls a Mesh function and this is slow.

This is an excellent idea, I think. The node setup would be something like this:

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/BLGBsetup.png

The SurfaceID node output all surface IDs in scene as integer numbers and what we are doing with the Logic node is telling to DP Global Buffer - if any of these numbers is my surface number, then you give me a white color (1.0 value) for my alpha - we can do that with other surfaces in scene and we can even sum surfaces (just be sure to clamp the final sum at the end to get always 1.0 value). How we know what number is the surface we want to pick? Sort surfaces by Object in Surface Node Editor and then count, from the top to bottom, the number of the surface we want to pick. In The Patient scene the skin surface is the 7th, so we set up 7.0 in the Logic node. I've noticed that Surface Number output in the d&b Extended Spot Info node is more faster, then in such case, we rest -1 to the number of the surface. i.e.: for the 7th surface we set 6.0). Notice that the surface number will change if the amount of surfaces also change.

Later in DP IFNE we can replace the DP Get Extra Buffers by the DP Get Global Buffers node:

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/GBIFNE.png

In this test:

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/GBtest.gif

I've got the skin surfaceID and the eyeglasses surfaceID in DP Global Buffer and mixed that to get the the skin effect at about 50% in the eyeglasses area, but at 100% in the rest of the skin.

You can download other sample scene for examination here (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldmanGBBackLitTest.rar). Just load the scene and replace the OldManHead Surface with the proper .srf file shared before and delete the Scalar, DP Back Lit and DP Store Extra Buffer nodes since we don't need them with this setup.

Hope it helps,



Gerardo

P.D. 1 Just in case, Denis Pontonnier is the only developer of these tools (http://dpont.pagesperso-orange.fr/main_en.htm). I've just learned a lot in the betatesting process.

P.D. 2 Dulo, I'll take a look and report it to Denis. Thanks.

gerardstrada
10-27-2011, 10:06 PM
I can not find the DP_SSBlur Node in the win64 versions of DP Filter for Lightwave 10.0. from 10/26/11 if i load a scene which contains this node LW tells me that no NodeHandler was found with the name DP_SSBlur. Anybody else has the same problem ?
Nope. Here's working as expected. The only difference is that the rim effect of DP Back Lit shader in DP Extra Buffers is still there (I'll report this). DP Back Lit shader in DP Global Buffers is working perfectly though.

You might want to try by deleting the plugin in LW Edit Plugins Menu and in the plugins folder, copy and install again - disable also Autoscan Plugins.



Gerardo

dulo
10-28-2011, 04:41 AM
Manually reloading the dp_filter plugin did the job. Now it seems to work !!

thx

dulo
10-28-2011, 06:02 AM
I changed your (gerardstrada) sample srf file to lightgroup cook torrance because it seems to me the dp_cooktorrance is only available for 32bit. So if somebody wants to play around on x64 with the old man scene you could use the this srf file, even if its the "wrong" cook torrance ..

But i still have a problem on x64 LW10.1 as you can see in the attached screenshot. This problem does not exist on LW96 x32. I am using all the latest versions of DP nodes .. on both LW 96 and LW10.1.

dpont
10-28-2011, 06:42 AM
...But i still have a problem on x64 LW10.1 as you can see in the attached screenshot. This problem does not exist on LW96 x32. I am using all the latest versions of DP nodes .. on both LW 96 and LW10.1.

Was originally an Extra Buffer problem in all versions for DPFilter 10 only,
it has been fixed in the win32 version yet,

Denis.

dpont
10-28-2011, 10:48 AM
Was originally an Extra Buffer problem in all versions for DPFilter 10 only,
it has been fixed in the win32 version yet...

This has been fixed in DPFilter 10 win64 too.

Thanks Marvin,
Denis.

gerardstrada
10-28-2011, 11:52 AM
Thank you very much Denis and Marvin!



Gerardo

P.D. Thanks Dulo for the scene adaptation, too!

dulo
10-28-2011, 12:07 PM
This has been fixed in DPFilter 10 win64 too.

Thanks Marvin,
Denis.

Wow that was fast !!! Unbelivable !
Thanks a lot .. will try it right away ..
great .. now it works perfectly as you can see in the attachment !!

:thumbsup:

Cageman
10-28-2011, 01:51 PM
Wow that was fast !!! Unbelivable !
Thanks a lot .. will try it right away ..
great .. now it works perfectly as you can see in the attachment !!

:thumbsup:

So... how fast does it render?

erikals
10-28-2011, 01:55 PM
have to test more, but i though it was so-so...

jasonwestmas
10-28-2011, 02:22 PM
have to test more, but i though it was so-so...

What does that mean. . .so-so? so slow? :D comme-ci comme-ca? Tres Bien?

dulo
10-28-2011, 02:41 PM
For me it seems to be exactly as fast as simple skin in the old man scene. It also seems to multithread extremely bad. From 16 Cores only two seem to be used. Still testing ..

dpont
10-28-2011, 03:07 PM
For me it seems to be exactly as fast as simple skin in the old man scene. It also seems to multithread extremely bad. From 16 Cores only two seem to be used. Still testing ..

The only rendered part done with the Back Lit node
is compatible with multithreading,
but Lightwave Image Filter is strictly single threaded,
blurring like writing in a buffer can't be mutithreaded.

Denis.

jasonwestmas
10-28-2011, 03:39 PM
For me it seems to be exactly as fast as simple skin in the old man scene. It also seems to multithread extremely bad. From 16 Cores only two seem to be used. Still testing ..

So I guess its main advantage then is the higher control factor which is what pixel filters are mainly about anyway.

gerardstrada
10-29-2011, 01:26 PM
The difference in render times in the scene of my first samples is more notorious. 95 seconds for Simple Skin and 37 seconds for the screen-space SSS.

There's something curious because the filter in my first tests took between 0.7 - 1.2 seconds, while the filter with these new tools takes 0.1 - 0.2 second. However since with these new tools we are using Extra/Global Buffers, the render (before filter application) slows down the whole process and the final difference is not so notorious.

In the old man scene there's no much difference since Simple Skin settings are very low (just 4 rays for dermis) which may work for stills but it's not very convenient for animations or close-ups. Also, more characters with skin materials, slower the render.

We might give a try the screen-space SSS method when skin or sss materials produce too much noise or splotches, or when the kind of setup for the translucent material or number of objects slow down the render. Notice also these tools may reproduce other SSS materials besides skin.

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/plastilinetest.jpg
(quick test for plastiline material)



Gerardo

Sensei
10-29-2011, 01:40 PM
but Lightwave Image Filter is strictly single threaded,
blurring like writing in a buffer can't be mutithreaded.

In Image Filter class plug-in should implement its own multi-threading.

Allocate enough memory, getLine() in loop to get whole image, then create threads, process image in threads, f.e. every row different thread, then threads are finishing work, and the main thread is storing recorded rgba using setRGB() and setAlpha() in loop.

dpont
10-29-2011, 02:47 PM
In Image Filter class plug-in should implement its own multi-threading.

For single task yes, but in DP Filter, as node editor
the process is more complex, as Gerardo mentioned,
slowness is mostly caused by buffering.

Denis.

silviotoledo
12-21-2011, 11:05 AM
http://www.ir-ltd.net/mental-ray-skin-phenomena.

Phenomena is the a Mental Ray shader for fast results in skin!

Hope newtek can adapt these techniques :)

jasonwestmas
12-21-2011, 11:14 AM
hehe, must be strange for Lee to have his head pasted everywhere like this.

erikals
12-21-2011, 04:32 PM
interesting, but that post didn't tell me much, no rendertime, no resolution, no amount of flicker...

a very vague post, so impossible to say just how it compares to Lightwave.

jasonwestmas
12-21-2011, 04:49 PM
interesting, but that post didn't tell me much, no rendertime, no resolution, no amount of flicker...

a very vague post, so impossible to say just how it compares to Lightwave.

As if NT wasn't interested in the words "fast" "simple" and "realistic". Could explain why we have 3 skin materials now.

silviotoledo
01-04-2012, 06:35 AM
Yeah, and I would sugest the 4th SKIN node for Newtek. :)

'cause the actual ones asked me 5 hour rendering on a face close full HD image. Too much!

What about a new one called FAST FAKE SKIN ? :) based on the explanations from Mr. Strada. This would save a lot of rendering time.


A trick to get realtime SSS effect:
http://www.youtube.com/watch?v=Q4GpfnUirXE

Fast phenomena skin shader. See the Mental Ray shader tree:
http://www.ir-ltd.net/mental-ray-skin-phenomena

A blender realtime effect
http://www.youtube.com/watch?v=ukAxt6lLhSI

But this one is still the best in my point of view:
http://www.iryoku.com/teasing-our-real-time-skin-rendering-advances


Any Newtek guy looking?

erikals
01-04-2012, 08:05 AM
sigma is fast, and looks sorta like the realtime examples you posted above.

there's really no need for any of those in LW i think, except for the last link you posted.
but that technique has already been discussed here.
Gerardo made some interesting tests on it, though in the end, maybe because of all the processes it had to go through, wasn't as fast as hoped. (as far as i could see)

it's still a valid request though, the technique of the last post you had does look interesting, though of course it depends on what GI setting they used as well.

remember, sss in Raytrace only mode often render in seconds...

jasonwestmas
01-04-2012, 08:09 AM
Or you can just increase the scattering cutoff for the skin node to increase the speed. And uncheck Multiple scattering. You can even turn off the reflection completely for the skin and composite another faster specular in.

All in all I just recommend creating a simple setup that renders fast and then create different layers for your epidermis, subdermis, diffuse and specular. That way you can get just the right looks for the sss and reflection. Gerardo has several examples of that if you haven't seen them. Just saying that there are many ways to speed things up and get nice results.

saikafu
01-05-2012, 02:18 AM
hi all ~
I want to know why I double click image filter node and LW always crash when I check any channel (diffuse,specular ...)
why?
I use LW10.1 64bits Win7 home ..

pixels3d2003
03-13-2012, 04:57 PM
Hi-this is all fantastic! I've downloaded Dennis' DP kit and DP filters- I see them in my plugin list. DPbacklit and DPSSSblur have lock icons next to them in the list. When I load the OldManHeadReplace.srf I don't see any new nodes added- see the attached image- I do see a not connected Displacement map-and one other truncated node setup. I'm asked for DP_CookTorrance (which I don't find a Mac version for).
When I load the SSBlur or SSBlur backlit test scenes I'm asked for other plugins I don't have. SG-CC,, dbWexPset...?
Can someone please post a .srf file with the DPBacklit and sss blur nodes connected?
Thanks!

gerardstrada
03-15-2012, 05:23 PM
.

gerardstrada
03-15-2012, 05:25 PM
Saikafu, really sorry for the late replay. Sounds like an installation problem. Just in case, try deleting any old version of the plugin from the plugin list and your plugin folder. Disable Auto-Scan Plugins and install the newest DP FNE by hand again.

Pixels3d2003, the node setup of your attachment looks like the node setup that comes with the model, doesn't look like the .srf file shared here (http://forums.newtek.com/showpost.php?p=1190882&postcount=47).

The shared surface file uses the thrid-party plugins db&w Simple Colour Corrector node and DP_CookTorrance. Simple Colour Corrector is part of the db&w Tools (http://www.db-w.com/products/dbwtools/download/viewcategory/13-free-lightwave-plugins-by-dbaw).

There's no Displacement map connected in Surface Node Editor because that's solved in Displacement Node Editor - it's the original node setup shared by Ten24 that I haven't touched.

The version of DP CookTorrance used (which I find the most realistic of all) has no 64-bit version or Mac version, but you could use the DP Light Group node to try mimic a similar result. It's not same thing, so you'll have to double up the rim light intensity - (hope the single DP CookTorrance shader could be included as a third version in DP Light Group node).

The node setup in the DP PFNE uses also the db&w Extended Spot Info node that it's also part of the db&w Tools. However we don't need that setup with the Logic node anymore. With the new DP Mask Objects / DP Mask Surfaces nodes we can easily mask any object or surface in DP PFNE:

http://imagic.ddgenvivo.tv/forums/FNE/Masks/MaskSetup.png
The Surface ID node is not needed in LW 10.1 or LW 11.

The node setup in the DP IFNE uses also the SG CCNode (http://www2.informatik.hu-berlin.de/~goetsch/CCTools/) by Sebastian Goetsch which is an advanced color corrector tool (btw, an awesome new version is on the way!). The setup uses a basic gamma curve for display purposes only, so in Mac and in LW 9.6, you could use the Simple Color Corrector node or the FPGamma filter at 2.2, or with further control with DP Curve.

I'm linking a new scene file (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldmanGBBackLitTest2.rar) optimized for Mac users that make usage of the new DP Surface Mask node (for LW 9.6 as it seems you are using), and a new surface file (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldManHeadReplace2.rar) without the DP CookTorrance node.

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/oldmanLGCT.jpg



Gerardo

gerardstrada
03-16-2012, 02:27 PM
Just to let you know Denis has included the distribution of the standalone DP Cook Torrance node in DP Light Group node!

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/oldmanLGCT2.jpg
It's the Cook-Torrance C option :thumbsup:

This is available for x32 versions yet but I've updated the surface file with this new shader here (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldManHeadReplace3.rar) and the scene file (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldmanGBBackLitTest3.rar). The scene file has also a nice trick for gamma correction by using the DP Curve filter. We are using there a Gamma Function but we can also model virtually any response curve in each RGB channel independently and in luminance, which is very handy for many color "looks".

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/oldmanLGCT3.jpg



Gerardo

Eric Walters
03-16-2012, 03:05 PM
Thanks gerard!
Would it be possible to post the node script? I.E. Oldman.node or whatever you call it? Thanks! That would load the node network you are using. Much appreciated!


Saikafu, really sorry for the late replay. Sounds like an installation problem. Just in case, try deleting any old version of the plugin from the plugin list and your plugin folder. Disable Auto-Scan Plugins and install the newest DP FNE by hand again.

Pixels3d2003, the node setup of your attachment looks like the node setup that comes with the model, doesn't look like the .srf file shared here (http://forums.newtek.com/showpost.php?p=1190882&postcount=47).

The shared surface file uses the thrid-party plugins db&w Simple Colour Corrector node and DP_CookTorrance. Simple Colour Corrector is part of the db&w Tools (http://www.db-w.com/products/dbwtools/download/viewcategory/13-free-lightwave-plugins-by-dbaw).

There's no Displacement map connected in Surface Node Editor because that's solved in Displacement Node Editor - it's the original node setup shared by Ten24 that I haven't touched.

The version of DP CookTorrance used (which I find the most realistic of all) has no 64-bit version or Mac version, but you could use the DP Light Group node to try mimic a similar result. It's not same thing, so you'll have to double up the rim light intensity - (hope the single DP CookTorrance shader could be included as a third version in DP Light Group node).

The node setup in the DP PFNE uses also the db&w Extended Spot Info node that it's also part of the db&w Tools. However we don't need that setup with the Logic node anymore. With the new DP Mask Objects / DP Mask Surfaces nodes we can easily mask any object or surface in DP PFNE:

http://imagic.ddgenvivo.tv/forums/FNE/Masks/MaskSetup.png
The Surface ID node is not needed in LW 10.1 or LW 11.

The node setup in the DP IFNE uses also the SG CCNode (http://www2.informatik.hu-berlin.de/~goetsch/CCTools/) by Sebastian Goetsch which is an advanced color corrector tool (btw, an awesome new version is on the way!). The setup uses a basic gamma curve for display purposes only, so in Mac and in LW 9.6, you could use the Simple Color Corrector node or the FPGamma filter at 2.2, or with further control with DP Curve.

I'm linking a new scene file (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldmanGBBackLitTest2.rar) optimized for Mac users that make usage of the new DP Surface Mask node (for LW 9.6 as it seems you are using), and a new surface file (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldManHeadReplace2.rar) without the DP CookTorrance node.

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/oldmanLGCT.jpg



Gerardo

Eric Walters
03-17-2012, 04:09 AM
Hi Gerardo

I wonder if there is a bug in LW Mac 9.6.1 (64 bit). When I loaded the Mac srf file you provided-it did not change the node set up from the original Ten24 set up.
LW 9.6 32 bit- I get this-is this correct?

gerardstrada
03-17-2012, 12:31 PM
I don't think there's a bug in the Mac version. As I commented in my previous post, the new surface file makes use of a new version of DP Light Group that includes the distribution of the standalone DP CookTorrance node, which is available for x32 version yet. Since you are on x64, the .srf file can not find the new CookTorrance C distribution selected in the .srf file and it can not be opened.

Try to switch to LW x32 for this test (until Denis and Marvin update the DPKit x64). Just in case, I'm linking the .nodes files (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldManHeadReplace3.rar) of the the surface (OldManReplace3SNE.nodes) - it should look as simple as this:

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/Surf.png

I'm including also the node files in DP PFNE (OldManReplace3PFNE.nodes) and the node files in IFNE (OldManReplace3IFNE.nodes). Notice there's a new versions of DP FNE from yesterday - also x32 yet. Again, try this in LW x32 until the new x64 versions be available.



Gerardo

Eric Walters
03-17-2012, 01:17 PM
Gerardo
Thank you so much for your help with all this!!!!!!!!!!

Eric


I don't think there's a bug in the Mac version. As I commented in my previous post, the new surface file makes use of a new version of DP Light Group that includes the distribution of the standalone DP CookTorrance node, which is available for x32 version yet. Since you are on x64, the .srf file can not find the new CookTorrance C distribution selected in the .srf file and it can not be opened.

Try to switch to LW x32 for this test (until Denis and Marvin update the DPKit x64). Just in case, I'm linking the .nodes files (http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/OldManHeadReplace3.rar) of the the surface (OldManReplace3SNE.nodes) - it should look as simple as this:

http://imagic.ddgenvivo.tv/forums/FNE/SSBlur/Surf.png

I'm including also the node files in DP PFNE (OldManReplace3PFNE.nodes) and the node files in IFNE (OldManReplace3IFNE.nodes). Notice there's a new versions of DP FNE from yesterday - also x32 yet. Again, try this in LW x32 until the new x64 versions be available.



Gerardo

gerardstrada
07-17-2014, 06:08 AM
Just in case, this SS skin method is improved by filmic TMOs:


http://s2.postimg.org/6cru8inyh/comparison.jpg

You can try a Filmic TMO for DP FNE here (http://forums.newtek.com/showthread.php?71751-Extra-Buffer-nodes&p=1390043&viewfull=1#post1390043).



Gerardo

mewnow
07-17-2014, 07:19 AM
Gerardo,is this method suitable for character animation?Seem it need a stronge rim light...

gerardstrada
07-17-2014, 10:36 AM
Yep. the method is free-noise and suitable for animation (originally used in videogames). The critical part is get the proper alpha for masking the skin surfaces for correct interaction with other overlapping geometry. In such case, DP Mask Surfaces node may be useful.

Just in case, there's no rim light in the previous sample, just zenithal lighting. Here's a test with backlighting where the back scattering effect is more apparent:

http://s16.postimg.org/55cm57q3p/bglite.jpg



Gerardo

mewnow
07-17-2014, 08:11 PM
Very nice.
Expect an updated config example with that Filmic thing.

gerardstrada
07-19-2014, 04:10 PM
Essentially, it's just a matter of adding the Filmic Tone Mapping operator setup shared here (http://forums.newtek.com/showthread.php?71751-Extra-Buffer-nodes&p=1390043&viewfull=1#post1390043) at the end of the SSBlur setup shared here (http://forums.newtek.com/showthread.php?122729-Realtime-Ultra-realistic-SKIN-SHADER&p=1189999&viewfull=1#post1189999).

In this case, the SSBlur setup I'm using is a bit more complex that the node setups shared here seeing that the trick I'm using is to separate the Shaded Diffuse buffer in its illumination pass (http://www.lightwiki.com/wiki/Multipass_Rendering_with_Filter_Node_Editors#Illum ination_Pass) and Raw color pass to apply the SSBlur in the Illumination pass (31.5 Strength) and in the Raw Color pass (0.0 Strength) by separate. In this way we are able to produce very sharp textures and very soft (faked) SSS results.



Gerardo

gerardstrada
07-23-2014, 05:21 AM
Just in case, this is quick explanation in 7 steps about the commented node setup:


http://forums.newtek.com/attachment.php?attachmentid=123188&d=1406113259

This node setup could be useful in cases where we need a stronger effect (higher Variance Layer values) than the one that provides the skin preset, but without compromising the sharpeness of the textures.


The node setup is consistent with direct lighting

http://forums.newtek.com/attachment.php?attachmentid=123189&d=1406113415

and with Global Illumination

http://forums.newtek.com/attachment.php?attachmentid=123190&d=1406113509

Hope it may help for middle-ground/back-ground characters.



Gerardo

p.d. there's also a bit more advanced setup where we separate the faked scattering component only (without the illumination pass) for getting more control over the scattering effect. Such method might be useful for some hero characters or for more translucent materials.

mewnow
07-23-2014, 06:42 AM
Awesome!Thanks for sharing the node setup.
A more question,if I want to export the buffers to ae for compositing,I will not able to use this Filmic node,right?

gerardstrada
07-24-2014, 03:34 AM
Not precisely this filmic node (unless it can be added as expression/script), but there are several ways to get filmic tone mapping within AFX and other ways within LW as well.

There was a TMO for AFX called Ginger HDR by John Hable which looks to be based in the same formula, but pitifully the website is down now.

We can use also a Highlight Compression filter with a 2 Cineon Converters concatenation (Lin2Log and Log2Lin). The film "look" is got by adjusting the cineon converter parameters - linear gamma for the first one and gamma corrected for the next one.

For more real film "looks" we can use Log Film profiles and Film Print preview profiles concatenations from the real thing (wth Color Profile Converters). Color appearance will vary depending on the profiles used. Within LW we can use also The SG_CCTools for getting the same filmic looks.

http://forums.newtek.com/attachment.php?attachmentid=123215&d=1406193680

Guess it would be possible also to implement a similar SSBlur setup (by pre-composing layers) within AFX but I think it's easier to export them as passes with DP Global BUffers already from LW.



Gerardo

mewnow
09-19-2014, 07:59 AM
Since already there is a Get Gobal Buffer node,we can only use those unused slots of which for export?

Try to export front-scattering buffer and back-scattering buffer and other necessary buffers (via Get Gobal Buffer) for compositing(I think something like Blender or AE is more flexibility for animation),but I just got different looks from FNE.Seems an Add blend effect in FNE is different from what in other application(Blender and PS in my case).
Just like Gerardo's node setup,how to combine those build-in/custom buffers in Blender or PS or AE?

@Gerardo
In case post #100,if I want to use light passes(key light pass/fill light pass...) instead of illumination pass, do I have to SSBlur them separately?In other words,how to deal with light passes in Screen Space SSS situation?

Also,you mention there's also a bit more advanced setup where we separate the faked scattering component only.Is there any chance to share the setup?

erikals
09-19-2014, 11:08 AM
Dang, totally missed this post...! http://erikalstad.com/backup/misc.php_files/king.gif

gerardstrada
09-22-2014, 05:14 AM
Since already there is a Get Gobal Buffer node,we can only use those unused slots of which for export?
Double click Image Filter and enable Global Buffers, then a list of 24 buffers will be displayed. Connect there your custom buffers. Add a DP Get Global Buffer node, double click on it and save in some FP format (linear space).


Try to export front-scattering buffer and back-scattering buffer and other necessary buffers (via Get Gobal Buffer) for compositing(I think something like Blender or AE is more flexibility for animation),but I just got different looks from FNE.Seems an Add blend effect in FNE is different from what in other application(Blender and PS in my case).
Just like Gerardo's node setup,how to combine those build-in/custom buffers in Blender or PS or AE?
Here LW, PS and AFX renders the "Add blending mode" in the same way. The issue you are experiencing could be due to your output images (format or colorspace).

If you have exported in 8-bpc format, color blending won't be linear and you will need to enable Blend Colors using gamma 1.0 in PS. Within Blender you would need to linearize the images and color correct the output.

If you have exported in EXR files and you have worked with the sRGB preset (CS panel), for some reason LW assumes your output is in aRGB chromaticities (not sRGB) and it embeds aRGB in the EXR file, so other apps interprets colors differently than you actually previewed in LW. In AFX and PS you need to switch from the Embedded profile to the proper colorspace.


@Gerardo
In case post #100,if I want to use light passes(key light pass/fill light pass...) instead of illumination pass, do I have to SSBlur them separately?In other words,how to deal with light passes in Screen Space SSS situation?
Notice FNE is able to work with input images as well. So you could probably want to pre-compose the light passes within LW and apply SSBlur there. Applying the SSBlur over the lighting pass and separating this faked sss pass to add or subtract later the light passes won't produce good results (mostly if you change lighting levels or colors too drastically). So yes, if you want to migrate everything to an external composer, you would need to apply DP SSBlur to each light pass.

If you ask me, a more practical setup would be to apply DP SSBlur to the lighting pass, plus only the light passes that you would re-adjust (commonly Key light, or back/rim light).


Also,you mention there's also a bit more advanced setup where we separate the faked scattering component only.Is there any chance to share the setup?
What we do is get the difference between the effect with full strength and with no strength (or without the effect depending on the case), the result could be further re-colored or textured and we can add this as an additional faked sss layer. The faked sss effect in this way can be stronger. Will share the node setup in a near future http://forums.newtek.com/images/icons/icon7.png



Gerardo

mewnow
01-07-2016, 01:27 AM
Denis' Tip: The default SSS Strength option at 31.5 is based on an arbitrary resolution of 720p and 20° FOV.


Any rules how to tweak SubScattering Strength option?

131799
Lens Focal Length 24mm, Strength 31.5, spot\halo in dark area

131800
Lens Focal Length 70mm, Strength 31.5, no spot\halo but less SSS effect

131801
Lens Focal Length 24mm, Strength 4, floor appears

131802
Lens Focal Length 70mm, Strength 4, less SSS effect than 24mm, there is floor object still

How to eliminate those spot\halo in dark area? Strength or Max Depth Difference or Variance option?

dpont
01-07-2016, 01:44 AM
You could try to move this setup in Pixel Filter node editor with Anti-Aliasing option.

Denis.

mewnow
01-07-2016, 02:22 AM
131803
Connect to color slot, gets totally black render

131804
Connect to global slot, then use get global buffer node still gets totally black render

dpont
01-07-2016, 02:30 AM
Can't see on this screenshot if you are using two Pixel Filter node editors,
this trick is required for effects on a whole image like blur in Pixel Filter context,
the first editor must remain empty, while you use the second for the nodal setup,
more complicated but you can get smoother AA mask here.

Denis.

mewnow
01-07-2016, 02:44 AM
I only use one Pixel Filter Node Editor, once I connect SSBlur to global buffer slot, I use Get Global Buffer in Image Filter Node Editor to get the render, totally black render.

dpont
01-07-2016, 03:49 AM
I only use one Pixel Filter Node Editor, once I connect SSBlur to global buffer slot, I use Get Global Buffer in Image Filter Node Editor to get the render, totally black render.

As I said, you can't get a result with such node in one Pixel Filter NE,
because it hasn't access to the whole buffer,
but you could plug an anti-aliased mask in a global buffer
for using it in the Image Filter NE.

mewnow
01-07-2016, 04:56 AM
Adding two Pixel Filter node editors, LW aways crash when render

dpont
01-07-2016, 06:08 AM
Adding two Pixel Filter node editors, LW aways crash when render

Well don't know exactly your config and setup,
that's doesn't crash here, but forget it,

looking your sample image,
I'm more inclined to suspect a poor mask border quality
than specific SSSBlur settings,
and which such dark background and floor
its quality is crucial,
adaptive sampling is always a bad idea,
because it is based on the whole color image contrast
not the mask itself,
also Extra Buffers don't work very well for that,
that's why I spoke about a proper antialiased mask.


Denis.

mewnow
01-07-2016, 06:34 AM
Denis, I am not saying aa\edge issue, I am saying strange spot issue showing in my pictures:
131806

dpont
01-07-2016, 06:49 AM
Denis, I am not saying aa\edge issue, I am saying strange spot issue showing in my pictures:
131806

So sorry, I misunderstood what you said,
and I'm clearly not competent for helping you,
except basically that the 4th Variance Layer is guilty,
I think that the authors of the algorithm have never
experimented with a Rabbit (toy) skin,
and that you are probably the best person for finding
a compromise with you model, if possible.

Denis.

gerardstrada
01-07-2016, 02:42 PM
Denis, I am not saying aa\edge issue, I am saying strange spot issue showing in my pictures:
131806
Can't really say without knowing more about the model/scene setup but have the idea is a mesh problem (probably a topology issue - like when the mesh doesn't flow well with the form - or duplicated polys)

As for the SubScattering Strength, the default 45.24° FOV (640x480) and default skin and marble presets commonly provides pretty good results:


http://s24.postimg.org/sphs0jn4l/sample1.jpg

You can begin to tweak from there to bigger values. This is about 20° FOV (55mm lens at same film back size) and SSS Strength of 157.5 (31.5*5) for more or less matching the 45° FOV:


http://s17.postimg.org/4gffx4a67/sample2.jpg

and you could even exaggerate a bit more the Strength - 200 on this one:


http://s27.postimg.org/mjp21ie2r/sample3.jpg

These are just references values that you need to check with the surface you are trying to match. Consider also this is a quick hack compiled as a useful tool, but still a hack mostly used in realtime apps.



Gerardo

mewnow
01-07-2016, 08:13 PM
Thanks Denis and Gerardo.
Confirmed is a model problem. A T-pose/non-overlapping model works fine with this SSBlur/Screen-Space SSS.

gerardstrada
01-07-2016, 08:27 PM
Glad you found the issue! hope the mesh can be fixed without too much hassle.



Gerardo

mewnow
01-07-2016, 09:14 PM
I don't think my mesh itself has modeling issue, the issue is not a relax T-pose, meaning it's hand can not be place in front of it's body.
I will upload the model and scene file for confirm.

In my scene, at Frame 10, I place a ball with an same surface as rabbit in front of its face, than spot/halo appear on its face.
131819
Look at the face.

131820
Spot appear.

Test scene file 131821

gerardstrada
01-08-2016, 01:25 PM
The model has a clean topology, so it's not the mesh, as you say. I isolated the character layer, delete the original surface and used only a basic one, then saved it as a separate object and loaded into my reference scene. Your model was very small for the ref scene, so I have to resized it to about 5.15 and got this:


http://s30.postimg.org/4fb5oiold/ref.jpg

So it was a model scale issue. Take your original scene and parented all to a master Null, and re-scaled the scene 515% to solve the problem. I also changed all lights to Area type because I was getting too sharp shadows when scaling the scene up. I'm re-attaching your scene here (https://www.sendspace.com/file/4f5dz5) with these changes in case you want to take a look.

Have the idea the issue with the models scale might be due to the original blur algorithm (which is pretty basic and fast). Similar issue is present with too large models. Maybe Denis could change to a blur with higher quality but this would also increase render times, which is not the idea for this type of tools.



Gerardo

mewnow
01-09-2016, 05:08 AM
Awesome! Gerardo, thanks.
Ever if with the renew scene, I still cant get similar effect as yours, dont know what is wrong.
Would you share your scene and setting?
Thanks again.

gerardstrada
01-13-2016, 11:25 AM
Awesome! Gerardo, thanks.
Ever if with the renew scene, I still cant get similar effect as yours, dont know what is wrong.
Would you share your scene and setting?
Thanks again.
That's because you are using too saturated base color. Diminish a bit the saturation or increase it in the SSBlur's layers. The SSBlur setup is exactly like in the shared scene for the same FOV as you can see in the attached scene. Lighting is also softer http://forums.newtek.com/images/icons/icon7.png



Gerardo

erikals
01-14-2016, 01:18 PM
thank you! http://erikalstad.com/backup/misc.php_files/smile.gif

131888

Waves of light
08-13-2016, 03:58 AM
Subscribed.