PDA

View Full Version : Gradient curve node in incidence: wrong behaviour

S0nny
01-08-2016, 03:04 AM
So, I don't know why I didn't noticed before but, I was trying to do some custom fresnel curves with the gradient -> curve node, and to me it does behave in a way that doesn't make sense.
As you can see the output is clearly wrong, like the opposit or the inverse of what should be.

131822

Doesn't the 'position' or x-axis, should correspond to the angle of incidence, like, from 0° to 90°?
And doesn't the 'value' or y-axis should correspond to the 'amount of'?
I mean, someting like this looks like pretty straightforward, but it's not.
The manual says "Incidence - where the output is interpolated based on the gradient using the angle between the current hit point and the camera’s viewing direction as the input", probably is my knowledge of english, but I don't understand.

pinkmouse
01-08-2016, 04:25 AM
Does look strange. Have you reported it?

S0nny
01-08-2016, 04:31 AM
Nope, I don't know if it's suppose to work like this...

edit: I mean, building a different curve with inverse values should work, but the point of this is like mimic as simple and fast as possible what I see in http://refractiveindex.info/

pinkmouse
01-08-2016, 04:33 AM
I'd report it anyway and see what they say. It's certainly counter-intuitive, so the documentation at least needs a look at.

S0nny
01-08-2016, 04:41 AM
Sounds right. Anyway maybe someone with lw 11.x or pre-2015 can try, just out of curiosity?

RebelHill
01-08-2016, 04:52 AM
You're right about the axes, just wrong about the values. The X is the input (in this case incidence) and the Y the output... however incidence 0 is the glancing angle and incidence 1 the front angle, so flip your curve across X.

Danner
01-08-2016, 05:56 AM
If you look at a regular gradient with incidence it works the same way except the 1 is at the bottom and 0 at the top (reverse of a curve node) so that might be where it gets confusing.

S0nny
01-08-2016, 06:16 AM
Thanks RebelHIll, thanks Dannes, it make sense like this. Clearly X is not the angle as I was thinking, so of course 0 = no incidence (90°) and 1 is max incidence (0°).
I still think that degrees on the X is better and more easy to translate (like the way falloff works in 3dsmax i.e.) expecially when taking data from refractiveindex.info or other places, but custom fresnel curves are not like my everyday stuff, so fair enough.

01-08-2016, 01:44 PM
I use DP Curve Filter for this (same axis than fresnel plots). You might want to try also DP Curve Function.

Gerardo

S0nny
01-09-2016, 04:57 AM
I use DP Curve Filter for this (same axis than fresnel plots). You might want to try also DP Curve Function.

I got how to draw the curve, but I guess something is missing (or totally wrong) with the tipe of connection I'm doing:

131832

how do I tell nodes the curve represents the value based on angle of incidence?

also, I was thinking, it looks like is possible to build custom curves for single R,G,B values to get fresnel + colored reflection, but as above, how to connect in the right way?

lertola2
01-09-2016, 03:24 PM
I got how to draw the curve, but I guess something is missing (or totally wrong) with the tipe of connection I'm doing:

131832

how do I tell nodes the curve represents the value based on angle of incidence?

also, I was thinking, it looks like is possible to build custom curves for single R,G,B values to get fresnel + colored reflection, but as above, how to connect in the right way?

You can set the curve to incidence angel at the top of the editor. See the screen shot. I am not sure how you would do colored reflections.

131837

Edit: Sorry I just noticed you are using the DP curve filter not the Lightwave curve node. I don't know how to use that.

01-09-2016, 05:25 PM
I got how to draw the curve, but I guess something is missing (or totally wrong) with the tipe of connection I'm doing:

how do I tell nodes the curve represents the value based on angle of incidence?

also, I was thinking, it looks like is possible to build custom curves for single R,G,B values to get fresnel + colored reflection, but as above, how to connect in the right way?
Yes, both things are possible. Use DP Curve Function with a Wrap function node to modify an incidence angle gradient. The Gradient node must to be set up as linear smoothing interpolation, and plug that into the reflection channel. For colorizing the reflection, filter a Reflections shader through a DP Curve Filter node. Both setups look like this:

http://forums.newtek.com/attachment.php?attachmentid=131839&d=1452385126

I used a similar setup to mimic cooper-like reflections. DP Curve Function can be used also to re-model any given Specular shader:

http://s3.postimg.org/cf1v1g743/phong_test.jpg

Gerardo

p.d. for keeping unclipped highlights reflections, Post Behavior should be set up as 'Linear' in DP Curve Filter.

S0nny
01-11-2016, 03:16 AM
I used a similar setup to mimic cooper-like reflections. DP Curve Function can be used also to re-model any given Specular shader:

This is very good, usually I mix different shaders with different glossines to get a much better transition from highlights to blurry, but it seems possible with just one, like the GGX shader in vray.

Thanks Gerardo, always precious.