-What?For every ray that hits a surface, Cycles executes shader graph of the surface material hit point. The ray length output will correspond with the ray indicated in the other outputs (is xxxx ray). So in short, it is the length of the ray being shaded.

-For what?For example to create glass absorption/filtering based on the distance traveled by the transmission ray. Currently in Cycles with glass BSDF shader when you select the glass color, you are actually setting the way and the amount of the light is filtered by the glass, if you select bright green it means the tiny Impurity particles in the glass are more likely to reflect the green color and absorb/transmit the red and blue colors, the more darker the color the more light it is absorbed, the more bright the color the more light is transmitted (escapes) from the object:

As you can see in the above picture, the absorbed light Rays gets lost inside the material, and the reflected/transmitted rays can escape, the more reflected/transmitted rays the more transparent is the material, the more absorbed Rays the more darker is the surface.

What was missing in Cycles was the ability to reproduce the absorption based on the distance that light rays travel inside the surface, as you may guess the final absorption effect will be based on the density of those tiny impurity particles and how wide is the object.

Now, the ray distance output actually gives you the distance of the light traveled, thus you can create a cool node setup to recreate, for example the absorption of the glass based on how wide the object it is:Cycles tests:

As you can see, the more thick the objects parts, the more light is transmitted and not absorbed.

This is the node setup using the ray length output, what it does is with the first two math nodes convert the distance to a simpler exponential fallof/attenuation magnitude (the output distance is in blender units, so the exponential fallof maps it between 0 and 1 in an exponential way). then we add this value to the is ray camera, why? because we want to exclude this filtering effect from the camera ray so when Is Cam Ray is 1 it choose the white color, showing to the camera ray a clear glass, this is important because we only want to apply this attenuation only for the transmission and the other rays (again, except the camera)

The Backfacing parameter from Geometry node will tell not take into account the transmission rays that are outside of the object, so it doesn't get attenuated by the shader( this problem was discover by the BlenderArtist niabot, thanks! )

...But If you don't have time to understand that node setup, no problem! lets bundle them in a simple node group which you can consider an upgrade of the current glass BSDF:

Absorption parameter goes from 0 to -inf ( minus infinity ) the more negative the number the more absorption.

...But this doesn't stop here, now because you can know how far ray light traveled, you can create/fake many other materials, for example to recreate a pseudo sub-surface scattering effect using the length of the translucent ray:

This is an proximate ice material, if you watch closely you can see we are not even computing a single scattering event here, but with making the translucent shader taking into account the distance of the transmission rays, we can make more translucent the thicker parts and more opaque the wider parts of the objects.

The cool thing about this very fake sss and translucent deep based material it is very fast shader setup to render and may be okay for several renders you want to do.

More test renders: (Click for enlarge)

.blend file used for these test renders: .Blend file (Fixed and updated)

Windows builds (I don't compile with Cuda but i'll try soon):Win x64Win x32UPDATE: This patch(functionality) was committed to trunk! so you can go to graphicall.org or blender build bot to get a version supporting this feature.Make sure it is at least the revision rev 46200

This is an awesome little feature, well done and congrats to get your first patch included THIS quickly.

On a sidenote, there seems to be a bug with your blog for showing images.If I click on an image to enlarge it, the site will jump to the top of the page and the images will end up being shown behind the header. Furthermore, they aren't enlarged at all. Some even get shown smaller than they are when directly included into the page.

Hi @kram1032, i think it is how blogger works, as far as i know i can control the layout/color content, but i am not sure if i can control when you exit the image viewing mode where to jump or do that at all, also the images are actually small, only the wider gets shrink in the post, so those are the only worth to zoom.cheers,

Hi. First off, thanks for this great patch. It's definitely a step in the right direction.

Now, as for the demonstration, while it works as expected at object sizes in the demo, it doesn't work well for very small object in real-life scale, such as a glass of wine.

Suzane scaled to 0.05 needs 2718 (1,000x) to 27180 (10,000x) in the power node in order to work. Now I have objects that are 5cm across in 1:1 scale, so this node gorup has no noticeable effect even when multiplying the power base by 1 million. Do you have any suggestions on how to deal with super-small objects (other than scaling them up, obviously).

In addition to my last comment, I've done some further testing, and the appearance is OK with 1,000,000x2.718 in power node, but only if normals are facing outwards. That is not the case in liquid-inside-glass-container scenario, where I also have flipped normals (or negative IOR). How can I adjust this node group for that scenario?

WAPEXP the best internet marketing company providing all solutions regarding web designing, development and search engine optimization with maximum of the quality of the work and time management and cost effective solutions for your business. All these quality services may take your business to another height on internet.

I am really enjoying reading your well written articles. I think you spend numerous effort and time updating your blog. I have bookmarked it and I am taking a look ahead to reading new articles. Please keep up the good articles!credit card online

Easton Bell Electrical are your Melbourne based electricians, and it is our priority thatwe provide you with a friendly and courteous service while being professional and well presented. We pride ourselves on being on time and discussing with you what work suits you best. And best of all, We Clean Up!Caulfield Electrician

Students have magic in their hands as their hardwork pays them in shape of the best outcomes of their sculptures which they design and give them their inner thoughts through which they can talk tot he world and can tell the world the solution of assignment writer what wrong is happening in our society.

It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command

Selenium is one of the most popular automated testing tool used to automate various types of applications. Selenium is a package of several testing tools designed in a way for to support and encourage automation testing of functional aspects of web-based applications and a wide range of browsers and platforms and for the same reason, it is referred to as a Suite. Selenium Interview Questions and Answers

Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.industrial safety course in chennai

Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.

Selenium is one of the most popular automated testing tool used to automate various types of applications. Selenium is a package of several testing tools designed in a way for to support and encourage automation testing of functional aspects of web-based applications and a wide range of browsers and platforms and for the same reason, it is referred to as a Suite.

If you need any kind of help regarding your assignment, please contact us. We will provide premium quality assignment at cheaper price with free plagiarism report and unlimited revision. Place order for 3 assignments and get your 4th assignment done for no cost. So hurry up, grab the offer now and score excellent grades in your exams. Our key features are given below-

A universal message I suppose, not giving up is the formula for success I think. Some things take longer than others to accomplish, so people must understand that they should have their eyes on the goal, and that should keep them motivated to see it out til the end. online Python trainingpython training in chennai

This is really a good informative post with good information. I additionally truly enjoyed your cycles island you did for a short time back. I have adapted such a great amount by taking a gander at the .blend record you shared. keep sharing..

Goyal packers and movers in Panchkula is highly known for their professional and genuine packing and moving services. We are top leading and certified relocation services providers in Chandigarh deals all over India. To get more information, call us.

This is such a good post. One of the best posts that I\'ve read in my whole life. I am so happy that you chose this day to give me this. Please, continue to give me such valuable posts. Cheers!Java training in Chennai

Hi,It's a good article and a lot of users can get helpful information through your blog. Actually, I have an article related to Garmin, I hope you like it. First one is Garmin Map Updates and a second one is Garmin Nuvi Updates.Thank You!

Goyal packers and movers in Panchkula is highly known for their professional and genuine packing and moving services. We are top leading and certified relocation services providers in Chandigarh deals all over India. To get more information, call us.