//cloudy night //by Tekno Frannansa cone { //note this is a very short fat cylinder but there's less characters in "cone" than "cylinder" y/2,8, y+z/2,8 //a thin slice at an angle (45 degrees, <0,1,1>) so it looks like we're looking up at a layer of clouds pigment { rgbt 1 } interior { media { //clouds //I'm surprised that I really haven't had to make any compromises to squeeze this into 256 bytes. //i.e. This is more or less exactly how I'd make media clouds in a full scene. scattering { 3, //anisotropic scattering, so much brighter when back-lit. rgb 99 //this is multiplied by density, it happened to be convenient to put it here. } density { granite color_map { //0 to .5 is empty sky [.5 gray] //less characters than rgb 0, and looks the same, I'm not sure why but it works! [1 rgb 1] } } intervals 5 //many accuracy issues, fix them by brute force because it takes less bytes than fine tuning. } } hollow } fog { rgb <3,4,6> //blueish tint, primarily to make the image look less monochrome distance 40 up-x+1 //match the orientation of the cloud layer <0,1,1> = 1-x. written -x+1 so we don't need a space after it (saving 1 byte) fog_type 2 fog_alt 1 } //light source //pinkish and quite dark, the darkness is used so we don't need a seperate absorption statement in the media, //we can instead balance absorption vs scattering using darker lighting. //one side effect of this is the moon need a brighter colour, and therefore relatively more of it's ambient colour will be visible. //To make sure that ambient colour matches with the lighting on the clouds we tint the moon a little pink. light_source { 6*z+1, .15+x/40 } //the moon sphere { //position relative to camera is in same direction as light, but further so it's illuminated by the light source. //this means we have to have a full moon, otherwise the light and moon directions wouldn't match. 12*z+2, 1 //slight pinkish tint to offset the blueish sky. //I'd rather have a blueish moon and orange sky, but couldn't fit it in 256 bytes pigment { rgb 6+x } //normal makes the craters, colour is so bright the bumps saturate out to broad areas of colour, which looks more moon-like I reckon. normal { granite -9 } }