I am trying to create a realistic water shader in blender for the past days but I am always limited by its fake (and badly faked) fresnel mirror. I tryied many things, like rendering the refraction, reflection and normals and then using the normals as a mask in after effects. I found out that the fresnel must occur INSIDE the render engine. The fresnel in the reflection must influence the intensity of the rays that refract and vice versa.
I truly can not understand how can blender fail at this. Its raytrace is quite good. Creating the fresnel, i.e., simply limiting the raytrace based on the normal seems like a really easy task considering that blender already has some kind of twisted malfunctioning normal limitation.
Well, I try to illustrate the result from vray shaders and blender shader considering only the reflection in fresnel. You see that blender creates some kind of linear mask that takes the mirror straight from 1 to 0. In vray with a 1.33 ior controlling the reflection, neither the sides is fully reflecting, nor the front is withouth mirror. The second part of the image shows both shaders with curves in photoshop to illustrate how there is still reflection in the front part of the vray shader. And none in blender
This is extremely important. Because this real fresnell does not destroys the rays, it reflects only part of them, so, if a strong ray, like the sun, is in front of the ball, we would still see it. But we would see it much weaker.
In blender you will not see it at all. And will see it too strong on the sides.
So… is there a way to do it in blender engine? If not, what sollution can I get? Has anyone of you ever solved this? Searching in the forums I see it is not a new problem, but no one seems to really care or simply give up using blender render. I KNOW blender can do this. It has raytrace, it has normal mask of the raytrace. There must be a way to change it to behave decently!
so the images labled “bright” are just copies of the first images with curves adjustments in photoshop? If that’s the case and if the images are in the same file format, then you’re right, blender just isn’t writing all of the data.
I made many,many tests. I am pretty sure the so called “fresnel” from blender reflection is no fresnel at all. As far as I searched, in dieletric materials the reflection is never 0, as in blender. It can only be very dim, but still showing very strong lights. It can, however, have zero refractance, but that would be for the whole material witch is not a problem here.
The point is that water should always reflect a little. And water is what I need to create.
By the way, both pictures were taken with print screen from the material slot. Both are 8bits rgb. You can tell by the posterization in the “bright” pictures.
Because of this issue I got to test yafaray, and it is really wonderful
But it is not completely integrated with blender. I am experiencing serious bugs to animate, for example. To be able to do such a simple thing as fresnel in blender would be ideal.
Last time I checked in the code, like 2 weeks ago, the same old Fresnel code was still there. I don’t think it is in the 2.5 plans to correct that. It would need a developer to decide on his own to take care of it. I documented the code errors and hints at fixes in the bug tracker but I can’t fix that myself because my hands are tied with my employer (and I’m not too happy with this situation right now I must say).
Ricky, I already solved it with yafaray. It is really impressive, but the ideal would be with blender.
ypoissant, I am happy that you did something about the problem, even if no one solves it. Is there something like that that I could do myself or does it takes a programmer to document a bug?
I suppose it does, since a non programmer like myself would not know if it is a bug…
ki4dfh, thank you! This is exactly what I was trying to achieve with nodes!
But there is this thing that I think is a bug as well that many times when you change the curves of something, the mix gets all messed up, with burn brightening the image or add darkening it.
I see you solved it creating a color ramp. I suppose that is because of this bug. But what about when you need a color corrected rgb picture? If you use coloramp it will turn it to black and white.
That is the second most frustrating thing I am facing with blender. This nodes bug. I spent hours trying to solve it with nodes but this bug would not let me. I thought of creating another topic to see if anyone helped me with that but I was already fed up with blender render and went with yafaray.
you have to remember that blender internal render is a compromise to get speed
and not high quality mind you there is some inporvment in 2.5
so blender render use a lot of trick to do effets to get a fast render!
but you best bet is with yafaray which offer a lot more options and power plus quality
you could also try luxrender whihc is also free for other effect too
anyway yafaray i think can get a lot more done for rendering and it’s always been tehre with blender
Blender internal render have many qualities. But speed is definitely not one of them!
It has a good subsurface, good raytrace, good occlusion and many other things, but it is the slowest non gi renderer I used.
I am not a programmer, but I am pretty sure that this fresnel bug is not there to make blender fast.
But… I am not a programmer. I can not help. Only complain.
Luxrender is in the other spcetrum. It is VERY slow, but it pays for it with amazing quality.
Yafaray is amazingly fast, amazingly good, everything amazing. I hope someday it gets integrated and, maybe, override blender internal blender to get maximum integration. Yafaray may be the best renderer I have used. And I used vray professionaly for a long time!
yafray was more integrated with blender then the new one yafaray
and for 2.5 it is less integreated more independant that’s how 2.5 works
but in 2.5 you can access other soft too
that’s how 2.5 was coneived from the start to help integrating other renderer
i like yafaray cause before i began uisng yafray a little and found it to be quit good
but it takes sometimes to render but with a high quality
you saw the example i did for spectrum of a prism
that cannot be done in blender i mean yafaray is more powerfull
and the latest version also include the IES lamps pattern
which allow to load up IES curve from manufacturer directly into yafaray
Ricky, I am hoping for this integration in 2.5… is there already yafaray for it?
ki4dfh, I know, you used it in the factor so it will controll only the blend of the 2 material. But what if you wanted what I did, to mix the normal in the material in add or burn mode? When I did this, if I used curves like you did everything would go wrong.
But it seems to happens more in the composite node. In this case it is not happening. But your sollution is truly great. You used 2 different materials. I did that too, but in the composite node. I will try to create water with that. That is genious!
Well… I was here wondering “how could I not have thought of that? I tryied so many different things!” and I guess I DID try that. But I remember reading somewhere telling that you can not use refraction in this way. And I think I did only some tests and soon forgot about it.
I changed you matnode to refractive with 0 alpha. This is the result. I remember not trying much more because I really think it is complicated for the nodes to handle this kind of thing, the refracted rays hitting a modified node surface then refracting again… I do not know, seems complicated for blender to handle and so I gave up looking for a way In composite nodes.
That is when I realised that, ignoring this node bug I mention all the time, this idea can not work in composite, since the rays must be modified during the render itself. Otherwise the result will be weird.
But even if I can not use refractive objects, now I know how to create good reflections withouth composite.
A few months ago, I was texturing, lighting and rendering scenes from the Lighting Challenge. When It came to the underwater scene, I could not get a nice refraction distortion because of some limitation with Blender IOR values. I think recalling that the IOR could not go over 2.0 and under 1.0. And because the scene was underwater, I would have needed an IOR of 0.75 to get the effect I wanted. Just to let you know in case this is an issue for you too.