Falloff Map base on IOR value.

Forums: Falloff Map base on IOR value.
Generic forum to discuss Octane Render, post ideas and suggest improvements.
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB

Falloff Map base on IOR value.

Postby fantome » Thu Mar 22, 2018 11:49 am

fantome Thu Mar 22, 2018 11:49 am
Hi guys,

I haven't suceed to get a proper falloff fresnel map base on IOR in octane.
That would be nice to add an additional mode inside the fallof map node base on IOR value like this :
https://docs.chaosgroup.com/display/VRA ... RayFresnel

Basically you enter Medium A IOR and Medium B IOR and it give you an accurate falloff gradient.
That would be even more cool if we could activate a mode with Complex IOR with n and k value.

Cheers
E
User avatar
fantome
Licensed Customer
Licensed Customer
 
Posts: 266
Joined: Wed Dec 16, 2015 3:38 pm

Re: Falloff Map base on IOR value.

Postby nuno1980 » Thu Mar 22, 2018 12:07 pm

nuno1980 Thu Mar 22, 2018 12:07 pm
Download free new Octane Render v4 (but experimental) for new metallic material (complex ior). :)
NOTE: I'm sorry for bad english due to mute ;)

i7-12700KF
2x16GB RAM@DDR4-3600
MSI PRO Z690-A DDR4
Zotac GF RTX 4090 NEW! <3 :mrgreen:
SSDs OCZ RD400 0.5TB and Crucial 2TB SATA3
HDD 1TB SATA2
LG BD-RE BH16NS40
PSU 1kW
CRT 21" Sony E530 :D
nuno1980
Licensed Customer
Licensed Customer
 
Posts: 728
Joined: Sat Dec 18, 2010 10:04 pm

Re: Falloff Map base on IOR value.

Postby Despot » Thu Mar 22, 2018 1:38 pm

Despot Thu Mar 22, 2018 1:38 pm
This is in 3.08 RC1 & 2 if 'm not mistaken... no need for 4
User avatar
Despot
Licensed Customer
Licensed Customer
 
Posts: 125
Joined: Tue Jan 10, 2017 3:19 pm

Re: Falloff Map base on IOR value.

Postby paride4331 » Thu Mar 22, 2018 1:43 pm

paride4331 Thu Mar 22, 2018 1:43 pm
fantome wrote:Hi guys,

I haven't suceed to get a proper falloff fresnel map base on IOR in octane.
That would be nice to add an additional mode inside the fallof map node base on IOR value like this :
https://docs.chaosgroup.com/display/VRA ... RayFresnel

Basically you enter Medium A IOR and Medium B IOR and it give you an accurate falloff gradient.
That would be even more cool if we could activate a mode with Complex IOR with n and k value.

Cheers
E


Hi fantome,
I do not know what is your needs, new Octane metallic shader 3.08 SDK has complex IOR option.
https://render.otoy.com/forum/viewtopic.php?f=27&t=65730
Alternatively you can create different IOR materials using mix material with falloff amount.
Regards
Paride
2 x Evga Titan X Hybrid / 3 x Evga RTX 2070 super Hybrid
User avatar
paride4331
Octane Guru
Octane Guru
 
Posts: 3689
Joined: Fri Sep 18, 2015 7:19 am

Re: Falloff Map base on IOR value.

Postby fantome » Thu Mar 22, 2018 2:00 pm

fantome Thu Mar 22, 2018 2:00 pm
Thanks for your answer guys !

Yes n and k value are already here in 3.08 in the metal material ! :)
What i need would just a be an utility nodes to generates a fresnel texture.

Actually only fallof map with the skew distort controller look to offer this.
But the skew distort is very unintuitive for me.

So that would be great to add in this node 2 other mode to generate the fresnel.
- the first one base on IOR value like i explain previously.
- the second base on the normalized disney PBR shader specular controller.
https://disney-animation.s3.amazonaws.c ... tes_v2.pdf

The idea would be to use this gradient as a mix value for the mix material node.
You can watch the substance PBR shader in liveDB to see an exemple of the idea.

For exemple if i want to do an anisotropic velvet. i would like to use a diffuse material to get the roughness in the diffuse, and a glossy material for ward anisotropic.
Today i need to make a mix at 50% to keep energy conservation.

But if i do so the color i have set in the diffuse will be fade away at angle 0. because i reduce it by 50%.
What i would prefer is to get
- diffuse mat at 100%
- glossy mat at 100%
- compute the fresnel map base on IOR value or disney value.
- multiply it by each bsdf to get energy conservation
in that scenario my diffuse color at angle 0 will be exactly like i have choosen in the shader color, i don't have to balance the reduction of intensity cause by the mix at 0.5.

Cheers
E
User avatar
fantome
Licensed Customer
Licensed Customer
 
Posts: 266
Joined: Wed Dec 16, 2015 3:38 pm

Re: Falloff Map base on IOR value.

Postby milanm » Fri Mar 23, 2018 9:06 am

milanm Fri Mar 23, 2018 9:06 am
Ah, I knew I saw that somwhere. Here's the OSL code that comes with C4DOctane. Not sure where it comes from but it looks exactly like what you're describing.

I hope that helps. At least as a starting point.

Code: Select all
float fresnel(float n, float k, float c) {
    float k2=k*k;
    float rs_num = n*n + k2 - 2*n*c + c*c;
    float rs_den = n*n + k2 + 2*n*c + c*c;
    float rs = rs_num/ rs_den ;
     
    float rp_num = (n*n + k2)*c*c - 2*n*c + 1;
    float rp_den = (n*n + k2)*c*c + 2*n*c + 1;
    float rp = rp_num/ rp_den ;
     
    return clamp(0.5*( rs+rp ), 0.0, 1.0);
}
     
shader complex_ior(
    vector n=vector(0.27105, 0.67693, 1.3164) [[ string description = "Refractive index for red, green, blue wavelengths (f.e. for 0.65, 0.55, 0.45 micrometers)" ]],
    vector k=vector(3.6092, 2.6247, 2.2921) [[ string description = "Extinction coefficient for red, green, blue wavelengths (f.e. for 0.65, 0.55, 0.45 micrometers)" ]],
    output color Col_Out = color(0.5)
)
{
    float thetaCos = abs(dot(-I,N));
    float red=fresnel(n[0], k[0], thetaCos);
    float green=fresnel(n[1], k[1], thetaCos);
    float blue=fresnel(n[2], k[2], thetaCos);
    Col_Out=color(red, green, blue);
}


Regards
Milan
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
milanm
Licensed Customer
Licensed Customer
 
Posts: 261
Joined: Tue Apr 30, 2013 7:23 pm

Re: Falloff Map base on IOR value.

Postby fantome » Fri Mar 23, 2018 9:46 am

fantome Fri Mar 23, 2018 9:46 am
Thanks a lot for the very informative answer Milanm !

I have not though about this , but that might be a great solution to use osl texture to do that.
i am using octane inside houdini. and i am not 100% sure that OSL texture is supported yet.
But that's definitly a good lead.

I will make some trial in octane standalone when i will have some time to play with osl.

I think we could also use OSL to implement the disney model IOR, which might be even easier, as i think it is probably a remap shlick fresnel.
Cheers
E
User avatar
fantome
Licensed Customer
Licensed Customer
 
Posts: 266
Joined: Wed Dec 16, 2015 3:38 pm

Return to General Discussion


Who is online

Users browsing this forum: Bing [Bot] and 26 guests

Thu Apr 25, 2024 5:41 am [ UTC ]