{"id":35,"date":"2011-07-10T18:22:43","date_gmt":"2011-07-10T18:22:43","guid":{"rendered":"http:\/\/109.109.226.138\/blog\/?p=35"},"modified":"2019-09-18T07:59:16","modified_gmt":"2019-09-18T07:59:16","slug":"a-new-beginning","status":"publish","type":"post","link":"https:\/\/blog.daft-ideas.co.uk\/2011\/07\/10\/a-new-beginning\/","title":{"rendered":"A new beginning."},"content":{"rendered":"

When I tried to start writing posts on Raytracing, the idea was to document my steps. The problem was, that when I started,  I’d already finished the project.<\/p>\n

When I say finished the project, what I actually mean is ” I got too bored, stuck, or distracted to continue.”<\/p>\n

I hadn’t planned the code out very well, and as I added new things I had to break old things, and it turned in to a stack of kludges built on kludges. It was kludges all the way down. It may as well have been held together with gaffa tape.<\/p>\n

So I’m going to start again, and this time plan it a bit better, and I’m also switching languages. And I’ll post on my progress, because even though no one is reading this, I can still refer back to it.<\/p>\n

In memory of this occasion, here are some snapshots of what I achieved. They’re not all very good, and some of them are downright weird.<\/p>\n

\"\"<\/a>

Early code, with bad lighting and only one type of object. Orthographic camera.<\/p><\/div>\n

\"\"<\/a>

Can’t remember what the hell happened here. Early plane intersection code, I think<\/p><\/div>\n

\"\"<\/a>

A cock up, but an attractive one, as they go.<\/p><\/div>\n

\"\"<\/a>

Plane intersection code still making things difficult.<\/p><\/div>\n

\"\"<\/a>

Yeah. Not sure about this. Lighting problem? Plane seems to work though.<\/p><\/div>\n

\"\"<\/a>

Plane intersection working, with some randomisation of the “up” vector,<\/p><\/div>\n

\"\"<\/a>

Showing only the phong exponent of the scene.<\/p><\/div>\n

\"\"<\/a>

Polygon intersection test. Weird bug if two polygons lie on the same plane.<\/p><\/div>\n

\"\"<\/a>

Fixed bug. Can’t actually remember what it was.<\/p><\/div>\n

With polygon intersection tests working ( or so I thought ), I turned my attention to loading an OBJ.<\/p>\n

\"\"<\/a>

After a long struggle with weird bugs, ta-fucking-da. Also, transparency.<\/p><\/div>\n

\"\"<\/a>

Rabbit model without any normals calculated.<\/p><\/div>\n

Also, persitent shadow bugs. These eventually turned out to be the plane intersection code playing up. Again.\"No<\/a>\"Glass<\/a><\/p>\n

\"\"

Wizards!<\/p><\/div>\n

So there we have it, a long line of bugs, and some pretty pictures.<\/p>\n

The next version will have all kinds of cool optimisation! (I hope.)<\/p>\n

What I want to achieve:<\/p>\n