I want to bring up a small point about how yafaray handles the classic "liquid in a glass cup" situation, like what is described in the documentation under the glass material section:http://www.yafaray.org/documentation/us ... rial#Glass
I think there is a flaw with the setup described in the documentation, for example if you want to add absorption to the liquid inside the glass then apparently the colored liquid renders incorrectly:
I think the problem is with the normals of the interface between the glass and the liquid, absorption doesn't seem to work correctly with the normals pointing inside the liquid. But if you just invert the normals then there is another problem:
As you can see, although the absorption looks right now the change also killed the caustics. The problem is the IOR of the interface between the glass and the liquid. In the documentation the IOR of the interface is calculated as IOR_glass/IOR_liquid, but if the normals are inverted then the ratio has to be inverted too, and taking for example the liquid being water then the IOR would be 1.33/1.55 = 0.86. The yafaray exporter interface doesn't allow IOR < 1, so to test this I exported to xml in blender 2.49 and manually changed the IOR value in the xml file, and this is the result:
So with this setup the absorption effect looks correct, and caustics are back. I just don't know if there is a way to do this without editing the xml file to use IOR values < 1. If there is a way please set me straight. I did find some confirmation though that the setup I used is valid, the link below advocates it for mentalray users:http://www.kxcad.net/autodesk/3ds_max/A ... ricks.html
(scroll down a bit)
P.S. I was looking over the luxrender documentation to see how they handle this situation, and apparently lux calculates the interface IOR values internally, according to what is on this page:http://www.luxrender.net/wiki/LuxRender ... R_handling
Does anyone know how this works exactly? Do you just keep the glass mesh and the liquid mesh manifold with the appropriate IOR values, and then internally the renderer creates separate interface meshes with the correct IOR? Their documentation is a little vague in this area, but this sounds like a convenient system for users (but more work on the development end of things, which is why I didn't suggest it).