Archive for the ‘Tong Raytracer’ Category

Path Tracing; IBL

Friday, October 13th, 2006

After seeing a colleagues path tracer I decided last night to have a crack at it myself. Unfortunately I’ve (deliberately*) lost my copy of Max, so I couldn’t set up any decent shots with all the effects that I would like. Expect images of effects such as caustics later, but in the meantime here’s path tracing with IBL:

Click to view larger version
Click for larger version (720×576)

The JPEG compression has mucked about with that image a bit, annoyingly. More coming as soon as I find my copy of Max and also when stuff finishes rendering. Path tracing is soooooo sloooooooow.

* I hate Max. I never expected to ever need to use it again.

First Class

Saturday, July 22nd, 2006

I got my results yesterday! I’m very, very happy. I got a First class with Honours, but also I got one hundred percent in my raytracing module. Holy. Crap. I’ll have to update my C.V. and also write my personal statement for Bournemouth today.

The toolbox has grown a bit. It’s now able to do HTTP content serving: screenshots and videos are here. The video’s quite big so I apologise for that.

Fear my elite After Effects “mad-skills”.

Connections (Including Trains)

Tuesday, July 11th, 2006

I really ought to start naming my posts sensibly.

Anyway, I had a mooch around Bournemouth last Thursday. It was really, really good, and the beach was awesome. One problem is that the campus is quite far away, and the on-campus accomodation (”Student Village”!) would make me feel a little isolated. Lose/Lose on that one. But oh well! I could cycle to Uni…

I’ve just sent three reference forms to lecturers and I’m still stuck on my personal statement, but I’ll get round to formally applying later next week after I get my results*. I also met a guy called Gerard, a tall Irish chap who currently works at a visual effects studio already (though I probably shouldn’t say which one) but is still going to do Masters there anyway. Also, I met Ian Stephenson who wrote this book. He seems like a decent guy and it will be interesting to be taught by him next year (assuming I get the place). Teesside is still obviously a prime candidate for my application, but at the moment I’m still on a high from Bournemouth’s lovely scenery and friendly image, which Teesside certainly lacks.

I really hope this Masters thing pulls through. I’ve already declined a few interviews and even jobs at some games companies because of this. I think I must be insane. I’m also afraid that I’m burning social bridges, which I certainly don’t want to do. After all, I will need a job after this course!

* Results are due on the 19th! That’s Wednesday next week… Eek…

Anyway, enough of that. On to some actual programming:

So far my toolbox is coming along nicely. I have some interesting stuff going. All this is is a collection of disjointed utilities that I use in nearly every project. Currently this includes:

  • Debugging stuff (Overloaded assert(), logging, etc.)
  • Maths (Vectors, matrices, bounding volumes, oct-trees, rays, etc.)
  • Meta-format (This basically allows me to write data about data, or data about anything for that matter. Streams to and from binary or text quite happily. Probably the most awesome part of the toolbox.)
  • Directory functions (Such as recursion, creation and deletion.)
  • CRC generation (of anything.)
  • File streaming (binary and text from GZ compressed files, Zipfiles and normal files.)
  • SO loading (.dll for Windows, .so for Linux and .dylib for MacOS. This this also awesome.)
  • Text stream parsing, tokenising and lexing system. (Funky stuff. Makes complex text file reading a doddle.)
  • Model format stuff. (Meshes, vertex buffers, index buffers, face formats, etc.)

It runs on Windows, Linux and Mac so far. Also, I have a virtual file system which transparently reads from disk or zip entries. Also it automatically adjusts for 64-bit paths (I have a system32 and system64 directory for different binaries. This system adjusts the /system/ to the relevant path.)

Getting there. Can anyone suggest any other features they find they use a lot in their projects?

Daedalus (Tong Rebourne)

Tuesday, June 20th, 2006

The title of this post serves as a good introduction as to my next endeavour: I’m planning to restructure Tong into a more flexible system to aid me during my Masters course. More on the latter in a minute. I’ve got myself a little render farm in the basement of my current residence. There are a few computers that aren’t in the shot to the right of those. This house is crazy: not only are there five computers in the basement, but four more upstairs. <3

The new system will be called Daedalus. I was thinking of Tong 2.0, but that was boring. Then, seeing that I'm probably going to go to Bournemouth University in September (fingers crossed) I decided on the Tong Rebourne title. Daedalus sums it up nicely, though, as he is the Greek god that is claimed to have invented images. The name Daedalus also features in Deus Ex, so it also holds to my naming convention. I’m aware that thousands of other projects probably exist with the same name which is why I’ve tagged (Tong Rebourne) on the end of it. No prizes as to why Rebourne is written like that.

An update on the persuit of a Masters degree: Currently Bournemouth is the most likely candidate. As much as I would love to return to Teesside, the chances of that happening are infintesimally small. The course is unlikely to run and even if it did it doesn’t stand up to Bournemouth’s. Bournemouth seems to have a formidable reputation, where-as Teesside is still catching up. Teesside is still heard of and respected, so it’s still a worthy runner-up. In order to fund my Masters I’ll be grabbing a Career Development Loan (CDL) from good ol’ “We-Love-Bin-Laden” Barclays. All of this was causing me a headache about 2 weeks ago, but now I’ve resigned myself to the fact that I have no idea what’s going on. One thing that is still annoying me is the waiting. Before I apply to any I’m going to wait and see what my results are from my degree: the thought actually makes me slightly sick. I have to wait nearly a whole month… (

Balance

Sunday, February 26th, 2006

I have now finally stopped working on my raytracer. Oh, it’s not finished, but I need to work on other projects for a while. To prevent me from working on it I have put it on a USB pen and given it to my girlfriend. She’s ginger so I can rely on her stubbornness.

However, I still have the binaries so I can leave scenes rendering while I work, like this one, which took 7 hours. You’ll notice the soft shadowing which is a new feature which I haven’t fully optimised yet, which explains the extraordinary render times. Know that this will be fixed before I deem the project finished: I have more important things to kill my processor with! You’ll also notice the diffuse interreflection between the plane and the pot which is an example of photon mapping. I made the pot bright green to exaggerate this feature.

My next scene will be a much more complex interior scene which will take ages to render, so it’s important that I get blood out of a stone when it comes to my soft shadowing algorithm. At the moment I think it’s the way that I’m stochastically sampling each emissive plane, which relies on rejection sampling to generate a non-biased sample but my implementation might be slightly buggy. I will have to try out Pix at some point and see where most of my bottlenecks are. Blood out of a stone.

Before I gave away the code, I was also working on a Windows version, which will allow me to specify areas to re-render and also apply filters as a post-process. It’s basic at the moment, but it will grow as I go along. I’m trying not to spend too much time on it as the rendering is the most important part.

I have been doing quite a bit of my Final Year Project, which is making me happy. I have yet to do my A.I. and physics projects yet, but they’re taking a back seat for the moment. The problem with my FYP so far is that I have little to show in terms of actual product (which is something my supervisor keeps reiterating), but I am concentrating on analysis and design for the moment. This is generally what happens with me: I do lots of work yet seem to not produce anything, but then suddenly it all clicks together and it’s done. This isn’t deliberate: it just seems to happen.

Final Year Project for the win, methinks.

Refactor Refractor

Sunday, January 15th, 2006

I took a look at my raytracer on Friday and decided to “restructure” the rendering process. This wasn’t too difficult, it turned out. In the space of a day I have managed to take the entire rendering process and take it into a DLL. This will allow me to change the renderer for different scenes. I hope to create the photon mapper soon enough, as I did not attempt it over the holidays because I didn’t have a computer capable of it.

One good thing, though, is that in my fiddling I uncovered the source of a few bugs. They are now nearly all fixed, and I am immensely happy with it. So, here it is in all it’s glory.

Bugs fixed:

  • Bounding box tests were broken, basically giving us this effect.
  • White dots of evil have now been exterminated.
  • Refraction works now. Ironically the refraction code wasn’t broken, but something else was screwing it up.
  • The lighting calculations for the specular component was totally wrong due to a typo (ha!). This has been fixed. The attenuation had to be lowered because of it. It should have looked like this, whereas it actually looked like the one above.
  • My model collision code - while not broken - was rubbish. Also, the scene object classes were mesh-oriented, allowing little room for extension. I’ve changed it so I can have different kinds of objects, like mathematical shapes, or fire, or whatever.

There is one bug I have yet to fix and that is that the camera doesn’t actually seem to face in the same direction as the one in the datafile. Obviously my maths is screwed up: I’m converting the scene file’s look-at camera and turning it into an Euler camera for the rendering process. Maybe I should just stick to a UVN camera. Oh, and anti-aliasing is broken at the moment. This is a recent discovery.

So there we are. Maybe I can get on to some photon mapping goodness soon.

Edit: My latest large render.

This took approximately 12 minutes on my machine at 768×768. I’ve now bumped it to 1024×1024, which took approximately 25 minutes. It has 113,687 faces in 30 objects and one point light above the centre of the board. It’s currently missing the King and Queen for both sides, and also the Knights appear to be facing in the wrong direction, despite being correct when in 3D Studio Max. Every object in this scene is reflective, though I don’t like the colours I’ve picked.

The model was made by Alice Darcy and she has no idea that I’ve nicked it.

k-Dimensional

Wednesday, December 14th, 2005

I think the title explains what I’m about to implement for Tong. After I’ve finished my kd-tree, I’ll be on to photon mapping and I seriously cannot wait. I’m bursting with excitement and girlish glee, actually. I would start now, but I should really go to bed.

And only one person has figured out why I’ve called my raytracer “Tong”. Amazing.

Edit: And for those that do not know, shots of my (currently poor) progress can be found here.

Torch

Sunday, November 13th, 2005

I am very tired, so I’ll keep this brief.

This is the latest image that I have produced and as you can see it’s come a long way and has a long way to go yet. For a start, I have horrible textures with lo-res bump maps. Of course, I can’t make my own because I suck at art.

I’m attempting to add a flame to that torch, but with little luck so far. The floor looks like a sea of vomit and the banner looks totally flat. The light on the floor is too dim, as is the window. Finally there’s no specular on that crystal ball. I think that gives me a rough To-Do list, as well as getting round to bounding shapes, anti-aliasing and deep into the future, photon mapping.

Ugh. The more cool things I add, the crappier the image looks.

On a different note, I have decided to switch my thesis project. It’s late, but I realised that I prefer rendering to creating my own scripting language. It’s best that I do something that I very much enjoy, rather than simply enjoy. My supervisor wasn’t so happy, I think, but to be honest I’m not so bothered - I’ve only wasted 3 hours of his time compared to wasting 3 weeks of mine. I think he’d object to my apathy, but I remind myself that it’s best to do something that I feel I have a chance of getting done without wanting to commit suicide in the middle of it.

Busy day tomorrow. Night.

The Dark Project

Wednesday, November 9th, 2005

I’m going mental over this and this.

The former has weird dark patches that I cannot explain (though I have a feeling that it’s something to do with either my value for epsilon or my normal mapping code), and the latter is just too dark. This isn’t a problem with my raytracer: I’m just an incompetent artist. I attempted to lighten it up in this image, but it just reveals more artefacts.

I also have an issue with 3D Studio Max. It’s driving me crazy. In the .3ds file format, there are entries for emissive colour, refractive index and shininess. After some poking around the material editor I found all of these properties and set them accordingly. However, when I export them from Max to .3ds format, these values remain stubbornly blank. I don’t know what I’m doing wrong or how to fix it.

Finally, that shot with the light coming through the window is not a cheap hack or projected texture. It is actually taking a light source and it is accumulating colour through translucent surfaces using the alpha component of the texture, meaning that I can put the light anywhere and get accurate results. Obviously the light would bend if going through a refractive surface, but there exists no solution to this in standard Whitted raytracing.

Ugh. 3:30 am now … I should really sleep.

It Works

Saturday, November 5th, 2005

It works at last. )

  • View Peter J. B. Lewis's profile on LinkedIn
  • Journal Categories

  • Meta