Friday, February 22, 2013

Graphics Write-Up #6

Once again, this graphics assignment wasn't particularly challenging, but it did take a bit longer than I'd expected.  As of class yesterday I'd pretty much finished and had Maya models loading into my renderer.  However, for some reason only certain meshes were working, my original cubes worked fine and the new cone and soccer ball worked fine, but my torus didn't load at all.  This proved to be the most difficult part of the assignment as I'd never worked with binary files before.

I knew that I was writing the file out correctly, or at least I was pretty confidant I was since at first I didn't know how to convert a binary file into hex to verify it.  Once I got that working it became clear that I was indeed writing the file out correctly.  That left reading the file back in as the only issue.  This seemed rather confusing, though, as it was clearly working with some of the meshes already.  I tried using a cylinder instead of a torus, but it failed to work as well.  After talking to Cody during the break in class he helped me spot the error I'd made in my file reader.

The other section of the assignment, sorting all the PIX calls, was very easy, although it's been quite a while since the last time I wrote a sorting algorithm.  I didn't know at the time how to nest the calls, and now that I think about it I should have done that for this submission, but since we're going to be modifying it slightly during the next assignment I'll just make sure to do it then.

Oh.  I also think there's something wrong with my specular lightning, but I haven't gotten feedback on the last assignment so I'm not sure.  All attempts I've made at "fixing" it have done nothing at all though.

Here's the sorted PIX events broken down so that Effect is at the top of the tree, followed by Material and then finally the Entity.


No comments:

Post a Comment