How to set both transparent and glossy in cycles?


I have this.
And as you can imagine I want to make the covering transparent and glossy.
I have set a mix shader with glossy and trasparent connected. But I don’t obtain the result also adjusting Fac.
What have I to do to have both of them “layered” like if their Fac is both 1?


try using a fresnel fac, and disabling shadows

Try layer weight facing^5 to mix between transparent and glossy shader. Facing^5 is approximately the same as fresnel using IOR 1.45, but with no issues.

If using fresnel, you may have to invert the IOR value for backfacing faces. Maybe this is only for thin surfaces, can’t remember.

Instead of turning off shadows, you can do another mix shader with another transparent shader, controlled with light path isShadowRay. Colors < white will produce a solid color shadow, colors > white will produce a “brightening shadow” (can be used for fake caustics effects, but probably not feasible in this case). You can then modulate the color so that it will produce a nice result, and actually look like a true shadow.

The results aren’t correct but they’re better than before.
I’ve tried with both of the solutions and adjusting the values these are the best results:

I am not still obtaining the full glossy applied on the full transparency, and also I can’t avoid the “self” shadowing. I’ve disabled shadows by unchecking “Shadows” in “Light Paths” panel, in the render properties context. Maybe, have I to disable them from somewhere else?
Plus, the lollipop is meant to be a bit transparent but under this coverage it loses the transparency. The stick inside is visible if I remove the coverage.
Maybe, have I to set differently the light bounces? I had reduced them to 3 or 4 in order to make faster the render process.

It’s not so important because I’m a beginner and this is an exercise, but still I prefer to learn how to do it correctly.

A rather simple glossy/transparent mix should have done the trick, see e. g. here.
Could you upload the blend file for us to have a look at the render settings and possible modeling issues?

Here is the setup I was talking about, regarding using fresnel. Not sure what you mean by self shadowing, but I don’t think you can affect shadow creation differently for the packaged object than from the floor. In my case the packaged suzanne is white, but affected by the reddish shadow color (for illustration). Normals are pointing outwards.

Oh thanks!
But I have simply increased the value in Transparency in the render context (near Bounces) and now I can see the stick inside the lollipop.
I’ve opened your link. How to add that HDRI lightings that you was talking about?

I think that I’m not yet prepared to create your same result (or I simply copy…). By “self shadowing” I mean the shadow of the object, on the same object itself, so with 2 transparent layers, the shadow of the first onto the second.

Copying your exact setting I obtained this:

It’s better now, but I want to ask, since you’re expert… How to remove or reduce that kind of “greyness”?

In the meanwhile, I’ve to study a bit of your setting because I couldn’t imagined why to put this setting. :slight_smile:

If you put your file online we could see many things and give you all the inputs you need, instead of guessing what the problems are. For example the greyness might be caused by not pure white in transparent color, but I can just suppose this

^ What he said :slight_smile:

“why to put this setting.”
If you mean the IOR stuff it’s because fresnel is designed to work well with refraction, so outside a volume of water reflections will appear the normal way, but when viewed from within the volume you’ll get snell’s window, which is what we want. When using transparency instead for efficiency when doing non refractive stuff, we have to re-invert the IOR for backfacing faces (because fresnel has already inverted those assuming we want proper water effect). At least this is how I understand it.

To observe, create a single plane (not a cube or something with volume) then apply fresnel that control glossy color. Observe what happens as you go around on the backside. It looks completely wrong and we need to fix it, but this behaviour is actually correct when dealing with stuff like water.