MistyLaraCarrara opened this issue on Mar 12, 2014 · 100 posts
aRtBee posted Thu, 20 March 2014 at 9:32 AM
BB's math, shader and things tested: confirmed, correct and work as expected. But as they include reflection, fresnel, and desired refraction as well, the question still was; is there a simple way to take out from transparency the part which is also dealt with in refraction.
Just a null shader which lets pass direct light for shadowing according to transparency.
That's just about reducing BB's input till its ultimate simplicity, and here it is.
Scene: no IDL, one infinite light, raytraced shadows. Red cube for object, large bar for mat testing.
Upper left: bar is 90% transparent
Upper right: bar is 90% transparent and includes the refract portion taken out. That leaves a 100% opaque black diffuse surface for it. Now one can start adding reflections, refractions and anything to that.
Lower left: frontal look, the red cube was there and it taken out. Some artefacts remain (whiteish stripes).
Lower right: the shader. You can pick Ambient for entry as well. You can pick any transparency you like, but the corresponding correction value (now in Refraction_Value) should equal -T/(1-T).
So T=0.9 will need -0.9/(1 -0.9) = -9.0 for correction, as shown.
And T=0.5 (more shadow) will need -0.5/(1- 0.5) = -1.0 for correction
And T=0.999 will need -0.999/(1- 0.999) = -999.0 for correction.
Pick any transparency you want, including an ange dependant fresnel-like as in BB's proposal, make sure the proper values land at the right PoserSurface slots, and you're there.
Now you can build any node-tree on top of that. Note that both Diffuse and Alternate_Diffuse are filtered by transparency (anything else is not), and that transparency = 1 means transparent, but when a node is connected is serves as just a multiplier, and BLACK (=0) means transparent.
About the artefacts: these are reduced somewhat with higher settings for render quality, and they reduce even more when the bar is rotated towards the camera. At 0 angle the artefacts are gone except for the lining around the cube.
Usually, the artefacts will be hardly visible when the bar is dressed up with reflections, refraction, fresnels and whatever.
So we can have refractive objects that let direct light shine through it as well, and deliver the softened shadows which come with that. It;s not perfect, the direct light itself is not refracted etcetera, no way to do caustics of volume effects or anything else that on can expect when raytracing, but at least we've made a serious step in the right direction.
Let's Render
- - - - -
Usually I'm wrong. But to be effective and efficient, I don't need to be correct or accurate.
visit www.aRtBeeWeb.nl (works) or Missing Manuals (tutorials & reviews) - both need an update though