Modelling A Human Head
by Toulouse de Margerie
 
 

This web page describes my efforts to model my own (human!) head into a 3D computer graphic format.

First things first...  Here's what I normally look like

        


The process involved four main steps:

  1. Obtaining a panoramic texture of my face for use as a texture on the model
  2. Modelling my head using 3D Studio Max R3.1
  3. Positioning the panoramic texture on the model
  4. Converting the 3D model for use with the POVRay rendering system

  5. Note: Most of the images found on this page are a low resolution version of the ones actually used.  The original, full resolution image can be seen simply by clicking on the low-res version.


Step 1: Creating the Panoramic Face Texture

The first problem I encountered was that of getting my real world appearance into a panoramic computer bitmap form.  The obvious approach would have been to use a digital camera to take pictures of my head from all possible angles and then assemble the images into a panoramic picture.  Since I don't have access to any kind of digital camera, another approach had to be used.  I decided to try to use my flatbed scanner as an alternative.

The next five images were acquired by simply sticking my head directly in my scanner as it lay flat on the ground and having a friend man the computer receiving the data.  I tried to remain as still as possible as the scanner passed from one side of my face to the other, however, as can be seen by close inspection this wasn't perfect.  Specifically, take a close look at my right eye in the head on picture.  Five scans were performed each with my head in different positions.

        
After much brightness, tint, and contrast adjustments, the colour of the images was corrected.  The five images were then composited together into a single picture by progressively fading each one into the next.  This was all done using Microsoft Photodraw 2000.  The final panoramic texture is found below.

Note that the bitmap is not a true panoramic in that it does not wrap around my entire head, rather it reaches only from my left side to my right.  Therefore, the final result will not provide a full 360 degree textured model but rather a model that will look good from the front.


Since my eyes were closed during the scanning process (boy that scanner light is bright!), I thought I'd also create an eye picture.  This will allow me to have my eyes open in the final model.  An existing eye texture was acquired from the web and it's hue adjusted to match the colour of my own eyes (again done using Microsoft Photodraw 2000).
That's it, now we have a semi-panoramic picture of my face as well as an eye texture.  We can now move on to modelling my head in 3D!


Step 2: Modelling my Head

The optimal method of acquistion of the 3D model using something like a laser scanner wasn't available to me, so I opted to try to create a reasonable approximation of my head in 3D using Autodesk's 3D Studio Max R3.1 software.

The usual strategy for achieving this kind of goal is to use a descent front and side view of the subject as a reference.  The front and side view of my face from my scanning adventures, were perfect candidates.  I starting with a spherical primitive shape made of bicubic patches.  Using the afformentioned pictures as a guide (3DSMax is capable of displaying any arbitrary picture as a background in any particular viewport), I molded the sphere to match my front and side sihlouettes.  A little extra (unguided) work gave me the proper cheak bone structure.  Furthermore, the inside parts of my ear were modelled, without any real reference, to a shape which I considered approximately correct.  See picture below.

Holes were left in the model in which my eyes could fit.  Two precisely position spheres were introduced into these holes to give me eyes upon which I could separetely apply the eye texture.

Here's the final 3D Studio Max R3.1 file including the required texture in zip form (500Kb).
Now that we have a descent 3D model of my head, we can continue on and try positioning the face texture on it.


Step 3: Applying the Face Texture to the 3D model

Since the texture is basically panoramic, cylindrical texture mapping was used to apply the bitmap onto the model.  This again was done using 3D Studio.  By tweaking the parameters of the cylindrical texture mapping, the bitmap was finally properly positioned onto the model.  This involved a lot of trial and error until proper positioning was achieved.  As well, since the texture already includes (unfortunately) many lighting effects such as shadowing and highlights, the texture was applied in a completely flat manner.  That is to say that any light sources in the scene do not affect the color of the model; the colour at every point is completely taken from the texture itself.

The eye texture was applied to the spheres placed in my head seperately from the face texture.  A simple head on planar mapping was used for this as well.  This simple texture mapping required little tweaking to achieve the desired result.

Here is a rendering of the final result as achieved in 3D Studio Max.  As well, I've rendered out two animated AVI renderings of the model with basic camera animations to show off my work from all sides.  One AVI is rendered at a resolution 320 x 240 (1.2Mb), and the other at a resolution of 640 x 480 (3.2Mb).  As you can see, a fairly realistic 3D result was achieved from my efforts.


Looks like I'm done!  Not quite yet...


Step 4: Converting the 3D Studio Model to POVRay

Because this project was done as an assignment for my Fundamentals of Computer Graphics course (McGill University), I also faced the extra task of having to submit the final product in a form compatible with the shareware POVRay renderer.

This was done by writing a plug-in application for 3D Studio which could export the 3D model data directly into a text format useable by POVRay.  3D Studio Max is a plug-in based application very suitable to this task.  I created a small DLL module for 3D Studio using Microsoft Visual C++ 6.0 along with the provided 3DS Max SDK package.  The exporter was written to simply dump out the raw triangle mesh data into a text file in a format matching POVRay's triangle mesh primitive.  Furthermore, the transformations on each individual object in the scene (the camera, head, and eyes) were also recorded in the resulting text file.

If your interested, here is the source code for the plug-in:  PovOut.h & PovOut.cpp

An unfortunate and completely unexpected problem was immediately encountered when considering how to export the texture positioning from 3D Studio to POVRay.  I had originally expected that, as in many other 3D modelling languages, one could specify texture coordinate information along with the 3D model in POVRay.  ie.  For every 3D vertex in the model, not only would the 3D position be stored but also the corresponding coordinate in the texture.  This was not the case!  As far as I can tell, there is absolutely no way of specifying information of this type in POVRay's file format!

Luckily, the texture mapping done in 3D Studio, although quite painfully difficult to produce, boiled down to simple cylindrical texture mapping with subsequent translation, scaling, and rotation applied it.  This meant that using POVRays cylindrical texture mapping, the same final result could be achieved (in theory!).  The task was even more painful in POVRay than in 3D Studio since POVRay does not include any intuitive GUI based method for tweaking parameters.  After many renderings (probably hundreds) with slightly different transformations applied to the basic cylindrical texture mapping, an acceptible result was finally achieved.  Although the final positioning of the face texture in on the 3D model in POVRay is not as precise as that in 3DS Max, the result is still very good!  Careful inspection of the texture placement around the earlobes of the model shows the difference in texture positioning between the 3D Studio and POVRay scenes.

Next, the eye spheres of the original scene in 3DS Max were replaced with corresponding POVRay sphere primitives of matching radius and position as the originals.  The texture on the eyes was much easier to position than that of the face using a simple planar projection mapping.  Again, this was achieved through trial and error until an acceptable result was found.

That's it!  We now have a nice model of my head in POVRay!  The final POVRay scene description along with with the textures in TGA format is available here in zipped form (5Mb).


One last thing.  To show off the 3Dness of the final model, I added some camera animation information into the POVRay scene (check out the camera section of the POVRay file above).  The 3D Studio exporter I wrote, although it could have, does not support animation exporting, I therefore had to express the camera animation by hand using equations involving POVRay's internal "clock" variable.

A final animated rendering is available here in AVI format at a resolution 320 x 240.
 
 

Now you try to do that!

Toulouse de Margerie (March 2000)