Discussion:
[Yafray-devel] Fresnel effect too dominant for IOR=1.5
l***@freenet.de
2008-01-13 09:55:51 UTC
Permalink
Hello!



First of all thanks for the great free raytracer. I started with blender/yafray a few weeks ago and am very impressed what can be done with it.
But when trying to get a realistic wine glas with yafray and caustics I got stuck reducing the fresnel effect. In the net I found a statement that it would be implicit linked to IOR. Comparing it with the blender internal raytracer and physical values (5 and 1.25, Loading Image...) it is obviously too dominant (freoff= 1.25: Loading Image...) in yafray pics even if the fresnel offset is set to the maximum of 5 (freoff= 5.00: Loading Image...).
I would like to know where the strength of the fresnel effect is set in the code of yafray or how to influence it in the xml code (I couldn't find any docs on that and changing the fresnel offset to negativ values in the xml file didn't help).

By the way: When disableing RayMirror in the Blender yafray settings the fresnel effect does not disappear. It just seems to influence the shading ad the sides of the glas.
I'm using yafray 0.9 and blender 2.45.

Any help or hints apreciated
Lynx
l***@freenet.de
2008-01-14 11:35:46 UTC
Permalink
Hi,
Post by l***@freenet.de
IOR. Comparing it with the blender internal raytracer and physical
values (5 and 1.25,
[...]
Post by l***@freenet.de
By the way: When disableing RayMirror in the Blender yafray settings
the fresnel effect does not disappear. It just seems to influence
the shading ad the sides of the glas. I'm using yafray 0.9 and
blender 2.45.
Blender internal as ref is not a good idea, bugs,
inconsistencies... more artistict than real.
https://projects.blender.org/tracker/index.php?func=detail&aid=7910&group_id=9&atid=125

Thanks GSR for Your reply.

I know about that bug but I don't think it does concern the fresnel effect. In
my test setup with the wine glas and the glas cubes the cubes look all right
but the outside of the glas bowl reflects the surrounding too much although it
is empty.
It looks like glas that was sputtered with a mettal from the outside (I did
that in my physics theses). It's too close to a normal mirror. The front scene
with the cubes is fully visible in the glas which shouldn't be for a normal
unsputtered glas.
Using the blender internal raytracer this effect can be nicly controlled by
the two fresnel parameters and those adviced realistic parameters (5 and 1.25)
yield a very realistic result. But a far smaller fresnell value is necessary
to achiev the same effect with blender internal as yafray gives with a fresnel
offset of 5.
My problem is that I can't find a way to reduce the fresnel effect further in
yafray. Negativ values for the fesnel offset in the xml file didn't change
anything so I assumed there might be a wrong scaling parameter in the
calculation of the fresnel effect in yafray code. (there is a comment about
1/2 in the yafray fresnel code)
I have put my blender file at http://www-nw.uni-regensburg.de/~.grr06742.back.physik.uni-regensburg.de/BLENDER/CAUSTI~1.BLE. I also tried yafray from svn yesterday but no improvement.
I'd be very happy to get the scene rendered in a realistic way and I'd need
yafray for it because of the great caustics it can do.

Thanks for any hints or advice
Lynx
GSR - FR
2008-01-14 20:59:02 UTC
Permalink
Hi,
Post by l***@freenet.de
Hi,
Post by l***@freenet.de
IOR. Comparing it with the blender internal raytracer and physical
values (5 and 1.25,
[...]
Post by l***@freenet.de
By the way: When disableing RayMirror in the Blender yafray settings
the fresnel effect does not disappear. It just seems to influence
the shading ad the sides of the glas. I'm using yafray 0.9 and
blender 2.45.
Blender internal as ref is not a good idea, bugs,
inconsistencies... more artistict than real.
https://projects.blender.org/tracker/index.php?func=detail&aid=7910&group_id=9&atid=125
Thanks GSR for Your reply.
It was just a private note (quickest demo I could find of "blender no
good ref"), but this one is public.
Post by l***@freenet.de
I know about that bug but I don't think it does concern the fresnel effect.
The point I was trying to comunicate is that the internal render
engine is not physically correct in general (bugs + on purpose on some
parts) so you better focus the issue from other point of view, you
will stop getting headaches wondering what is going on. ;] There are
more demos of just doubtful correctness, like arealights vs point
(smallest arealight should render something that approaches plain
point light, but it does not, does it?) or artistic optimizations
(hair shading trick that mixes surface shading with strand one).

No idea if yafray is physically correct or tries to, nor if params map
perfectly, but your best bet is looking at its code (comments? docs?)
and use allowed params until it looks OK to you or looks the same than
a photo or than "this is physical correct" renderer's result.

GSR
l***@freenet.de
2008-01-24 20:57:12 UTC
Permalink
Post by GSR - FR
Hi,
Post by l***@freenet.de
Hi,
Post by l***@freenet.de
IOR. Comparing it with the blender internal raytracer and physical
values (5 and 1.25,
[...]
Post by l***@freenet.de
By the way: When disableing RayMirror in the Blender yafray settings
the fresnel effect does not disappear. It just seems to influence
the shading ad the sides of the glas. I'm using yafray 0.9 and
blender 2.45.
Blender internal as ref is not a good idea, bugs,
inconsistencies... more artistict than real.
https://projects.blender.org/tracker/index.php?func=detail&aid=7910&group_id=9&atid=125
Thanks GSR for Your reply.
It was just a private note (quickest demo I could find of "blender no
good ref"), but this one is public.
Post by l***@freenet.de
I know about that bug but I don't think it does concern the fresnel effect.
The point I was trying to comunicate is that the internal render
engine is not physically correct in general (bugs + on purpose on some
parts) so you better focus the issue from other point of view, you
will stop getting headaches wondering what is going on. ;] There are
more demos of just doubtful correctness, like arealights vs point
(smallest arealight should render something that approaches plain
point light, but it does not, does it?) or artistic optimizations
(hair shading trick that mixes surface shading with strand one).
No idea if yafray is physically correct or tries to, nor if params map
perfectly, but your best bet is looking at its code (comments? docs?)
and use allowed params until it looks OK to you or looks the same than
a photo or than "this is physical correct" renderer's result.
After looking at the code to find a possible bug I noticed yafray is very
sensitive on the sign of the normals. Checking my blender file I noticed
that I had only turned the normals of the inner part of the bowl outside. This gave
the strange appearance of the outside that looked like an over strong fresnel
effect. Recalulating the normals of the whole gals solved the problem.
It seems bender's internal renderer seems not to be dependent of the sign of
the normals and therefor gives a realistic result both times.
Perhaps it should be pointed out in glas/reflection tutorials in what way it
matters to yafray where the normals point.

Regards,
Lynx

Loading...