POV-Ray Buttons and Logos
Eric Bainville - Mar 2007In this page I present some experiments on the creation of 3D buttons/logos using POV-Ray, the Persistence Of Vision Raytracer. POV-Ray is a wonderful tool to generate automatically 3D realistic buttons. All Cabri 3D tool icons were generated using POV-Ray, providing an uniform and mathematically exact set of icons.
![](geo/button-6.png)
POV-Ray setup
We will focus on the creation of a square icon. The first thing to do is setup a camera, global settings, and resolution file. The rendered area will be the [-1,+1]×[-1,+1] XY square, with the Z axis pointing towards the viewer.
You will neeed to add the following block in the quickres.ini file (within POV-Ray, select menu Tools:Edit resolution INI file. Selecting it will generate a square PNG file with transparency enabled.
[128x128, No AA] Width=128 Height=128 Antialias=Off Output_File_Type=N Output_Alpha=On
Create a new button.pov file, containing the following:
#include "colors.inc" #include "metals.inc" #include "textures.inc" global_settings { assumed_gamma 1 ambient_light White } camera { orthographic location <0,0,1000> right 2*x up 2*y direction -z } box { <-1,-1,0>,<1,0,1> pigment { color Red } } box { <-0.2,-0.2,0.5>,<0.8,0.8,3> pigment { color Yellow } }
Select the [128x128, No AA] render options, then Run. The result should be this image. Colors are a little ugly because there is no lighting yet, what we see is the result of the default ambient light settings.
![](geo/button-1.png)
In the next section (Shapes) we will add some light, and define a few button shapes.
Intel64 Multiprecision | Top of Page | POV-Ray Buttons/Logos : Shapes |