Ever wondered how to get conductive Fresnel inside of Cinema 4D? Ever wondered what conductive Fresnel is after all? Look no further – we’ve got you covered.
Fresnel – that formula that drives the behaviour of reflections in Plastic, Glass, Paint – heck anything glossy. It was discovered by a french guy called Augustin Jean Fresnel and basically says “a given substance will reflect more light at a higher angle of incidence” or: “Use Fresnel’s formula to make things reflect more around the edges” (grossly oversimplifying here…).
Funny thing about Fresnel: There is actually more than one way to calculate that amount of reflected light. And the two main cases are for conductive (this will conduct electricity) and dielectric (this won’t conduct electricity) materials. The case we all know is the dielectric Fresnel. It’s awesome when modeling plastic, glass, porcellain or even shiny wood. But what about trying to set up copper, aluminum or gold with a fresnel shader?
It simply isn’t possible with the built in tools in Cinema 4D (at least not when relying purely on the tools that you’ll find in the material system). Even worse there also isn’t any conductive Fresnel in Octane. Xpresso and python to the help. What Octane allows you to do is to take a Falloff node, set it’s index to 1.0 (thus it becomes a linear falloff) and drive a gradient with this Falloff. What you have to “just” do now is set up your gradient so it drives the Falloff’s values according to the Fresnel formula.
Thankfully I didn’t have to come up with the algorithm to generate that gradient ramp. All I had to do was port it to Python & Xpresso. And here it is – I also included some presets. If you wanna dive into the code: It lives inside that Xpresso tag and inside those two python nodes. The first one is just there to take care of the preset values. The second node is where the actual calculation of the gradient happens.
If you’d like to look up complex Fresnel values, head over to refractiveindex.info. The values you wanna keep an eye out for are these:
n,k for these Wavelenghts:
Download .c4d project file – Version with added gamma slider. Default gamma is 2.2
This is what you see when opening the project. Look out for the null with that Xpresso tag.
On the top you’ve got some preset Values to chose from.
If you like to fiddle around with the conductive Fresnel – tick this checkbox and go wild with the n&k values.
Tick the last checkbox to get a standard (boring) dielectric Fresnel.
This part is there purely for the preset values.
Tthe ability to use real world wavelengths is neat, and this is useful in Octane. However, since R16 you’ve been able to do conductive fresnels using reflectance. You have to rely on the presets, and it only works with the built-in renderer, but it’s there.
You can also use a falloff shader inside a filter shader, then match the RGB curves to those found on refractiveindex.info, which is not very accurate but will at least get you there.
So it’s certainly to do conductive fresnel with built-in tools 😉
This looks like a great tool, thanks for sharing! Can this be translated to Arnold using the Facing Ratio?
Follow that link and read through his application of the same workflow in MtoA. I think the same knowledge can transferred over to C4DToA.
Thanks for sharing these. Terrific work!
Thanks! Can this be translated to Corona or Standart Render C4D?
You can definitely do this in C4D by default- just add any non-legacy layer to the Reflectance channel and scroll down to “Layer Fresnel” and it’s all in there. Still a very helpful tutorial though thank you!
Cool! But I am not 100% sure if you could use Reflectance Channels in Octane Shaders. Any thoughts on that? Thx for the hint!
I just want to add I have done a plugin for getting curve info instead of gradient. Moreover it’s Free and open source !
Download link => https://www.graphos.xyz/files/Plugin/EasyRefractiveIndex/RefractiveIndex-Importer.zip
github page => https://github.com/gr4ph0s/RefractiveIndex-Importer/
And a demo here => https://www.youtube.com/watch?v=EC-w-En-GYU
This is so interesting and useful blog about custom conductive dielectric fresnel. This is really a informative blog for all peoples who wants to know about this. Thanks for sharing with us.