Eyes glass texture creates a black shadow

Hallo. Im creating a portrait and have been following this tutorial for the eyes. https://www.youtube.com/watch?v=b8UH_WU23Io&list=PLyelx0TsmSpeQE2LpgM8Qwnco-9mrNG0O&index=7
The eyes are two layers. Inner and outer. It is the first time i use nodes and render cycles, and my inner eye seems to have worked but the glass layer ontop creates a black shadow. When i render the eyes apart, the outer eyes is transparant but when i put them ontop of each other the outer layer becomes black. As far as i can see the nodes are ok.

Hersw a image of my render then you can see the black eyes.

And here is my [blend file](http://<a href=http://www.filedropper.com/questioncorrectblackeyes><img src=http://www.filedropper.com/download_button.png width=127 height=145 border=0/></a><br /><div style=font-size:9px;font-family:Arial, Helvetica, sans-serif;width:127px;font-color:#44a854;> <a href=http://www.filedropper.com >File Hosting Online Storage Backup</a></div>)

I can’t seem to get the blend file, but this is usually down to the number of samples. Increasing the samples for transparency and/or transmission (I can never remember which) should make it clear again.

Thank u for quick answer. can u explain this to me better. Where do i find these settings.

first note: when sharing blend files here in BA, please try to take out all non important objects/images etc from the blend file, just keeping the relevant things that show the problem…

second: The problem is quite common to new cycles users…
When light goes through a refractive material, it is bended and it will not follow a straight path. It will (in real world) produce what is called caustics.

In Cycles, the algorithm to make the render will follow the oposite direction of the ‘photons’, throwing a ray starting from the camera, checking if the hit point is under direct illumination (the shadow ray), and then throw other rays to get the indirect light.
The big problem with this method, is that the shadow ray will just test the light in a straight line, where through the refraction material, we already know the light is coming from another direction. And there isn’t a good way, from the point being shaded to find exactly which direction to test (and hence, fireflies).

Of course, with lots and lots of samples, the result should end up correct. But normally, we don’t have the time to let a render take 1/2 year just for perfection, and in most of the cases the refracted light just changes a little bit from the direct light (just like the light that comes through a window). That’s why most artists just fake the caustics with a simple transparent shader. This way, the shadow ray will find the light, because in between there’s only ‘transparency’!

Now, your file: you have caustics disabled, which will turn refractive objects opaque to light for secondary rays. This makes your inner eyes completly in the dark!

In this case, you don’t really need any caustics! The distance from the outer surface to the inner surface is so small that light will not bend enough to being noticed. So telling the glass material to become transparent for every shadow ray, will let the light getting into the inner surface, as if the outer surface wasn’t there, thought you still can see it from the camera.

Hallo Secrop

Thank you for your effort to explain. I have turned refractive castics on in path of light. Played around with the settings, and this helped slightly. If i understand you rightly i have to scale or the inside or outside eyes to allow for more room between the layers. But i tried this and it did not help. Please take note that im new to textures and rendering.

How do i do this ?

o telling the glass material to become transparent for every shadow ray, will let the light getting into the inner surface, as if the outer surface wasn’t there, thought you still can see it from the camera.


just mix your glass shader with a transparent shader (the glass on the top shader input, the transparent on the bottom);
add a LightPath node and connect the IsShadowRay output to the factor of the mix shader, and the final output into your surface slot.

if the ray the ray that’s hitting your glass object is a shadow ray, the output of the light path will be 1. this value will set the output of the mixer to show only the bottom shader, and the shadow ray will only see a transparent. any other rays will set the output of the isShadowRay to zero, so they will only see the glass shader. :wink:

if you do a quick search here in BA you’ll find lots of similar problems and more special solutions to them.

Hallo i came up with this, ita a picture of the nodes.

only a small error, the output of the Mix shader should be plugged into the ‘Surface’ slot, not the ‘volume’. Everything else is correct. :slight_smile: