Originally posted by Yannick
View Post
Announcement
Collapse
No announcement yet.
"Everything has fresnel!"
Collapse
X
-
-
-
I am wondering how you would match the curve using the ramp node in Maya? It's a bit tricky to visualize the gray scale ramp color as a curve.....As least if we can have a curve with inserting control points to manually adjust the curve to match the calculated fresnel curve of a general wavelength....always curious...
Comment
-
I'd imagine you just plot the curve's percentage reflection to a value between black and white at various steps along the way. It'd be brilliant to have some kind of spreadsheet data with say a value every 10 degrees of the facing ratio with a value of 0 - 100% reflectivity so you could make a simple curve - not as accurate as a full curve but still maybe better than what we've gone with before?
Comment
-
Here's an idea of what your curves would look like if you were doing rgb bits:
It seems that metals not only have really weird curves based on the angle you're viewing from, they also have different strengths of reflection for different parts of the spectrum of light which is what gives gold it's yellowy reflections and so on! all from http://en.wikipedia.org/wiki/Reflectivity by the way.
Comment
-
Originally posted by jasonhuang1115 View PostI am wondering how you would match the curve using the ramp node in Maya? It's a bit tricky to visualize the gray scale ramp color as a curve.....As least if we can have a curve with inserting control points to manually adjust the curve to match the calculated fresnel curve of a general wavelength....
To understand how you can do this, here a curve, and here a ramp :
Comment
-
Originally posted by jasonhuang1115 View PostI am wondering how you would match the curve using the ramp node in Maya? It's a bit tricky to visualize the gray scale ramp color as a curve.....As least if we can have a curve with inserting control points to manually adjust the curve to match the calculated fresnel curve of a general wavelength....Dmitry Vinnik
Silhouette Images Inc.
ShowReel:
https://www.youtube.com/watch?v=qxSJlvSwAhA
https://www.linkedin.com/in/dmitry-v...-identity-name
Comment
-
if you wish to control the value, you can use remap value, its a single channel. If you want to control color you can use remap hsv, since it accepts outcolor but has a value ramp, so you can affect the overall luminance of the texture.Dmitry Vinnik
Silhouette Images Inc.
ShowReel:
https://www.youtube.com/watch?v=qxSJlvSwAhA
https://www.linkedin.com/in/dmitry-v...-identity-name
Comment
-
Just to speed up the process and to learn some mel, I wrote this simple script that creates and connects all necessary nodes (a facing ratio connected to a black/white ramp connected to a valueRemap).
Btw, does someone know of a site with more of these ior-curves?
string $fresnelSamplerInfo = `shadingNode -asUtility samplerInfo -name "fresnelSamplerInfo"`;
string $fresnelRamp = `shadingNode -asTexture ramp -name "fresnelRamp"`;
autoUpdateAttrEd;
setAttr ($fresnelRamp + ".colorEntryList[2].color") -type double3 0 0 0 ;
autoUpdateAttrEd;
setAttr ($fresnelRamp + ".colorEntryList[0].color") -type double3 1 1 1 ;
autoUpdateAttrEd;
removeMultiInstance -b true ( $fresnelRamp + ".colorEntryList[1]" );
string $fresnelRemapValue = `shadingNode -asUtility remapValue -name "fresnelRemapValue"`;
connectAttr -f ($fresnelSamplerInfo + ".facingRatio") ($fresnelRamp + ".vCoord");
connectAttr -f ($fresnelRamp + ".outColorR") ($fresnelRemapValue + ".inputValue");Last edited by Ekenryd; 27-08-2012, 07:11 AM.
Comment
-
Thanks for sharing the script, Ekenryd. I did a quick test and it seems to me that I have to put a reverse node between the remap node and the Vray material's fresnel IOR so that the curve in the remap will control the fresnel reflection like the curves joconnell posted earlier (i.e. the closer the control point to value of 1 the more reflective it is). Also, it will be great if we can figure out a way to control this on a per R, G, B channel basis. Maybe through the Remap Color node?always curious...
Comment
-
Hm, not sure what you mean with the reverse node, it works like expected here. From left to right you get 0 to 90 degree refl, and from down to up,0 to 1, you get 0% to 100% refl.
Here is a modified script which create a remap color node instead of remap value, plug it into the refl color.
Code:string $fresnelSamplerInfo = `shadingNode -asUtility samplerInfo -name "fresnelSamplerInfo"`; string $fresnelRamp = `shadingNode -asTexture ramp -name "fresnelRamp"`; autoUpdateAttrEd; setAttr ($fresnelRamp + ".colorEntryList[2].color") -type double3 0 0 0 ; autoUpdateAttrEd; setAttr ($fresnelRamp + ".colorEntryList[0].color") -type double3 1 1 1 ; autoUpdateAttrEd; removeMultiInstance -b true ( $fresnelRamp + ".colorEntryList[1]" ); string $fresnelRemapColor = `shadingNode -asUtility remapColor -name "fresnelRemapColor"`; connectAttr -f ($fresnelSamplerInfo + ".facingRatio") ($fresnelRamp + ".vCoord"); connectAttr -f ($fresnelRamp + ".outColorR") ($fresnelRemapColor + ".color.colorR"); connectAttr -f ($fresnelRamp + ".outColorG") ($fresnelRemapColor + ".color.colorG"); connectAttr -f ($fresnelRamp + ".outColorB") ($fresnelRemapColor + ".color.colorB");
Also, a tech question: Should I gamma correct this color remap node for linear workflow if I plug it into refl color? Wont that make the curve look different and hence the reflections wont be like the curve? On the other hand I've heard that you should always gamma correct colored reflections.Last edited by Ekenryd; 28-08-2012, 06:06 AM.
Comment
Comment