The best kittens, technology, and video games blog in the world.

Showing posts with label graphics. Show all posts
Showing posts with label graphics. Show all posts

Tuesday, August 29, 2006

Slides for my masters thesis

Ronaldinho by katia. from flickr (CC-BY)The thesis is: RenderMan Compiler for the RPU Ray Tracing Architecture.

Here are the slides in PDF and SXI format.

Now in the process I discovered how cool OpenOffice.org Impress was. Before making the slides I only vaguely remembered how totally lame was PowerPoint - especially its math typography looking like it was done by a 4 year old kid, and I considered writing HTML+CSS for Opera the best way of making slides. Now what changed my mind was that Opera doesn't seem to be able to export the slides to any other format (like PDF), and the slides look horrible in any other browsers. Why isn't Firefox compatible here ? It's using almost only official CSS. Well, I'll rant about how Firefox sucks sometime later :-)

So OpenOffice.org Impress is somewhat less lame than PowerPoint. The good thing is that making nice Web 2.0-looking (with gradients) flowcharts is actually easier than with Opera. The huge bad thing is that there are no predefined templates, and the ones I could find online were rather weak - like not having special title slide format, and using a moral equivalent of Comics Sans for slide numbers.

Oh yeah, end of the rant. Just look at the slides and enjoy :-)

Sunday, July 23, 2006

Code generator works

Code generator for the Renderman shading language compiler I'm writing for a masters thesis works. The world is one (small) step closer to raytracing graphic cards ;-). So now it can go all the way through, from source code to abstract syntax tree to assembly to pretty picture. So it can compile this thing:

color silly(point P; point Eye; color near_color; color far_color)
{
   vector ray = P-Eye;
   float ray_dist = sqrt(ray.ray);
   if(ray_dist < 0)
       ray_dist = 0;
   if(ray_dist > 1)
       ray_dist = 1;

   color c = near_color + (far_color-near_color) * ray_dist;

   return c;
}
To this assembly:
    add R1.xyz, R0.xyz, -R1.xyz
   dp3 R2.w, R1.xyz, R1.xyz
   mov_rsq R15.w, R2.w
   mov_rcp R15.w, S.w
   add R15, 0.0, -S.w + jmp 4 xyzw (>0)
   mov R3.w, S.w
8:
   add R15, R3.w, -1.0 + jmp 7 xyzw (>0)
9:
   add R3.xyz, R3.xyz, -R2.xyz
   mul R3.xyz, R3.xyz, R3.w
   add R0.xyz, R2.xyz, R3.xyz
   return
7:
   mov R3.w, 1.0
   jmp 9
4:
   mov R3.w, 0.0
   jmp 8
For now it only supports functions which pretend to be shaders, not "real" surface shaders. And more about our cool hardware here.