/* Google Analytics --------------- */ /* ----------------------------- */

-----> PLAY SWARDTRIS NOW! <-----
 

Friday, April 29, 2005

Texture Mapping - Bitmap

Folks, I got hung up for a long time trying to add a feature to my scene editor that would give me more control and flexibility over my texture maps. Sadly, I still haven't figured out how to solve the problem, and I may have to come up with something else. Fortunately for you, however, I decided there was a feature I could add with relative ease to keep you interested. I added the ability to use a 24-bit bitmap file as a texture in my scenes. It has been fun to put real bitmaps on my table tops. Here is one of my favorites.

 

Friday, April 15, 2005

Texture Mapping - Continued

I haven't changed any code yet to make the texture mapping any more useful than it was before. However, I did change the color of the default texture and applied it to a different scene. I think it turned out looking pretty nice, and I wanted everyone to see it.

 

Thursday, April 14, 2005

Texture Mapping - First Attempt

Tonight I am treating you to my first successful (albeit severely limited) texture mapping. Each polygon group that happens to be flatter than it is wide or deep got a red and white checkerboard texture mapped onto it, based simply on the x and z coordinates of each point on the surface. Like I said, it's limited. But it's functional! Click the picture to see the larger version. Time for bed. But don't worry. I'll keep at this more tomorrow and over the weekend. Good night!

 

Wednesday, April 13, 2005

Texture Mapping - Ray Tracer

Okay, all you faithful readers out there, it's time I started actually working on my ray tracer again. I have decided that the next feature I need to add to it is texture mapping. I have been intimidated by texture mapping thus far for one simple reason: the scene editor. Allow me to elaborate. Many of you saw my last post about having first created an interactive scene editor before having actually done any ray tracing. The scene editor has turned out to be both a boon and a curse. It's great because it gives me a wonderful idea of what my scene will look like before I ray trace it; but it is also a pain because for most of the features I want to add to my ray tracer, I have to add them to my scene editor as well. To make a long story short, I have not implemented texture mapping yet because I haven't felt like figuring out how to add an interface for it in my scene editor. But my days of fear are over and I am going to start working on texture mapping now. I'll keep you posted on my progress. Wish me luck!

 

Tuesday, April 12, 2005

OpenGL Scene Editor - Ray Tracer

When I began rewriting my ray tracer, I decided the first order of business was to create an interactive scene editor. A few years ago I purchased a copy of the OpenGL Programming Guide, thinking I would someday get into some serious OpenGL. That day came when I decided I needed my scene editor. Another decision I made at that point was to forego any visual component layout managers and use pure Win32 API calls. There are times I regret having done that, because my work really has been cut out for me. But I've been glad at times because I have become much more familiar with the windows programming API. Using my scene editor, I'm able to open model files I downloaded from the BYU Computer Science Department. Using the mouse, I can interactively rotate, scale, and translate all of my scene objects. Doing so, I am able to compose scenes that are much more complex (and interesting) than my original ray tracer. I created menu options to create spheres, simple point light sources, and cameras (currently, my ray tracer only supports rendering from the perspective of the first camera in the scene). I also created a tool window for modifying the properties of each scene object. The controls on the tool window are dynamically displayed based on what type of object you select with the mouse. Now I'll post some scene editor screenshots. Tools for modifying a polygon group Tools for modifying a sphere

 

Monday, April 11, 2005

Screenshots - Ray Tracer

Dear readers, I have decided it is time for me to post some of my favorite screenshots thus far. So without further ado, here are some of my best creations.

My first soft shadow render

One of my first successful refraction renders

A new angle on things

Point light vs sphere light

A glass TIE Fighter

Sheer beauty

A little airplane

Another airplane

 

Friday, April 08, 2005

History - Part 2

And so the history continues. When I last wrote, I promised the story of "why I am still working on what was originally just another project for school." True to my word, here is the story. CS 455 was my very first senior-level class at BYU. I was somewhat nervous about taking it since I had never before taken even a 300-level class, but I spoke with Dr. Tom Sederberg (for whom I had worked as a teaching assistant, and from whom I had already taken one class) who assured me I could handle it. I found early on that I enjoyed the class a great deal. Somehow I had gotten the idea in my head at an early age that a programmer really knew a lot if he could make cool graphics. (This is not necessarly an untruth, but there are certainly other things a programmer can specialize in.) Finally I was writing programs I could show to people without getting that "So what?" look! Robert the Brown A brief story may illustrate just how cool I was. At that time (and for a long time thereafter), I had a roommate named Robert. You may view his photo to the right. He was always a deceiver. In this photo he was trying to convince the photographer that he was his twin brother Juan (who in actuality does not exist). From time to time, however, he had brief moments of honesty. During one such moment, he informed me that he really liked one particular image I had rendered using my ray tracer. It was the image of spheres above an infinite plane which can be seen below. Robert had recently spent a small fortune on some photo paper for our printer, and to my great honor, he demanded that I print a copy of my spherical artwork on a sheet of his precious paper. Folks, it hardly gets better than that. Ray Tracer Spheres In truth, however, it does actually get better than that. In addition to the visual payoff as well as my new-found popularity, I found that I was getting high marks in the class. That was great encouragement. I truly was becoming the master programmer I had always wanted to be. :D Lest you be persuaded to believe that I actually was a master programmer at that time, I must admit my ray tracer had some serious flaws, certainly not least of which was the fact that in order to render a different scene than the last, I had to recompile my program. Do you know what that means? It means that if I were to send you a copy of my ray tracer from back then, it would always render exactly the same scene every time you ran it. No matter what! Ok, I'm signing out now with the full realization that the answer to "why I am still working on what was originally just another project for school" is still left largely unanswered. Not only do you have other things to do, but I do as well. Yet worry not, faithful readers. More answers are yet to come.

 

Tuesday, April 05, 2005

History - Part 1

3DDDA SkullTo the right you will see an image I rendered using my very first ray tracer ever. It was called "Project 4", as it was the fourth project I wrote for CS 455 at BYU (Go Cougars!). I just now rendered that image in "Project 4" on my laptop, which is a Pentium III - 1.0 GHz machine, with 256 MB of RAM. The process took 2:07 of CPU time (from now on, I will refer only to CPU time, unless otherwise stated; if you don't know what that means, drop me an email). I don't know whether you're impressed by that or not, but for the sake of comparison, I loaded that same simple skull scene into Warwis3D (the program to which this page is dedicated) and the scene was rendered in just over 1 second! Now that's improvement! (Side note: Years ago, when I first wrote "Project 4", I created a web page on which I laid out a handful of renders along with how long it took to render each one. They were all rendered on my old Pentium III - 450 MHz named Ruth, which now belongs to my parents. The page uses terms like "anti-aliasing," "3DDDA" and "beauty." If you don't know what those mean, be sure to keep tuning in to this blog; I'm sure I'll define them on here eventually. At any rate, to see that page, click here: 3DDDA Final Project.) Ok, folks. So as to hold your interest, I'll end this post. (Who likes reading paragraph after paragraph online? This is the age of high speed and low attention span.) I'll be back, though, with more exciting history of what will someday be considered historic: Warwis3D. Coming up next time: Why I am still working on what was originally just another project for school. Stay tuned!

 

Welcome

This morning, my co-worker Derek gave me the truly fascinating idea of creating a blog for my ray tracer (graphics program) called Warwis3D. Well, folks, this is it! The project is already quite far along, which means that for historical purposes, my first few entries will have to be summaries of events that have long since passed. However, I feel that I am up to the challenge and that they will be of benefit to you. So come here for periodic (but probably not regular) updates on the progress of my ever-so-addicting spare-time project.