main index continua (next page) ATTENZIONE: clicca qui per la traduzione in italiano!

YAY! The image in this page was submitted to the Internet RayTracing Competition (Sep-Oct 2004; theme: "Toys").

My work was classified 48 out of 96. You can read the Pinocchio comments page here. On 32 votes, I got these ratings: artistic: 10.778 (out of 20); technical: 10.926 (out of 20); concept: 12.111 (out of 20).

O sola beatitudo...
Funghetto e scarafaggetto
La censura al MessaGGiero
TaToBuilder Site Description Language
VLCC: la mia tesi di laurea
Reliquiario con teschi
Il Papa mi guarda!

This is my second decent work (the first was here) with Persistence of Vision raytracer. This was explicitly intended for a raytracing competition. I've been using Povray since ages (in fact in this image I added up one of my Povray objects dating back to 1996).

The image at the end of this page and the little zoomed images on the right of this page are a render of mathematically defined objects - cones, cylinders, spheres, quadratic/cubic/quartic functions, etc, with a few modifications (enlarging, rotating, etc) done with simple matrix multiplications. The raytracing process, for every pixel of the image, calculates the resulting light from the defined light sources (thus: shadowing, reflection, refraction, etc) and is a quite complex (and slow) process. I didn't describe every object (the below image contains a total of more than 1400 standard objects); I used a "modeler" software to design quickly group of objects and their "texturing" and light effects. On the right of this page you can see some small shots from different points of view ("camera" position).

Well, let's start describing how I created all...

Tools used: POVray 3.5 (yes, it's an old version; anyways, this won't hurt on Povray 3.6 and -maybe!- successive releases), KPovModeler 1.0 (the simplest 3D modeler around!), the LightSys IV library; I also used Gimp 2.0 for PNG->JPEG conversion. Yes, all these tools are free - no commercial packages was used!

My "render farm" consists of only two computers: a Celeron/1000 desktop PC and a notebook (see below). The notebook proved to be faster (maybe the desktop PC had too many other concurrent tasks running).

The rendering required something more than 15 hours of calculations on my 700 MHz Pentium III IBM Thinkpad notebook, running Linux 2.6 (under SuSE 9.1) with a noticeable amount of RAM - only 128Mb, with a peak memory allocation of only 4711kb (yes, under Linux you would have been able to render my image in a computer having only 8Mb RAM).

The theme of this bi-monthly competition was "Toys" and inspired me because when I was a child, I played with a wooden Pinocchio (see some at PinocchioLegno)... the "toys" theme made me think: "what would do Pinocchio when I am not at home?" :-)

All objects were created using KPovModeler (grab its source here - anyways it's now part of KDE 3D packaging): lots of CSG (constructive solid geometry), lots of superellipsoids, a number of spheresweeps. Yes, a few hours work (I'm just a bit more than a beginner) to build 90% of things seen in the image.

Then, the stunning LightSys IV library package for Povray (get its sources here) for the realistic lighting (great work, JVP!!)

The chair: a simple idea. Intersect a very stretched lathe with a compressed superellipsoid, and get a nicely curve-cut for the chair base.

The curtain: compose two sinewaves and some 3d-noise in one function, then texture them with some filtering.

The spiral staircase: another simple and repetitive object composition, plus a nice handrail built with a sweepsphere.

The desk: an object that I created with POVray in 1996 (yay!) still can come handy in a scene like this.

Pinocchio: a few simple objects; yes, I should have written it as a macro, but I had (ouch!) a hard deadline...

Lights: three big arealights plus the external (sky) light which fills some space in the corridor, coming from the window behind the curtain.

One of the walls is invisible because I wasn't willing to place the camera in the room using a wide angle to capture everything. So I made the "back" wall with no_image tag (it thus reflects but doesn't show) and move the camera behind this invisible wall up to the point where it was able to see everything.

The am_pinoc.kpm source file contains everything needed to build the image (except the LightSys library itself); using KPovModeler you can edit the scene or export it to a POV source file (which will result in a single POV file of 220+ kbytes).

The source contains 1400+ finite elements, and only one infinite object (a plane). No special features needed: no "lparsers", no "drawn textures", no "landscape generators", no bitmaps, no external files were used, except the source-includes of the LightSys library. This is surely a "cheap" scene (a few free -but good- tools)!

Since there are lots of small details (as you can see in the samples in this page), the scene has its best view in very high resolution (at least 1600×1200).

The resulting PNG output file generated by POVray was converted to JPEG format using the Gimp 2.0 (download its sources here; anyways, you'll find it in every Linux distribution); I prefer Gimp for such a simple task because you can fine-tune the final file-size by moving the quality slider while seeing the size preview.

I need to add here some notes about using "Famous 3D Modellers Software". First, the greatest limit (or the unbeatable feature) of POVray is that it's not a "modeler" but a real programming language. I explain this better in my other raytracing pages.

Some "Famous 3D Softwares" are built on pre-defined complex objects, pre-defined realistic textures, pre-defined scene modes and lighting. This is good whey you want to draft down quickly, by drag'n'click, some objects in a scene. The POVray engine comes with a little library, not always suitable for any scene. Yes, there is out of there a bunch of POVray-related stuff, but it's not always "download from the net and place in the image".

Using POVray and similar programs requires the most efficient human resources: think, think, and think again; paper planning, hand sketching, model, then try on the computer; and think, and still think how you can do better. If you examine my .kpm source, you will find a number of "adjustments" here and there, which normally you cannot do easily in some "Famous 3D Softwares" ;-)

Problems encountered and (I hope) solved:

Problems that I didn't have time to solve:

Ho creato l'immagine che si vede in fondo a questa pagina per partecipare all'edizione di settembre-ottobre 2004 dell'Internet Raytracing Competition. Il tema era "toys" (giocattoli), e l'ispirazione mi è venuta pensando al piccolo Pinocchio di legno con cui giocano tanti bambini, chiedendomi: "cosa farebbe Pinocchio quando io non sono a casa?"

Nota: quest'immagine si è classificata quarantottesima su 96; niente male, certo, ma credo di essere stato ampiamente penalizzato a causa dell'uso eccessivo di luci. La pagina di commenti (in inglese) è qui. I voti medi (in ventesimi) sono stati: artistico: 10,778; tecnico: 10,926; interpretazione/concetto: 12,111.

Ogni oggetto presente nell'immagine è costruito unendo ed intersecando diversi oggetti elementari (sfere, cilindri, coni, polinomi di terzo e quarto grado, etc); un oggetto potrebbe stato trasformato (ruotato, allargato, ristretto, spostato) e e colorato ("texture", pigmenti, riflessioni, rifrazioni, etc). Nell'immagine in fondo alla pagina sono presenti dunque oltre 1400 primitive (raggruppate in poche decine di oggetti).

Per calcolare l'immagine ho usato due fonti di luce primarie (le due luci quadrate sul soffitto generano venticinque fonti di luce ciascuna) più una non visibile nell'immagine per evitare che il trenino giocattolo sulla destra rimanesse in ombra, più una fonte più debole per il cielo (appena visibile dalla finestra).

Nessuno degli oggetti presenti sulla scena esiste nella realtà; non ho usato nessuna fotografia, nessuna immagine da scanner, nessun software di fotoritocco; l'immagine grande (e i piccoli dettagli ingranditi qui a destra, da diversi punti di vista) è esattamente quello che il programma di "ray-tracing" POVray (Persistence of Vision) produce a partire dalla definizione degli oggetti (il file "sorgente" che contiene tutti gli oggetti è di soli 21311 bytes!).

POVray, come altri programmi di "ray-tracing", calcola l'immagine a partire da ogni punto della scena per vedere quali raggi di luce "toccano" gli oggetti, seguendo ovviamente le superfici riflettenti, le rifrazioni, etc, e lasciando "ombre" laddove non arriva abbastanza luce.

Un'immagine così complessa non potevo crearla col solo POVray, che è un linguaggio di programmazione (per vedere cosa intendo, puoi cliccare su questa pagina) e quindi ho usato un software "modellatore solido" (KPovModeler) per tracciare la forma degli oggetti.

Il ricalcolo dell'intera scena con tutti gli oggetti, sorgenti di luce, antialiasing e alta qualità, ha richiesto circa quindici ore su un Pentium III a 700 MHz.

Below, the 1024×768 rendered image.

Pinocchio world