Skip to content

Instantly share code, notes, and snippets.

@tomgibara
Created November 30, 2010 10:00
Show Gist options
  • Save tomgibara/721440 to your computer and use it in GitHub Desktop.
Save tomgibara/721440 to your computer and use it in GitHub Desktop.
// some standard includes
#include "colors.inc"
#include "shapes.inc"
// this is the button...
object {
// ...it's a rounded box...
Round_Box(<-1,-1,-1>, <1,1,1>, 0.4, 0)
// ...made red...
texture {
pigment { color Red }
}
// ...and a bit shiny
finish {
specular 0.5
roughness 0.02
ambient 0.4
}
}
// position the camera
camera {
right x*1 // this is the rendering aspect ratio
location <0, 0, -3> // keep camera close, our button should fully occupy the view
look_at <0, 0, 0> // look straight at the center of our button
}
// rough volumetric lighting for softer shadows
light_source {
<-4, 4, -3> color White
area_light <0, 3, 0>, <0, 0, 3>, 7, 7
}
// a second light, closer to the camera, to fill-out the scene
light_source {
<4, -4, -8> color Gray
fade_distance 4
fade_power 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment