8
$\begingroup$

While trying to recreate my windows in Blender, I came up with the problem of making the window shades. They are made of some kind of fabric, such that the Sun will shine trough. I notices, that the amount of light that comes trough depends on the angle between the surface normal and the light source (in this case the sun). For example, in this photograph, see the left side of the inner frame:

Photograph of Window

Now, I tried to recreate it in Blender. I tried various material nodes and the best I could come up with was a combination of Translucent, Transparent and Diffuse BSDF, mixed together in some proportion.

Shader

This lets the sunlight through, however, it ignores the zig-zag pattern of the window shade. The same amount shines through, no matter how the surface is oriented. This is, what I get rendered in Cycles.

Rendering

Now, is there a shader or a node setup that works like the Transparent BSDF, but respects the surface normals, such that the amount of light is dependent of the orientation of the surface relative to the sun? Basically: How do I get the "shadow" correctly?

Here is a picture for Illustration :)

How it should be

$\endgroup$
6
$\begingroup$

You can get good results by adjusting the Fresnel Value.
It specifies at which angle the surface becomes transparent for incoming light.

enter image description here

$\endgroup$
8
  • 1
    $\begingroup$ Thanks for the answer and the animation! But did you notice the shadow is the wrong way? The parts that should be dark are light. For example see the eighths stripe from the top. It is almost perpendicular to the sun ray and should pass the most light. But when you count the eighths stripe in the shadow its darker than its surroundings. $\endgroup$
    – iblue
    Oct 29 '20 at 10:39
  • $\begingroup$ I knew something wasn't right, thanks! Inverting the fresnel value solved it :). $\endgroup$ Oct 29 '20 at 10:58
  • 1
    $\begingroup$ I still get some weird issues under certain angles with the Fresnel node. I now tried to feed in the Normal Vector from a Geometry Node into a Vector Math Node set to Dot Product with the Sun Position (calculated manually), then a Math Node where I subtract the result from 1. That looks realistic, until I change the position of the Sun. Is there a way to get the vector of the incoming light ray as a Node? $\endgroup$
    – iblue
    Oct 29 '20 at 12:03
  • 1
    $\begingroup$ In the first version, there was a IOR < 1 which generated some artifacts. But with IOR > 1 and inverting, it seems to work quite well. I'm marking this as accepted. Thanks very much! :) $\endgroup$
    – iblue
    Oct 29 '20 at 14:41
  • 1
    $\begingroup$ Glad you made it work. Keep the fun questions coming :). Cheers. $\endgroup$ Oct 29 '20 at 14:44
3
$\begingroup$

Here is what I came up with myself. Just for future reference or until I get a better solution.

I just calculate the transparency using the Sun's position (Taking it as a vector and normalizing it to length 1) and the surface normal vector in a dot product (this gives me the Cosine of the angle) and then inverting it.

To get it mathematically correct, I would have to calculate $1 - \cos(\phi)^2$ and then use the absolute value, but this is sufficient.

Shaders

This gives me the following result:

Render

However, I am still not satisfied, because I have to calculate the position of the sun manually, so it's cheating and it stops working when using a HDR map for the environment.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.