// Note that since water has an ior of 1.33 and we're underwater, we see the ground both below and above us as a result of internal reflection. This *is* supposed to happen. camera { location <0,5,0> look_at 4.999999*y+z*10 //angle 120 // uncomment this to be able to see more of the edges of the water container } light_source { <.5,.5,.5>*9999 rgb 1 } sky_sphere { pigment{ gradient y color_map { [0 rgb <.5,.5,1>] [1 rgb <.2,.2,1>] } } } plane { // ground y,0 texture { pigment { rgb <.8,.7,.3> } normal { // just makes the ground more visible granite bump_size .2 scale 20 } } } // I didn't use a plane for the water container because I planned to put media inside it later on, and media sometimes looks weird when the rays get really long... #declare waterEndDist = 50; // distance from the camera that the water ends #declare sideFactor = .5; // multiplying the waterEndDist by .5 makes the sides of the box the same as the length of it #declare waterObject = // <--- basically, a box that goes mostly in front of the camera and also contains the camera. box { <-waterEndDist*sideFactor, -1, -1>, < waterEndDist*sideFactor, 10, waterEndDist> } object { // water. this contains the object defined below. waterObject texture { pigment { rgbt <1,1,1,.7> // (mostly transparent) } normal { // this normal can be commented out and the scene still has the same problems. bozo sine_wave scale 2 bump_size 1.5 } finish { specular .5 } } interior { ior 1.33 } hollow } // the following object is entirely transparent and has the same ior as the object that it is inside. However, it causes weird things to happen. For instance, the internal // reflection from the containing object that hits this object appears black, when it should just pass right on through. Also, the containing object doesn't cast a shadow // in the places where the light passes through this object (you need to uncomment the angle statement in the camera to see this shadow problem). // COMMENT OUT THIS OBJECT TO SEE THE SCENE WORK CORRECTLY difference { object { waterObject } plane { z, 20 } // cut off part of it that's closer to the camera translate <0,-.000001,-.000001> // avoid coincident surfaces, except for the ones on the sides, // because i don't really care about how the sides look for the purposes of this scene //translate <0,-2,-2> // this doesn't work much better, and it translates the object too much to be helpful with removing coincident surfaces. pigment { rgbf 1 // rgbt 1 doesn't work either } interior { ior 1.33 } hollow }