Monday, 1 September 2008

Work in progress


The answer to the previous question was: "it does work". I don't know how the framework I'm working on exactly works, but it does strange things with depth buffer.

It seems I'm at a good point. Shadow mapping consists in three steps (two, if the video cards supports the GL_ARB_shadow_ambient extension):
  1. depth buffer acquisition from light's point of view
  2. a "dim light" rendering from camera's point of view
  3. full light rendering w/ shadow map depths comparison
Screenshots prove that everything seems to works correctly.

New question is: why doesn't the shadow map show up..? ^^"
Damn!

Wednesday, 20 August 2008

Uncomfortable

Summer and CG don't meet: my warfare computer resists a couple of minutes and then hangs up.

I'm working on my trusty notebook now, but the SiS graphics card is resulting a major pain in the ass:
  • warning: OpenGL VBOs not supported
  • warning: OpenGL shading language not supported
God! Any facility that should help me out to work on shadow mapping is not present on this machine. It's like programming in late 90s. By the way, it could tactical for me: willing or not I'm forced to develop an engine whose performances could be tweaked later, by using advanced functionalities.

There's, anyway, a couple (of thousands) of opened issues to fix before "popping champagne". For instance, why the hell reading depth buffer with glReadPixels() and putting it into the frame buffer (as luminance) using glDrawPixels() does not work? I'm surely missing something... but what?!

Wednesday, 23 July 2008

Cambio di layout...

...per festeggiare l'archiviazione di algoritmi complementi!

E dalla gioia mi son pure arruolato nelle fila dei fans di Dijkstra su Facebook. Evvai!

Tuesday, 22 July 2008

And the winner is: shadow mapping

Shadows projection can be tricky. I knew it before beginnig my stage at CNR, and had only confirmations so far: there's a lot of complications you've got to consider before developing. The greatest limit remains, of course, the cost of computations.

My first choice and proposal were shadow volumes a là Carmack: definitively intriguing and kind of ideal trait d'union of my universitary life: they were perfect.

Analyzing the technology, it turned out that they were not. The software module I'm asked to develop will be placed in high-polygon contexts; shadow volumes require a lot of time for each object: time to place the supplementary geometries in the pipeline, time to compute the silhouettes (checking every triangle of the mesh!!), time to extrude the cones that will be depth-checked to fill the stencil buffers. Many polygons kill performances; many polygons and many lights means killing real time rendering.

So, after a brief talk with chief, we took the decision to simulate shadows by shadow mapping: not so accurate like shadow volumes, but really faster! In addition, they have less issues, like volumes bounding and silhouette recognition.

I'm gonna try to develop them both using and not using shaders, because of accuracy and scalability.

My module is supposed to be arbitrarily activated, and selective shadowing must be guaranteed. Again, both things are easier to be achieved with shadow mapping:
  • I don't have to do any invasive manipulation to the existing geometry loader classes (because of additional squares for shadow volumes), so one could turn off shadows just by not calling my procedures;
  • when I render "from the light view", I can just don't place objects in the scene if I don't want them to project a shadow. Again, this could be obtained without in-depth modifications of existing routines and placing my functions in a strategic way.

Everything's nice and exciting... I hope I'll be able to do it! ^^

Friday, 4 July 2008

Un bel respiro..

Thunderbird; 1 mail non letta:

«Si comunica che per lo stage "Progettazione e realizzazione di un modulo software in OpenGL per la proiezione di ombre in tempo reale", proposto dal Consiglio Nazionale delle Ricerche - Istituto di Tecnologie Industriali ed Automazione, sei stato selezionato come stagista.

Il CNR resta in attesa dell'approvazione e dell'avvio del relativo progetto formativo da parte della Commissione Stage; si suggerisce allo stagista di contattare la segreteria stage del proprio Corso di Laurea per l'assegnazione del tutor universitario.»

Che dire..
Paura? un po'.
Eccitazione? parecchia.
Voglia? massima.

Audentes fortuna iuvat, è il motto della Bicocca.
Il tempo dirà se è vero.