Saturday, October 1, 2011

From-Scratch Ray Tracer

For my second graphics project I had to write a ray tracer from scratch. I used C++ to do most of the coding with some C spread around. It took a lot of work, especially because I began the project by learning C++ but it turned out excellent. The simple assignment involved ray tracing spheres with diffuse shading only. I also completed the extra credit assignment of tracing arbitrary convex polygons and applying normal interpolation to them (if normals are provided).

 One interesting road-bump I ran into was in shading my spheres. I was getting wacky, psychedelic colors instead of the expected shading.

It turned out the characters I was storing my pixel colors in were overflowing and generating odd color combinations. The cause was my lack of normalizing the vectors in the shading equations. Once I figured this out I was able to get good looking spheres:


Some extra credit images are below. The first is a teapot with smooth shading by normal interpolation. The second is a mountain range with lots of polygons. The mountain took over 10 minutes to render on my school server. All the objects were generated with the spd programs.

Saturday, September 10, 2011

Last Semester of School

I'm 2 weeks into my final semester at UMBC. I haven't worked on my tetris implementation since my last post unfortunately. Lately I've been focusing on school: projects, studying and such and doing a fair bit of gaming.

My current game playing can be found at backloggery.com/ragnaroktomorrow where i show my current progression into my large backlog of unplayed/unfinished titles.

I've also gotten addicted back into older Pokemon games, currently playing through Sapphire again.

I am currently enrolled in Computer Graphics and Artificial Intelligence at UMBC. My current gfx project has me creating a scene of a plate of cookies. I'll post the result when I'm finished.

(click for full size)

And here it is. I'm mostly satisfied, but I was pressed for time with my other assignments due at the same time. Thanks go out to the Raising Ganon blog for the great lon lon milk label. This image was generated using the open source Pixie Renderman. For my next assignment, I have to create a simple ray tracer that only needs to handle spheres. For extra credit we can also accept polygons.

Edit: My submission was one of the ones selected to show the class! Small victory, but victory nonetheless. Now back to Project 2: Ray Tracer from scratch.

Tuesday, August 16, 2011

JavaRis

As practice in programming languages in general, I came up with the idea of implementing Tetris in each of many languages. The first: Java. I went through some tutorials on writing Java Applets (very archaic indeed) and went to work on my first attempt. I hit a few road-bumps along the way but it was straight forward for the most part. I spent most of the time making the art in paint.net. The actual coding was pretty quick.

It's far from finished, but most of the important stuff is implemented. Right now you just have the ability to move a single Tetris square around the playing field using the arrow keys.
Check out my progress at my school homepage.

Friday, August 12, 2011

Summer Game Jam 2011

I'm participating in a small, weekend game jam with some friends from the campus GDC. We have about 10 people, so we split off into 2 teams. We used a random word generator to come up with our initial designs. My team is going to work with the Angel Engine for our project which will be excellent because I have very little cpp experience. We've had a rough time getting the ball rolling with this engine despite the impressive provided demo code, so we may switch over to FlatRedBall tomorrow.

Oh, our design is based off the words "chameleon", "planet", and "catastrophe" and we're approaching it as a puzzle-platformer.

Day 2

We got past our initial issues with the engine and made some decent progress but ran into another roadblock today. We want our character to be able to climb walls but we haven't been able to find a good way to monitor collision detection. The default physics handles collisions nicely but there's no easy way to tell when two particular objects are colliding with each other. Its too late to switch to a new engine now so we're just working with what we have and will probably end up with an unfinished product.

Day 3

We didn't get anything done on our final day. I slept pretty late from being up trying to solve our collision problem. We found a possible solution before the end but it would be a hacky one. If I proceed to work on this any more in the future I will ask the engine designers for advice on how to implement climbing.

Now back to my other projects!