Water, and yes, I've searched the forums

Hi, I’m looking for the simple answer to this question.

I want to create a simple scene with a glass of water using Yafray to ray trace. I have read that the normals of the materials must point out of the object, which seems sensible as this allows the software to know where the volume of the object is. Since i want water in the glass, it seems sensible to create a mesh with two material since in the glass the sides of the glass create the boundary with the water. The normals cannot point ‘out’ of the two materials at the same time, so is there a better way to do this?

Did any of what i ranted about make sense? If it did please help me.

Thank you.

Mmmm…not sure I understand the question, but let me see if I can help.

I understand that its best for the glass and the fluid inside to be two different objects, and that the fluid object’s mesh be shrunk enough to not overlap with the glass object’s mesh.

Personally, didn’t know about the normals facing outside thing. So, single, not double faces? Can you give me the reference for that, please? Maybe that’s the problem with my wineglasses!

Thanks, and hope I helped a little.

You need to create a “fluid” mesh that has its normals also pointed outwards, sitting inside the glass.

Basically you can just copy the inside vertex’s of the glass, skin the top(make it a solid mesh, instead of an open top), and re-adjust normals so they are pointing outwards from the fluid’s center.

Also scaleing in SLIGHTLY will help avoid any errors due to vertex’s overlapping and such.

Finally, you can extrude the top faces(the top of the liquid) slightly down in a curve shape to mimic the mincus(sp) that fluid has when in a glass(basically around the edge ring of the liquid it “pulls” itself up higher due to surface tension such that the center of the liquid is lower than the edges, it provides a disctinct specularity around the edges and is integral into getting realistic liquids)

So what you want is 2 mesh’s each with their own material. One glass with normals pointing outwards, and 1 solid “liquid” mesh with normals outward and a different material.

Thanks for replying. I thought that i may nee to scale down and duplicate to produce the new water in the glasss, but it is an interesting question when creating something quite simple and logical. I wonder whether this is something that the developer’s need to look into. Thanks anyway, I’ll post anything i find that is relevant.

one more little note: as far as normals go, you should have the normals on the inside of the glass pointing inside, and the ones on the outside of the glass pointing outside. you should also turn on an index of refraction(IOR) of about 1.5 for both the water and the glass if you’re planning to ray-trace.