PDA

View Full Version : REAL SSS without plug-ins



adamsanders
08-08-2005, 07:10 PM
So far there have been many attempts to simulate the effect of sub-surface scattering in Lightwave, with and without plug-ins. Ogo-Hikari looks great, but is buggy and slow and hasn't seen much development. Other attempts only deal with sss from a light source but fail to simulate the effect that happens when a solid object is inside the SSS object (like a wick in a candle). I have now perfected a technique that doesn't rely on plug-ins and renders relatively quickly. If Newtek reads my tutorial when I finish it, they will see that this could be done without the semi-complex set-up I require and by simply using tools already built into lightwave. Here are some examples until I get the tutorial up:

http://www.adamsanders.net/images/tutorials/sss/images/wire1.gif http://www.adamsanders.net/images/tutorials/sss/images/wire2.gif http://www.adamsanders.net/images/tutorials/sss/images/candle2_02.jpg http://www.adamsanders.net/images/tutorials/sss/images/candle2_03.jpg http://www.adamsanders.net/images/tutorials/sss/images/candle2_04.jpg

With a few radiosity bounces via Fprime this could look really good and wouldn't have to use the "distance to object (nullparented to light) gradient" technique or G2.

Tutorial soon.

adamsanders
08-08-2005, 07:51 PM
Tutorial:

When I finally figured out what was going on inside real-life SSS materials, I realized two things are happening:

1) In both "waxy" and "glassy" materials, light enters the object and some rays can get farther through the material than others. In other words, the farther into a SSS material you go, the more opaque it is (like thicker stained glass vs thinner stained glass).
and
2) In "waxy" materials only, light also gets scattered by the particles inside, creating a blurred refraction. So the closer to the surface light is, the less it gets scattered. But, the more particles a ray hits and the farther the light travels, the more it becomes scattered. It gets really crazy in there.

Lightwave doesn't have a native solution to simulate SSS, and SSS plug-ins are scarce, buggy and slow. So, laying in my bed one college winter holiday break with my computer 200 miles away in my college apartment, I became determined to invent a plug-in-less solution to simulate SSS. And I did, that night. I've refiend it over the years, and when Newtek changed the refraction blurring from a post-procesing effect to an actual surface effect, the solution was complete.

So, here you go:

1. Make a model.

2. Import the model to LW scene in scene editor.

3. Finalize all camera movements and the object you are working on.

4. Make a "near" null (for fog) - call it "FogMinNULL." Move it to the point on the object nearest to the camera.

5. Make a "far" null (for fog) - call it "FogMaxNULL" Move it to the point on the object farthest from the camera.

http://www.adamsanders.net/images/tutorials/sss/images/s4-5.gif

5a. If you are making an animation (as opposed to a still image), you may have to animate your nulls so they are always at the near and far points on the object from the camera. (cleverer people than I could write a script for this I'm sure)

6. Activate fog volumetric (linear, black) and choose expression for min distance. We will now create a black fog that starts (is clear) at the point on the object that is nearest to the camera, and ends (gets totally black) at the point on the object which is farthest from the camera.

7. In the Graph editor, go to the expressions tab at the bottom, and hit the "builder" button.
7a. In the drop down on the Expression Builder, choose vmag (Distance, Explicit)
7b. Choose the X,Y, and Z coordinates of the active camera for inputs A-C, respectively.
7c. Choose the X,Y, and Z coordinates of FogMinNULL for inputs D-F, respectively.
7d. Accept the values, name the expression "FogMin" and hit "Create Expression."
7e. Choose the X,Y, and Z coordinates of the active camera for inputs A-C, respectively.
7f. Choose the X,Y, and Z coordinates of FogMaxNULL for inputs D-F, respectively.
7g. Accept the values, name the expression "FogMax" and hit "Create Expression."
7h. Apply FogMin to the Global.MinimumFogDistance Channel
7i. Apply FogMax to the Global.MaximumFogDistance Channel

8. Make sure that no lights affect diffuse and turn off any global illumination including the default ambient intensity.

9. In Surface editor, give the object (and any objects within) a 100% white color, 100% luminescent surface. Give the surface any bump and smoothing if you feel it is necessary.

10. Render this scene at a good resolution, at the same size if not least larger than the final movie resolution. Save this as some file name with the word min or minimum (I will refer to it as the min image). The render should show an image where the surface of the object gets darker the farther from the camers it is.

11. Go back to Modeler and flip the normals of the object. (hit f key)
11a. copy your object and give it a surface where it is 100% transparent, and choose an appropriate refraction index (I find that 1.4 or higher works pretty well for wax) and 100% refraction blurring (in the environment tab). The refraction blurring is not necessary if you plan to have a surface similar to stained glass. DO use refraction blurring if you plan to use a surface similar to wax.
11b. place the new transparent object in exactly the same place as the white object.

12. Make sure "ray trace refraction" and "ray trace transparency" are checked in render options and render the scene once again. You should see the "insides" of your object. Save this as a file with the word max or maximum (I will refer to it as the max image).

13. In an image editor or movie compositing program (whichever is appropriate), bring the min image over the max image and set the layer blending mode to "difference." What you will see at this point is a greyscale image of your object where thicker parts are represented by lighter values. Save this image or movie as "ObjectThickness." You might start to see where I'm going here.

14. Go back to Lightwave (scene editor). You may want to save the old fog scene and white texture of the object in case you change something like a camera movement.

15. Remove the fog from the scene and let your once again lights affect diffuse as well as use any global illumination. Also, flip the normals of you object back to...well..normal.

16. In the surface editor, choose the transparancy channel and give your object an image map using the "ObjectThickness" image we just made and set the projection to "Front." You can adjust the contrast, brightness, and gamma of the ObjectThickness image to tweak the transparency of the object.

17. Give your new surface the same refraction index you gave it in step 11a.

18. Tweak the rest of your surface and lighting properties.

19. Render, tweak, and repeat this step.

If LW radiosity were faster this is all we'd need to do, and we could put a glowing flame object in the candle. Since it is not (unless you have Fprime and a decent computer), you can add the diffused light source effect by doing the following:

20. Parent a null to the light and make sure it's X,Y and Z are at 0,0,0 so it is in the same spot as the light.

21. In the sss surface luminosity channel, add a gradient layer, blending mode = additive, Input Parameter = Distance to object where the object is the null we just created.

22. Set the gradient alpha to 0 at the bottom and 100 at the top, and tweak.

(credit goes to ThriJ for steps 20-22)

Remember, the transparency map is dependent on the original camera position, so it won't work if you move your camera at this point.

Someone should be able to write a plug-in that can do all this relatively easily.

Please let me know if anyone has done this before and report any errors in my tutorial. And as always, improve to your hearts content.

adamsanders
08-09-2005, 06:34 PM
Changed the thread name, lost the word "REAL." It's not real.

prospector
08-09-2005, 07:26 PM
Someone should be able to write a plug-in that can do all this relatively easily

AHH, but then you'd need a plug-in to do motion SSS ;)

Nice pic tho

adamsanders
08-09-2005, 09:02 PM
Someone should be able to write a plug-in that can do all this relatively easily

AHH, but then you'd need a plug-in to do motion SSS ;)

Nice pic tho
I've been messing with the object thickness parameter on a gradient on the transparency channel. I ALMOST works, except for two things:
1. It doesn't blur right with refraction blurring
2. It doesn't interact right with other objects inside the object.

riki
08-25-2005, 06:18 AM
Thanks for the tut, I haven't had a chance to check it out properly yet, but saved a copy for future reference.

Bog
08-25-2005, 10:29 AM
I'm sure sooner or later a rendering engine will be written which deals with all objects as actual solids, rather than infinitely-thin shells. Some evolution of current volumetric tools, or something.

'Course, it'll need a huge transputer to render a Utah Teapot, but by gh0d it'll be the most realistic **** teapot ever ;)

Dodgy
08-25-2005, 11:44 AM
I think this is what www.realsoft3d.com does...

adamsanders
08-25-2005, 02:25 PM
I think this is what www.realsoft3d.com does...
From what I can tell on their website, not exactly. Let me know if you know something I don't in regard to realsoft.

Lightwolf
08-25-2005, 02:40 PM
From what I can tell on their website, not exactly. Let me know if you know something I don't in regard to realsoft.
Actually, they render true solids, and also parametric items are never meshed and converted to polygons during the rendering process (which is quite unique and way cool).
SubDs, Nurbs, Spheres, Quadrics etc. all raytraced directly on the mathematic equation. Except for meshes of course, which are mand of polygons and need to be rendered as such.

Then again, the original programmer had the choice of either spending time on his PhD in mathematics or coding. Guess what he decided to do ;)

Oh, and one of my favourite quotes from the guy (out of an old Amiga mag): "During the finish winter there are only two things you can do to spend time, drink or code."

Cheers,
Mike - enough trivia for this post

Captain Obvious
08-25-2005, 02:41 PM
It is more or less a mathematical impossibility to calculate "solid objects." Especially since objects in real life really aren't all that solid in the first place. Even if you have a renderer/modeler that works with atoms, they still use "atom primitives" that consist of just a surface. Regardless of how you do it, you'll need to work with either approximations or surface-only calculations at one point.

art
08-25-2005, 03:43 PM
Oh, and one of my favourite quotes from the guy (out of an old Amiga mag): "During the finish winter there are only two things you can do to spend time, drink or code."


I think that should also include " or write music (usually metal)" considering large number of bands from that region (Scandinavia)

Isn't real 3d one of the older (and by that I do not mean bad) 3d packages? I remember it was available on amiga, but I never used it. It does not seem to be very popular these days.

Sorry for being OT.

Karmacop
08-26-2005, 01:47 AM
It is more or less a mathematical impossibility to calculate "solid objects."

Possibly we're thinking about this differently, but I think you're wrong. Maths can always give you perfectly solid object. Just think about a ball. Anything within the radius of the ball is rendered as solid.

Captain Obvious
08-26-2005, 02:11 AM
Possibly we're thinking about this differently, but I think you're wrong. Maths can always give you perfectly solid object. Just think about a ball. Anything within the radius of the ball is rendered as solid.
Yes, that works. But you can't really use that method for calculating, say, how a modeling tool will effect it, or how a light ray will disperse through it. If you did, you'd have to calculate for an infinite amount of points in space, which is an impossibility. You'd have to "fake it" by taking random samples or the like.

adamsanders
08-26-2005, 06:44 AM
Actually, they render true solids, and also parametric items are never meshed and converted to polygons during the rendering process (which is quite unique and way cool).
SubDs, Nurbs, Spheres, Quadrics etc. all raytraced directly on the mathematic equation. Except for meshes of course, which are mand of polygons and need to be rendered as such.

Then again, the original programmer had the choice of either spending time on his PhD in mathematics or coding. Guess what he decided to do ;)

Oh, and one of my favourite quotes from the guy (out of an old Amiga mag): "During the finish winter there are only two things you can do to spend time, drink or code."

Cheers,
Mike - enough trivia for this post

Very, very cool.

And to the rest of you, if someting is calculated as being "perfectly solid," (as I define the term) it would have an infinite number of points along any line crossing it's interior. Therefor, any ray passing through the object would be perfectly opaque.

In real life, light rays passing through an object meet a finite number of points, which is actually good news for CG programming. I have a different method of simulating SSS that uses a FEW more OPAQUE points on the interior instead of the MANY very SLIGHTLY OPAQUE points that occur in nature. I can post that method too if you like, but it's a b*tch to set up.

I personally don't believe real objects are actually "3D" as we understand it because of the nature of atoms. But that's a whole other conversation for a whole other forum.

Anyway, my tutorial is for people who need to do SSS in lightwave but don't want to buy a plug-in. Plus it was a good, fun challenge.

Karmacop
08-26-2005, 09:20 AM
Yes, that works. But you can't really use that method for calculating, say, how a modeling tool will effect it, or how a light ray will disperse through it. If you did, you'd have to calculate for an infinite amount of points in space, which is an impossibility. You'd have to "fake it" by taking random samples or the like.

Actually I think using mathematically defined primitives would be more predictable than polygon meshes. I'm not certain about this though, so you could very well be right :)

ThriJ
08-26-2005, 07:55 PM
Brilliant solution! :thumbsup:

Using Refraction to simulate distortion of objects within a SSS object! :boogiedow

I was stuck thinking there was some way with camera DOF
I had given up on finding a way to get the effect. :stumped:

It works perfectlywell, but I made a few changes to enhance the results I got. Transparency shows the sharp object within and it ignores light info, so I applied the Max image to Translucency instead. One thing that makes it loose some of its believability though is when you have big objects inside and you are not looking from directly opposite of the light. There should be some soft shadow darkening. I think there is a way to combine the effect with yours. It would be a subtle difference but you know how that goes. I’ll have to do some more experimenting when I get the time. Animation of the objects inside will be fun. :D

This certainly takes us an another step closer to a fake fast but realistic SSS solution.

Below is a test image, a DivX animation test and an image showing the soft shadow darkening issue.

adamsanders
08-29-2005, 10:32 AM
First of all TriJ, thanks for the null method, and for the compliments.

I think I have the answer to your problem, but I'll have to wait till tonight to try it out.

sirchced
08-30-2005, 07:08 AM
ThriJ, Can you post the scene files for us to study? That is a nice test animation.

UnCommonGrafx
08-30-2005, 01:23 PM
I'll do it but I sure won't know what I'm doing... But I've got to ask this...

http://openoffice.org is the one tool I would recommend for all LWers to realize one of Proton's most prolific statements: everyone of us has a tute in us. Why am I recommending it? FREE PDF creation!

Now that I've said all that, would someone who understands this stuff put it all in a pdf so I can, er umm... we can understand what the heck is being said? I get it and would even pull images together and post it. But I think someone who understands it would do so much better. ;)

Thanks for the info, nonetheless. I hope the coders can put this into a quick-to-render plugin.

operation
08-31-2005, 05:39 AM
HI !!

Interesting tests ....

I was thinking about a plugin structure, we may get this effect with 1 plug:

1) a shader combined to an image filter plugin

How it should work:

This shader should calculate a ZBUFFER-pass (for the shaded object with all objects included in this shaded area(camera front projection)), next FILTER THE MASK with a Z_BLUR.

I have done a pic under photoshop to explain:

There is a shaded object : the EGG in red, inside you have the letter ABC and on the background you have an other egg (black egg).

The shader will work pretty much like translucense shader but it will compute a z-buffer and blur this Zbuffer with the distance ( the blur's value can be the density of scattering).

The last parameter in the shader is to select a light ( to create a gradient in illumination close to the nulls's methode).


It's fake but it could be a good way to make faster scattering and it will work ... To confirm the technique, I did a test a test under photoshop with LW rendering.

Again: The plugin will only calculate the "inside area of SSS" ! ...


If you think that it could be a good idea, I can bring more details to explain how to develop it.

Cheers!
Operation
Mourad K.

adamsanders
08-31-2005, 06:33 PM
Like I've said in my tutorial, this all theoretically could be done in a plug-in shader.

Operation, that sounds almost exactly right, but only as long as the refraction blur is calculated with object z-buffer info as it is done in the current implementation of refraction blurring, and not as a post-processing effect as it was done a few releases ago.

Also, I'm working on the volumetric shadows, but I can't get them to stop with the front of the object. They just pass right through. I need the shadows to be truncated by the inner wall of the SSS object. Anyone have an idea?

http://www.adamsanders.net/images/tutorials/sss/images/vol_shadows.jpg

operation
09-01-2005, 02:02 AM
HI,

I agree about the post process effect ... the blur of the Zbuffer must be done inside the shader .

About stoping shadows: Impossible under LW , maybe a feature to request.
You may use a mask ( render a mask pass of your object to cut the shadows), but means compositing process.

After thinking, I will try to make a tutorial to explain to do it with a compositing tool (using RLA format), but of course a plugin will be welcome !

I like you idea about fog, we can combine both techniques:
-using Z-bufferblur + a distance fog + selfillumination

hummm .... I will do some tests, sounds interesting ..


ps: I am trying a "tricky" solution for the plugin, to make it easy to develop, a real SSS shader is impossible right now in LW (only by using personal render routine aka OGOHikari: too slow).


Cheers!
Operation
Mourad K.

gerardstrada
09-01-2005, 02:35 AM
Commonly I use the spinning trick (envelope+motionblur) in the incidence angle to achieve soft refractions:

http://www.geocities.com/cgtalklinks/candle.txt
(perhaps works for you too)

I shared this soft_refraction trick some time ago with a more complex scene:

http://www.geocities.com/cgtalklinks/Tssstest.txt

trying to show its benefits together with gradients based on the reference objects distance in color and luminosity channel / or FLA (not only to simulate the SSS effect but also to simulate the obstruction of light in a waxy suface); render times versus results, are more acceptable than to use the classic LW blurred refractions and translucency channel. Here the thread:

http://www.spinquad.com/forums/showthread.php?t=6836
(I also share this and others test scenes)

I agree with the Operation's suggestion, if all this refers to simulate the effect, isn't maybe necessary even to use refraction blurring, can maybe generate a shading and to apply it to luminosity or translucency channel (a la Chamlun). Commonly a map that is rendered quickly, mapped in one of these channels (or considered as ambient effect like FI'sLocalAmbient) is enough. In this respect, in that same thread (http://www.spinquad.com/forums/showthread.php?t=6836) I try to explain how I used FIsLocalAmbient to simulate the scattering effect of ambient illumination on a translucent object. Here the anim (http://www.geocities.com/gerardstrada/Sssf.avi)

http://www.geocities.com/cgtalklinks/Sssfs.txt

The same as you, I think that is possible to organize all these ideas/techniques and to develop a plug that automates in some way these whole procedures; however is good to be aware that a SSS shader based on techniques or tricks to generate an accurate SSS effect with simple materials (like wax) aren't commonly viable to simulate multilayered scattering (SkinShader)



Gerardo

riki
09-01-2005, 07:48 AM
That horse looks great. I must admit, my impression of SSS is that it always looks like wax. Is it possible to use SSS for effecs that don't look like wax? and I don't mean waxy looking skin.

operation
09-01-2005, 09:56 AM
hi

If you are not looking for Wax, you have too :
- not use specular ( or less shiny surface)
- not make your SSS deeper on the edge
- use a micro_bump map do catch the light
- not reflect the environnement or lights.

Your SSS could look real if you add a floor and effect such caustic ( to show that the light pass trought the object...

Voilà ...

a good link !
http://www.3ddmd.com/test_renders.htm

http://www.3ddmd.com/G2_eye_translucent.htm

it's done with G2 but good tutorials to understand how Fake SSS could work!!
Anyway, about the fog:
The fog must be a distance fog (aka Lightwave background fog), not a volumetric fog ( too much time consuming).

I was thinking of the possibility to setup a FRESNEL FOG , it sounds stupid .. but we can simulate the scattering with fresnel algorithm to gradient the fog on the edge.... what do you thing about that ?


Cheers !
Operation
Mourad K.

ThriJ
09-01-2005, 02:32 PM
Ok, I think I know a solution for the shadow problem. I’ll have to try it out tonight, but using volumetric lights slows you down which defeats the purpose of faking it in the first place. :grumpy:

Below is my test scene for Sirchced. :) I have found that you can get the same results by using a null and a pivot point for null 2 with Distance from Object if you don’t wish to use fog and expressions. The most important part of Adams process is the refraction. Interesting concepts Gerardo, and Operation I like your plugin thinking. Really we need a plugin or some new feature to do all this because this is becoming more painful to set up. All of this should work for skin but then you got even more real world properties to simulate. 8/

adamsanders
09-01-2005, 04:26 PM
I think I'm getting closer on the shadow solution, but it's getting painful.

gerardstrada
09-02-2005, 03:27 AM
I agree with ThriJ, for the candle showed above, I just use gradients and motionblurred refractions (render and setting was pretty fast). I also agree about this concepts should work for skin (I think I have relative success with cartoon skin); mainly we need to simulate the light diffusion along the surface, the absorbed light that it's dissipated inside the surface, the light that leaves the surface and the scattering reflection. I solve the first three aspects, but the last one is not easy to solve just with LW or with some free shader (although is possible with TB_Shadertree but I find it very slow). G2 is perfect for this task but it seems that due to LW translucency presents shadows errors (not blurred) with low values in falloff_distance:

http://www.geocities.com/gerardstrada/skintest1a.txt http://www.geocities.com/gerardstrada/skintest2a.txt

Adam, have you tried with sustractive gradients to fake volumetric shadows? or maybe the VBK!'s trick for volumetric clouds works for this too :)



Gerardo

ThriJ
09-02-2005, 11:54 AM
Also, I'm working on the volumetric shadows, but I can't get them to stop with the front of the object. They just pass right through. I need the shadows to be truncated by the inner wall of the SSS object. Anyone have an idea?



Ok, the best answer to the problem with volumetric shadows is to use Photoshop export. We are in the strange situation where we want volumetric lights to affect polygons but no volumetric calculations after and exporting to psd gives you access to that.







I am rendering out an animation that has the works. All the effects combined. This may take awhile. 8~ - :sleeping: - :caffeine: - 8/ --> :screwy:





Nice renders gerardstrada. :thumbsup:

As you can see with the nose and the slightly odd pale complexion of the face that we really need a 180 degree light gradient to control the effect. I love the mouth.



Got to love :lwicon:

gerardstrada
09-02-2005, 06:27 PM
...Nice renders gerardstrada. :thumbsup:

As you can see with the nose and the slightly odd pale complexion of the face that we really need a 180 degree light gradient to control the effect. I love the mouth.



Got to love :lwicon:


Thanks ThriJ! The color in that picture is provided by a HDRI, which is bright in just one side and almost totally dark in other; besides is too blue, I think. and the nose look is due to my translucency map and the problem of sharp shadows in that channel. In fact we can achieve a 180° gradient effect (and even more!) with the spinning light trick (for diffuse) or spinning null trick :D (for luminosity or translucency)



Gerardo

ThriJ
09-02-2005, 10:32 PM
Ok I got it to work. :dance: The PSD Export filter did the trick. I made two animations that have a fake SSS surface, moving objects inside the surface with volumetric shadowing. I added two animations in DivX format :

1: is the object with texturing to see how the effect would look in a realistic scene.

2: With all the bells & whistles it is hard to see the effect of inside objects moving and casting shadows so I made this second animation where that is easer to see.

The effect seems to work very well. It really starts to look good when a little blur in added to the min inside image. If I can figure out how to compress the inside image files enough I’ll submit a scene.




Spinning null trick :foreheads :D of course of course, Thanks gerardstrada. I wish I had thought to use that with my animation test.

gerardstrada
09-03-2005, 04:43 PM
ThriJ, that's brilliant man! very impressive :thumbsup: Hope you can post the scene :)
Also other way to solve it, is with a Z-buffer image sequence blurred and mapped (commonly as a Front Projection) in Luminosity or Translucency channel. This trick was devised by Splinegod some years ago (if I remember well, he used black objects and white fog). CourtJester used the same technique for his Evil Eggs:

http://www.altyna.com/portfolio/images/alieneggs2.jpg

here his anim (http://www.altyna.com/examples/eggsofevil.avi) (a top notch work, I think)

this workaround is very similar to the plugin proposed by Operation, what makes me think that many SSS effects can be solved or enhanced in post more easily



Gerardo

operation
09-03-2005, 06:11 PM
hi Gerardo,

Yes , you can fake SSS with compositing ( AfterEffect or Combustion ...).
Real SSS under LW is impossible.

You can't tweak to much because if you have a complex scene, it may become impossible to use tricks.
Hope to see a layer plugin for the Layout (aka surpass) to


I am trying to find a developer but honestly it's hard to find someone ready to spend time for the community...(maybe Antti Järvelä : if someone know him very well)... I wrote a paper with some notes, comments,tips... just in case (cross fingers).

I am doing some test with RLA format (to etablish a process with a compositing software). When I will get convincing result I will post.

gerardstrada
09-03-2005, 11:22 PM
We can use tricks in complex scenes when we have automated it (like Ekki's Plugpak and Modpak for example). That is the reason I hope some developer want to help here. Maybe you want to consider in that compositing software process the use of depth map to enhance the SSS effect:

http://www.geocities.com/gerardstrada/tbfakeskinshadertest.txt

I tried to explain the principle here (http://forums.cgsociety.org/showthread.php?t=184476&page=4) :)

mmm... you guys had noticed we want to fake the SSS effect and to find who develop a plugin? it's funny how this thread has become the opposite of its name :foreheads :D



Gerardo

operation
09-04-2005, 11:26 AM
yes it's funny :agree:

But all this "hand" process (spinning, Zbuffer, luminance, etc... ), could be done in one pass with a plug.

I have seen the other posts on Spinquad and Cgtalk about SSS. It's very interesting...
I don't like when it becomes too much tricky: it goes faster to use an other package to render the SSS pass. Trying to do a fake SSS must be easy and stay simple in step process.

the plug will save the long process of :
- making gradients
- spinning lights
- setup motion blur
- selective lights
- etc..

I am starting to be :screwy:

gerardstrada
09-04-2005, 05:52 PM
Yes, is a little tricky, mainly with a skin shader (multilayered scattering), but the procedure for common simulation of SSS effect is more simple, I think. The main obstacle seems to be the access to reference objects in gradients; as far as I know isn't possible through Scripts but I don't know if is possible through plugins. Can someone confirm it?



Gerardo

adamsanders
09-06-2005, 10:03 AM
If you all are referring to using an envelope filter on the refraction index and motion blurring it, I have tried that but the problem is that it isn't nearly as good as the newer blurred refractions because there is no refraction effect calculated between values -∞ and 1 (or -∞ and 100% in graph editor).

Plus, the LW refraction blurring is much easier to set up. *Must remember: K.I.S.S.*

ThriJ
09-06-2005, 07:49 PM
Too much setup. Plugin or feature needed :agree:


Below is an attachment that has my setup scene and the final scene. I made a few enhancements since my last post. I decreased the quality and resolution a lot for the inside images in the setup scene so it could fit. I also have a larger animation file that is 640 by 480 in mpeg4 codec and a few images loaded to my site.

Thanks for the comment gerardstrada. And I hope no one tries to eat those eggs. 8~ :chicken:



Here (http://www.geocities.com/the3dentsanimation/Crazy-Complex-Fake-SSS-Thing-sjd.avi) is a direct link to the updated higher resolution animation for you to right click and save target as.



Here (http://www.geocities.com/the3dentsanimation/animation.html) is my animation page with some images and the animation at the bottom.

gerardstrada
09-07-2005, 01:39 AM
If you all are referring to using an envelope filter on the refraction index and motion blurring it, I have tried that but the problem is that it isn't nearly as good as the newer blurred refractions because there is no refraction effect calculated between values -∞ and 1 (or -∞ and 100% in graph editor).

Plus, the LW refraction blurring is much easier to set up. *Must remember: K.I.S.S.*


mmm... Are you sure? If I understand you well, that is inexact. At least here, refraction effect is calculated with negative values or minor values than 100% without problems (I never have those problems for this kind of effect). Remember also you may reinforce the effect with a micro procedural texture.

Plus, motion blurred refraction are a lot more faster.

Of course, if we can afford render times of LW refraction blurring, go ahead; but if we can't afford that and we can invest a little time tweaking this, and then get a faster render, I prefer other tricks (mainly if animation is longer). Besides, consider mix one and other, since if 50% of the effect relapses in this trick, you can diminish your LW_refraction_blurring value and get a really better effect in less time.


ThriJ, thaks for sharing. Interesting solution too (positive & negative lights, psd export, blur...) :thumbsup:
Btw, I made a test with your scene with and without volumetrics (just LW refraction blurring) and results are more faster and quite similar when we blur images and we adjust B/C; so I think due to the nature so blurred of the effect, for faster solutions, I wouldn't discard to obviate volumetrics and just do it with a blurred depthmap (as Operation proposed), or/and with motion blurred refraction even.
Is good to have efficient options of intelligent solutions where to choose :thumbsup:



Gerardo

ThriJ
09-07-2005, 12:29 PM
Yep, like I said earlier volumetric shadows kind of defeat the purpose of faking it. In most common situations I imagine that it will not be necessary at all, but then again you may at some point have a scene where that realistic effect is everything to the shot. So far the fastest method for the basic inside SSS effect is to copy the outside object polygons and flip them and make the before flipping polys a bit transparent then just make the inside objects diffuse really low or at 0%. Like anything I suppose it is all dependent on your focal point of the shot and your need for quality vs. quantity of output.

Although this would be a lot faster and simpler if somebody made a plugin filter and shader ;) :hey: :help:







BTW I am going to keep out of the small values dispute, I have seen too many small issues like that turn... :argue: :2guns: :twak:

adamsanders
09-07-2005, 03:26 PM
There's no dispute. I'm just going to burn Gerardo's house down and kidnap his dog and rename him/her if he tries to contradict me again.

Seriously though, I will look into the neg and small values issue again. It's always good to question, and that would be a bit faster, especially if one is already using motino blur, which I always do.

adamsanders
09-07-2005, 03:29 PM
ThriJ, that's brilliant man! very impressive :thumbsup: Hope you can post the scene :)
Also other way to solve it, is with a Z-buffer image sequence blurred and mapped (commonly as a Front Projection) in Luminosity or Translucency channel. This trick was devised by Splinegod some years ago (if I remember well, he used black objects and white fog). CourtJester used the same technique for his Evil Eggs:

http://www.altyna.com/portfolio/images/alieneggs2.jpg

here his anim (http://www.altyna.com/examples/eggsofevil.avi) (a top notch work, I think)

this workaround is very similar to the plugin proposed by Operation, what makes me think that many SSS effects can be solved or enhanced in post more easily



Gerardo


Sorry to get off-topic, but that blood splattering is AWESOME!!! How was that done?

gerardstrada
09-07-2005, 07:36 PM
There's no dispute. I'm just going to burn Gerardo's house down and kidnap his dog and rename him/her if he tries to contradict me again.
:rolleyes:


Seriously though, I will look into the neg and small values issue again. It's always good to question, and that would be a bit faster, especially if one is already using motino blur, which I always do.

Sure, try it again because it may be a lot more faster :)
and there is no negative and small values issue :D



Sorry to get off-topic, but that blood splattering is AWESOME!!! How was that done?

Yeah, Jim May used an interesting technique to do that (with HVs) and Splinegod shared a variation of that technique that I found more easiest :)
Here the link:

http://forums.cgsociety.org/showthread.php?t=123479



Gerardo

Btw, I listened some speculations about new LW 9 renderer and raytrace that it would allow to implement SSS and multilayered scattering. Hope it may be certain.

BazC
09-08-2005, 12:17 AM
"Btw, I listened some speculations about new LW 9 renderer and raytrace that it would allow to implement SSS and multilayered scattering. Hope it may be certain."

That would be very cool! Newtek have obviously been doing a lot of work on the renderer and SSS is available in all the other major packages so I would think there is a strong possibility that they have implemented their own version. Out of curiosity, were the people doing the speculating "in the know" in some way? - Baz

gerardstrada
09-08-2005, 01:42 AM
mmm... I don't think so, really. Speculations weren't as high as to think of a SSS solution implemented; just the appropriate ground to be able to implement them (through 3rdparty plugins, I guess). I hoped somebody better informed could confirm it or underrate it.



Gerardo

BazC
09-08-2005, 01:53 AM
Ah! OK, well that would still be a step in the right direction! :) Thanks for the info! - Baz