Project 4: Single-View Modeling

Produced by Daniel Sperling and Ryan Morris

3D View of a Hallway with a Mistaken Modeling

The above image displays a view of the hallway to be described below where an accidental switch between the X axis and Y axis led to the wrong wall dissappearing from the image. This formed a unique artifact with a double-modeling of the room, including the real room a second time at the end of the hall. This was corrected in a later version, but this jpg was kept.

Image One: This first image was found in the one of the most tried and true methods of good image acquisition: a google search leading to flickr photos. This particular photo, titled " Typical Tokyo Midtown," is from user Ballet Lausanne:

Typical Tokyo Midtown

They have some pretty awesome "typical" hallways in Tokyo...

As can be seen, the image above lends itself to forming a nice 3D model. The final stage of the first attempt can be seen in the first image on this webpage. Unfortunately, we mixed up the X and Z coordinates, and after sweeping the XZ rectangle to the right (instead of out, see below), we had a double of the image and a missing right wall. We also noticed some severe distortion on the left wall.

Sweep to the Right

Really never should have seen this...

While it's true that we likely could have added some polygons and removed others by hand to correct this mistake, just doing a single bland hallway wasn't the point of this project anyway. To mix this up, we decided to experiment with adding segments of the hallway in parts--that is, have the hall be devoted into two, or perhaps three separate sets of 4 textures, thus increasing the resolution and accuracy of the mapping of each segment. The process was similar to any other:

Proper Hall Lines

First step was to draw perspective lines and compute the vanishing points. As can be seen, X lines now go "left-right" in the image, Y lines come out toward the viewer, and Z lines go "up-down" in the image.

Using the most central point in the image as (0, 0, 0) in 3-space and estimating x, y, and z coordinates to form an axis centered on that point, a homography in the reference plane was calculated:

Proper Hall Points

The homography was calculated without an error! Whooo!

Then came the fun part. We used the central point, (0, 0, 0), as the corner of one XZ rectangle, and used that face to create two separate models. In one, we took the first part of the hall as one set of four texture images, and the back half as another set of four, plus one for the back (showing front polygons):

Hall in 2 Segments

And another in 3 Segments:

Hall in 3 Segments

It does look a lot cleaner without any points or excess lines showing...

Finally, it was easy enough to save a VRML file for each of these. The models are both included in the "hall" folder of the directory associated with the website, and all the computed textures. As a sample, let's look at the texture for the first part of the ceiling and of the floor:

Hall CeilingHall Floor

Look how straight the lines are! No retouching necessary!

And let's take a look at some stills from the 3D models. The first is from the 2-section model, the second from the 3-section model:

Two Section 3D HallThree Section 3D hall

 The lines are definitely more apparent in the second model, but each particular segment looks better. Take your pick. Neither's being submitted for an art award, that's for sure.

 

Image Two: The second image is an original piece of artwork, taken by one of the producers of this project (Daniel Sperling) in Fall, 2011. That camera is now lost/stolen somewhere in southern Spain, but thankfully most pictures taken with it survive to this day, including this one of the Cornell clock tower:

Ring the Bells!

It's always a bit sad to include the original, because it always looks so much cleaner than a model from a single view...

The same procedure was used to create lines, do a 3D model, etc. The vanishing lines and associated polygons, in brief, were as to be expected:

Lines on a clock!   It's the origin!

The origin is a bit high up the tower, as our intrepid photographer took the image looking up. This doesn't do wonders for the camera position algorithm, but thankfully the model did not suffer.

The most notable part of trying to 3D model the clock tower is that only 2 of the many faces are nice, rectangular polygons: the left and right walls. The remainder of the polygons were awkward pentagons and misshapen qudrilaterals to fill in pieces close to the roof:

So many polygons!

It's a bit blurry, but that's what happens when your screen can't render the whole image and you take a screen shot. Lines left in to reference relationship to polygons.

In particular, it was tricky figuring out how to label each point in the roof. Most could be done using either SameZ or SameXY, but in the end several had to be made with a mix of the two and a little approximation by the user. Saving to a VRML file (located with all these images in the "clockTower" folder in the directory led to some interesting textures:

Texture of Top Left Tower PortionTexture of Left Wall

The left image is actually the left part of the cap of the tower, which texture maps only the inner potion into the 3D model. The right is the left wall of the clock tower. It looks a bit fat--possibility the original estimate of the reference height was off. All the bricks are straight though!

And in the end, let's see a still from the 3D model. It's not beautiful, but hey, it's better than Apple can do:

So many polygons!

That's all folks! Thanks for grading!