Silsna: first ever texture

Hmm, it's definitely past my bedtime, but I know I wouldn't be able to sleep. I've been hacking on Silsna all day, and it's been coming on nicely since I worked out how to do the OO bits. I've just had one of those ever-so-rare moments in programming when after 4 hours of hacking without being able to test anything beyond what I started with I put the last missing piece in place, compiled it, and it worked. Voila, the first time I've managed to get any texturing working half-way sanely in Silsna:

A ray-traced scene showing some spheres and a plane.  One of the spheres has some rather flawed hexagonal procedural texturing (the hexagons are too big, with the edges not curved as they should be in 3D, and the one in the middle is seemingly black, with just a reflection of the ground showing through).

It's a hexagon pattern, one of the built-in procedural textures. The only things still to do to make it count as ‘finished’ are:

  • I need to put in a selection of 3D-to-2D mapping algorithms. The current one just throws the z coordinate away, which is why it looks a bit dodgy.
  • The colors are currently hard-coded. I've got some old code to read Gimp palette files, so I'll try to allow color lookups in those. I might also have my own XML palette format to fit in to the input language. I could then allow more interesting things, like palette entries which are not just plain colors but other textures. So I could do fancy things like checkerboards of marble and wood…

Anyway, better get some sleep. I've got to face Bricolage again tomorrow.

< My little ray tracer, and some OO programming in C | AddDefaultCharset is bad, bad, bad >

Miniblog

(nuggets of inanity)

Tuesday Apr 24th 2007, 16:54 »
Just took the annual web design survey that AListApart do. I don't realy consider myself to be a web designer, but I have been doing a lot of HTML and CSS lately.
Monday Apr 23rd 2007, 18:23 »
Strange, there appears to be a bare-knuckle boxing match going on in the field outside my flat. Wish they wouldn't make so much noise about it.
Thursday Mar 1st 2007, 18:47 »
“In its written form, Hebrew has no vowels, making it the ideal language for texting.”
—Said in jest on some Radio 4 programme just now.

Archive: 2007 · 2006 · 2005 · 2004
Feed