Need leaf material that shows that yellow shade in the light

Yes, but why? You can’t see through a leaf. You can see the light passing through it, but that’s already dealt with by the Translucent shader. Transparent = “can be seen through”, translucent = “light can pass through”…

Yes, that’s how the Light Path node works in this case: Make the leaf invisible for shadow rays (= it casts no shadow), but have it opaque (= not transparent) for all other ray types. Again, what is typical for a leaf is its translucency, not transparency.

That depends on the individual HDRI, but theoretically: yes - see my render.

Yes to all. The selective reflection might get tricky, though, the more complex the setup is supposed to be.

Simple example: The blue sphere is visible to shadow rays (= casts a shadow) and to reflection rays (= can be seen in the mirror), but is invisible to camera and all other rays.

Care to post the .blend file? Would make troubleshooting easier.
And no, a .jpg (= LDRI!) for the environment texture will not remotely come close to the power of a HDRI.

For example to drive the Mix shader between the Diffuse and Glossy shaders. Many reflective objects become more reflective at glancing angles - this is what the Fresnel effect is about.

Oh! I think now I understand it. I didn’t really realize the difference between transparent and translucent upto now.
Can you make something translucent without using nodes? (And you can only use nodes with cycles render, right?)

Ah, thanks for explaining the invisible ball example. Same question here: can that be done without nodes?

And no, a .jpg (= LDRI!) for the environment texture will not remotely come close to the power of a HDRI.

Okay, but for some weird reason, the HDRI-backgrounds are just a blurr with 3 uniform shapes, like they’re zoomed in really far, whereas the .jpg were actual recognizable pictures. So how do you adjust the position of the HDRI-Background, or make it invisible?

For example to drive the Mix shader between the Diffuse and Glossy shaders. Many reflective objects become more reflective at glancing angles - this is what the Fresnel effect is about.

Okay. But this doesn’t sound like an example that would fit for leaves, does it?
Well I tried it out, and here’s what I’ve got so far:

There’s some nice contrast that’s beginning to develop there. But why are the highlights more white instead of yellow?

By the way, do you understand why, in the shader I linked, it’s just the diffuse green shader for non-camera-rays, and the combination of diffuse and translucent for camera rays?

Care to post the .blend file? Would make troubleshooting easier.

The file’s 1.34 GB large. :frowning: (Man, if even such a simple file is too large, how are these attachments ever useful for .blend files?)

Okay, if Blender Render doesn’t have translucency (and it seems the option to make an object invisible isn’t there either) I guess I’m stuck with cycles. :slight_smile: But I take it cycles are pretty much better anyway. (Though all the noise is annoying. Blender render seems so much smoother.)

Thanks, now that I know how to move the HDRI around (more or less) I should be able to push it in the right direction. Yeah I’d already tried Mirror ball and equirectangular, they were both blurred. But hopefully next time I have that problem I can zoom it right.

Okay, here’s a new experiment: I added a color ramp in the hopes of getting that green-to-yellow transition. But for some weird reason it seems to be turning just about the whole tree in the direction of yellow, even though I limited the yellow portion as much as I could to the light part. Any idea why? Or is that not how color ramps work?


The color ramp drives the diffuse color - but what drives the color ramp?
In other words: How does Blender know where to apply which color within the ramp…? :wink:

Oh I see. You need the input for how bright the light is. But I can’t find that anywhere, and I’ve checked through almost all the nodes. Which one is it?

If you really want to you could use a pure yellow for the color of your translucent shader but a much better way of achieving that effect is to make use of the color grading tools in blender.

Color grading tools? What are those?
I love the pictures you posted, they look great. But I can’t see what the difference is in the settings between the two pictures (apart from the output).
Your method with the separate diffuse and translucent shaders is giving me some nice results, but is there a way to increase the contrast, and make the light parts lighter (or yellower) and the dark parts darker (or greener), sharpening the difference?

And if anyone could enlighten me on the riddle of what input goes into the color ramp, I’d still like to know. :slight_smile:

the color ramp works as a color palette… the input should be a number between 0 and 1, and the output will be the color corresponding to that input (in the ramp). The big thing about color ramps is that the Factor value should be variable. If it isn’t, than the color ramp works just like the RGB node, showing the color at the factor position.

Now, for what to plug into the color ramp is a more wide subject. It will depend from what properties you want to affect the color in the final.
For example, some materials have color variations based on the light incident angle, and in these cases you can use the fresnel/layer weight or some other Normal/IncidentLight relations.
Another example is color variation between different objects with the same material, and you can use the ObjectInfo>Random to drive that variation (the random value will be different for every object, even if they have the same material).
There are so many possibilities and uses for the color ramp, that we could write a book just with examples.

About the contrast… if you notice in the second shajuke’s image, he is using the color management to control a bit more the final look of the render… It’s located in the ‘Scene’ panel of the ‘Properties’ window.

What I want is for the leaves to be more yellow in the light, and more green in the shadow. Basically this:

That’s how it worked in Blender Render, so what’s the equivalent of that in nodes/cycles render?

I tried using Fresnel and Layer weight as inputs, but they just seem to affect only the outer rims of the object or the inner part, independent of where the light is.

This doesn’t work in Cycles, as Cycles doesn’t have an equivalent to the “Energy” input.

It doesn’t? :frowning: Well that seems like quite a missing feature. There’s nothing to make the leaves on top of the tree near the light look yellower than the ones at the bottom, or make those covered by shadow greener than those not covered?

Why does blender make you decide between those two modes, cycles and blender render, and have some features be only available in one and others only in the other, so you never get exactly what you want? -_-

The technology behind both render engines is completely different, so I’m not entirely sure something like the “Energy” input can be implemented into Cycles at all.

However, Cycles is about physical plausibility. In real life the leaves change their color based on the light and their translucency alone (and not because of some color ramp…;)). So I don’t see why this shouldn’t be possible in Cycles based on the very same principles.

It’s a bit unfortunate that we’re not able to examine your file. My render and shajuke’s as well already start to show the effect you’re after. If your tree doesn’t, there must be a reason for it.

Do you mean something like this? (807 KB)

I have an idea for circumventing the file size problem. I just removed the tree from the file, but kept the materials and lighting. If you want to have a look, use the sapling generator to add a random tree on layer 1 (Scale 60 is roughly the size that fits nicely in the picture) and give it one of the leaf materials I have there.

shajuke: The shader you made just colors the pixels according to their position, independent of where the light is, doesn’t it?

It’s not possible for a material to know where or how much light is hitting the object, you can cheat by rotating the gradient to point in the direction of your primary light source though.

Your HDRI is super low res and blurry and your sun is quite low powered. As I said: You need a more dynamic lighting setup…

This is a render with a few generic sapling trees, a sun lamp with a power of 5 and a few random planes to put the trees partly in the shadow. Shader for the leaves is the slightly modified “leaf shader from net”:

What I want is for the leaves to be more yellow in the light, and more green in the shadow

You probably could do a quick BI b/w leaves only render using Energy input and then use this as a mask for Cycles mixing however i guess i have one more cheat.
Looking at your original photo - yellow is most where light hits leaves from behind ( and further travels to camera…) so actually you could sort colors by leaf plane normal directions. Kind of works for a different seasons…

What size HDRI is common then?

Really? Cause when I set the sun to 5, (environment texture strength to 0.3) it seems far too bright:

Somehow mine is looking quite unnatural…

Where is the sun in your picture? Top left, I think?

Environment maps are supposed to span around the entire “world”, so they can actually be quite gargantuan in size. This depends of course on the intended use: If they are not seen, but just for lighting, they can be smaller. If they are also to be used as a background image, they will need to be much larger in order to stay crisp.

I’d say that for equirectangular maps 6.000 x 3.000 or 4.000 x 2.000 are pretty common, but I’ve also seen 10.000 x 5.000 pixels or even larger. Because of the high dynamic range and the color depth those maps can easily be several dozen or even hundred MB in size. Yours is 360 x 180 at 170 KB…:wink:

Yes, sun in my render is upper left hand side, size 0.1, strength 5, MIS (multiple importance sampling) checked.

The longer I look at your last render, the more I’m starting to suspect that the tree model itself might be the issue. Perhaps you have just too many leaves bunched together (maybe even overlapping?), spoiling the translucent effect. My scene with the 10 trees is not even 50 MB in size - if your single tree is 1.3 GB, perhaps you just overdid it?

How do you see how many pixels a .hdr has? I can’t open them in paint.
The HDRI came in a zip along with other files like a smaller .hdr and a thumbnail, and one .jpg that’s 8000 x 4000 pixels, so I assumed the .hdr was around that size too. Given that, would it be better if I use the .jpg after all? Also, at what strength do you put it?

Well I created the leaves via a particle system (cause I tried to make them more horizontal), so I doubt the high number of leaves increased the file size.
I’m trying around with the leaves, but I just don’t get that photorealistic effect you had. Maybe it really is just the HDRI, if my lighting is still not as complex as it should be.