Bunny!

October 23rd, 2008 by Barrett

It had to happen sooner or later… Yes thats right, a raytraced Stanford Bunny  (Thanks to Standford for doing the 3d scan).

To be a little different my bunny is facing away from the camera :p  I’m currently getting 1fps at 800 by 800 - which isn’t too bad for just under 280 000 triangles and 2 light sources (reflections are currently turned off).  I think I can increase the speed of this by quite a bit - the current problem is my acceleration structure ran out of memory hence the artifacts. Rendering a more complex scene like this has definately shown up shortcomings in my current algorithm. I have already started work on version 2 :)

For now just a screenshot…

Stanford Bunny at 1 fps

Stanford Bunny at 1 fps

 

The nendril project took a big step forward yesterday with it becoming self aware…. just kidding! But it is now correctly firing its neurons. More updates soon.

Finally an update!

October 9th, 2008 by Barrett

What with work / projects / email / spore, updating the web site has definately taken a back seat recently. The good news is that I have answered every email I’ve been sent so if you haven’t received a reply the chances are my spam filter ate it - just resend or post a comment here if this is the case.

On the project front - have a look at this screen shot…

721 Spheres and 2 lights with 1 level of reflection at +- 14fps

721 Spheres and 2 lights with 1 level of reflection at +- 14fps

I am actually really happy with this as having 8000 objects on the screen only drops the frame rate to +-9. I can still make a lot of optimizations to it but the basic algorithm seems to be working well. Soon it will be time to switch back to triangle meshes and render something useful :) I’ve recorded a short video of it which is available here , unfortunately the screen capture application I use to generate the recording dropped the frame rate by +-6fps…  At the start of the recording I turn reflections on and you will see the (already diminished) framerate drop accordingly. Note that the camera isn’t moving - all the objects are moving.

Read the rest of this entry »

Various updates and a challenge

September 23rd, 2008 by Barrett

The last week and weekend has been really busy with guests staying at our house so unfortunately not much done in the way of coding. Still it’s always good to catch up with old friends. You know you are getting old when you realize that you have had some of your workshop tools and friends longer than not having them….

If you have sent an email in the last week and have not received a reply please be patient I do try and answer each one.

Read the rest of this entry »

COCR, markov-chains and QED*

September 16th, 2008 by Barrett

Although ray-tracing is fun :) it is not my only CUDA project at the moment. The first one I did was entitled “cocr”  - I really have to come up with a better naming convention…  It was my cuda competition entry and was a bit of a rushed job only having obtained a cuda capable graphics card a few days before the deadline.

I’ve held off posting many details of it here until judging was finished. But as there doesnt seem to be any news I think I can safely assume it didn’t place anywhere (pity as the prizes were rather yummy for a developer).  Cocr is an implementation of a very simple template matching ocr system.

Read the rest of this entry »

New Downloads

September 12th, 2008 by Barrett

Please visit the cudart downloads link to get the *hopefully* bug fixed versions of cudart for CUDA v1.1 and v2.0.   The v2.0 one also includes the viewport bug fix.

Although the previous versions worked fine on the majority of systems there were issues with any CUDA 2.0 toolkit install / new forceware drivers. Hopefully these are now sorted out.  Please make sure you extract all the files from the zips before you run the .exe’s.

Thanks again to Audun for his help on this one. Its nice to see that there are still people out there who know how to use a debugger in native mode.

Bug Fixes

September 11th, 2008 by Barrett

While working on my much talked about acceleration structure I have kept noticing artifacts and distortions as soon as it is applied to the scene. This has had me rather stumped for two days as the code / raw output seemed correct. Finally it occured to me to check my scene code and in particular my viewport code.

As it turns out my viewport code has been flawed since I converted from purely triangles to include spheres. Here is a new screenshot showing the improvement in the image quality now that its been fixed. You will also notice that you can clearly see the spiral reflected in the sphere as well as the red light that is behind the viewer (have to look closely for this one). The image is scaled down from the original size in order to save a bit of bandwith - lots of traffic from nvidia site :) 

 

After bug fix of viewport code

After bug fix of viewport code

I am yet to fix the downloadable version (downloads section) but will do so tonight.

More links working again…

September 10th, 2008 by Barrett

I seem to have broken all the “more” links on the posts by enabling the permalink feature yesterday. I’ve set it back to the way it was until I can work out why this happened. Or rather until Rich tells me what I broke :p

Apologies if you couldn’t read some posts or download yesterday.

Acceleration of ray tracers on CUDA 1.1 devices

September 10th, 2008 by Barrett

As those of you who follow the blog will know, I have been working on an acceleration mechanism for my raytracer over the past week.

As it turns out converting my large stack of A4 sheets of diagrams and equations into proper code has not been as easy as I had hoped. With about a third of it implemented I am getting no speed up what so ever on cudart. In fact I have lost about 2fps. This is largely to be expected as I am pretty much hitting the limits of what my card can do.

Read the rest of this entry »

Cudart on Nvidia’s CUDA page

September 8th, 2008 by Barrett

After noticing a bit of a spike in traffic to the webserver, I see that Nvidia added cudart to the CUDA page on their site.

Although the application is fairly small the videos are quite big so I’m hoping my allocated bandwith will be enough.

Almost inevitably there has been a reported problem with the application. Thanks to Audun who posted a comment. My development PC (AMD 4400 with windows XP) is currently running a 8800GT with 512mb and a 7800GTX with a monitor attached. All calculations are done on the 8800GT and the display is done on the 7800GTX. Initially I thought that this was the problem as most people run their displays on the same card. A quick fiddle around and monitor swapping over has ruled this out - its working perfectly.

Read the rest of this entry »

Ray Tracing Acceleration

September 5th, 2008 by Barrett

There are a number of ways to accelerate ray tracing which mostly fall into two categories: (a) Reduce the number of rays we trace. (b) decrease the number of intersection tests

Of course you can also increase the efficiency of your ray / object intersections but as that problem is largely solved and optimized it can be ignored.

For (a) a subsampling method is often used which operates on the primary rays. The problem is that it can produce artifacts especially with lots of small objects.

For (b) a variety of space partitioning methods exist which reduce the number of objects a ray is intersected with, the most popular being the kd tree.

Read the rest of this entry »