View Full Version : Fish Tank Refractions
09-12-2007, 10:44 PM
I've been experimenting with getting a realistic looking fish tank for a show i'm working on.
I'll explain my current setup followed by a few questions.
The First image is without the fish tank. This is just for reference.
The second is with the fish tank. Note that it only encompasses the grey cubes. The Tank is just simply a cube that has been extruded outward w\ beveled edges. The normals are pointing outward on the outside and inward on the inside. I'm using the MIA material w\ the 'thick glass' preset (IOR of 1.5).
The third is with the fish tank And water. The water is a beveled cube that's a hair smaller than the inner walls of the tank (they aren't touching). The normals are pointing outward. I'm using the same MIA material w\ the 'thick glass' preset but with an IOR of 1.3.
One thing i'm observing that I don't quite understand is that it's acting too much like a magnifying glass. I'm guessing this type of effect would happen to some degree, but once the water surface is added in it just seems excessive. The environment (the hdri bg) seems especially magnified. Is this physically correct? I've been looking at images of fish tanks and aquariums via google image search and it seems like a full frontal view of a fish tank shouldn't reveal so much magnification.
For something like a fish tank, which has maybe half an inch of thickness, should I be using the 'thin_walled' option or is this just intended for things that are almost paper thin. When I turn it on the magnification level looks a little bit more natural, but i'm not sure if this is 'correct' either. The Guide mentions not using 'thin walled' if you're working with a 'solid glass block', but does a glass block that has half inch walls( my tank) qualify as a solid?
My tank is probably going to remain un-tinted, but if I were to make my water a slightly blue-ish color to emphasize the fact that it's water, would I be adding color to the refraction color or the refraction falloff color? I've been trying to use the refraction falloff as explained in the MIA guide, but I've yet to see any effect on my image ( not pictured). It mentions its use for 'colored solid glass', but does water fall into the same category? Either way.. when does its effects become apparent?
That's all for now..
Area Light + HDRI
09-12-2007, 10:58 PM
Is there a reason you are using the mia over the dielectric? Not to say one is better than the other, but I really like the results of the dielectric for stuff like this.
09-13-2007, 12:07 AM
I didn't even think to try it. I thought the MIA material made the dialectric obsolete. I'll give it a go..
09-13-2007, 04:51 AM
Yah. Dielectric is really the best for this (or even better l_glass).
But when you use dielectric, take care: you need three dielectric materials:
1: air-tank: ior: 1,5; ior-out: 1,0
2: tank-water: ior: 1,33; ior-out: 1,5
3: air-water: ior: 1,33; ior-out: 1,0
And that's the most important thing: Don't create an additional cube for the water.
Only setup the tank and then just split your inner faces of the tank up to the water level. (as seen on the following image)
And apply the materials: blue = air-tank-material, red = tank-water-material, green = air-water-material. It might be neccessarry to reverse the surface normals.
If you create an inner cube, your results will be wrong. Instead just add another plane (with beveled edges) where the water level is (the green face).
There is no air between the tank and the water, so creating a water cube would be physically incorrect.
I'm not very good in explaining such things, but I hope you understand :D
09-13-2007, 06:00 AM
So I tried both the dialectric material and L_glass with much better results, but this is before I saw your post:
Hellstorm, so are you saying that an inside wall for the tank should not exist as these faces would make up the outer wall of the water? I remember coming across a tutorial explicitly saying that there should be a small amount of space between the container and the liquid or there would be rendering artifacts. When I look at your diagram i see 3 cubes with no thickness whatsoever ( 6 faces each). If I simplify my geometry ( remove the bevels), I would have a tank with 12 faces, A water-tank surface with 6 faces, and a water-air surface with 6 faces. Is that wrong?
09-14-2007, 05:49 AM
Lets assume the water height is about 75% of the total tank height.
So just create your tank and then use the Insert Edge Loop tool to split the inner faces at water heigt.
The outer side and the upper faces of the inner side get the air-glass-material.
the lower inner faces get the glass-water-material. now create a polygon at the edges you created (split) last. This is the upper side of your water.
When you work with dielectric, dont think of cubes/faces etc as solid objects. Consider the faces as a border between two differently dense medias. If we speak about the water-glass-border, there is no small place for air, there is glass and then... water. So using two meshes to simulate such a thing is wrong.
The dielectric shader is designed for such things. Thats why there are two IOR fields.
09-14-2007, 05:49 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.