Wednesday, 13 August 2008

Archive Section

You will notice a new page link on the right today - "archives".  This is going to be a collection of things from the old site along with some old code / graphics etc taken from my old archives which I recently discovered. It covers stuff like assembler, openGL, directX, casinos, video, neural networks, completion ports etc - hopefully some of it is still useful to someone.  Archives

Tuesday, 12 August 2008

Lighting and texturing

It's been a hectic few days, what with house guests and trying to keep Buttercup (my Landy) running. Actually she features in most of the example image processing pictures, but I digress.  With limited time only had a chance to fix the coordinate systems in cudart - the y axis was inverted right from the first version which hasn't really been a problem until the surface normals weren't in the usual direction causing a bit of a debugging headache. 

[caption id="attachment_117" align="aligncenter" width="400" caption="Colours and reflections"]Colours and reflections[/caption]

Thursday, 7 August 2008

Finding a point on a ray closest to a point

This sounds like a rather trivial calculation, but rather than actually thinking about I just reached for a linear algrebra book - no luck....  Then for a calculus book ... still no luck, although I had some fun with the Taylor series.

A quick google search later and I had a few results, most were closest point on two rays and not exactly what I wanted. Some others failed, or deliberately chose not to, note that a ray is defined as r = P0 + td where (and here's the important bit) t is element of R AND t>=0 .  Which would fail to account for the closest point being at a -t value. (invalid)

Tuesday, 5 August 2008

image rotation

As I am yet to post any meaningful code I thought I'd start with a cuda image rotation tutorial.

To keep things simple we are going to use the standard sin/cos (or matrix) rotation method and not the sheer method.

Monday, 4 August 2008

cudart

Here are some more screenshots of cudart after some changes to lighting code and some other minor changes to the intersection code (It now produces u,v values so texturing will be coming soon)

Notice the artifacts along the front edge of the prism (mostly visible in the second image) which seem to be caused by the self intersection tests and my epsilon value possibly being too high.

[gallery]

Canny Edge Detection

As part of my entry to the CUDA challenge I implemented a Gaussian Point Spread function and a Sobel filter.

I'm not sure how my project went - badly I suppose - as I had only obtained a 8800 GT device a week before deadline :( I'll post the full project here once judging has finished. Actually I will probably keep working on improving it as I beleive there is a lot of scope for a fully implemented version.

Friday, 1 August 2008

Compiler optimizations

I've noticed when comparing assembly outputs, that despite advances in compiler optimizations,  they still dont optimize dependencies correctly.  Register dependencies can really stall the multi stage pipelining so it is well worth hand optimizing these in speed critical sections. (a certain ray tracer springs to mind :p )