POV-Person (Free include Files for Ray Tracing a Head)

Persistence of Vision (POV-Ray) is a FREE Ray Tracing Software, available for download from http://www.povray.org/
The POV-Ray Scene file and Include files presented here can be used with POV-Ray to render the image of a human head. You can use, modify and redistribute them free of charge, subject to the conditions in the POV-Person License, summarised here.

Page Contents
To render the head you need

Either,

Or, You can download the individual files:
Right click the links (long click on the Mac) to save the files to disk.


© POV-Person Team 2004
Design notes
Sample Hairstyles
POV-Person Home Page
Back to Chris' Ray Tracing Page


Design Notes

The various components used to construct the head have been kept separate to permit them to be used and manipulated independantly. For example, the eyes can be rotated in their sockets and individual teeth can be moved or removed for effect. Here are some examples of using some simple parameters in the scene file.


This image was generated using the standard skintexture with the settings as defined in Head.pov.

This image was generated using altskintexture_1, which has green splodges interspersed with transparent gaps.

This image was generated using the standard skintexture with the settings; skindarkness = 5 and skinredness = 1.5, with minimal makeup.

Return to the Top


The Scene File

The POV-Person library of files includes a POV-Ray scene file that you can use straight away to render an image of a head. This scene file defines a camera, lights and various parameters that control the 3D objects used to construct the head. It also contains '#include' statements for the various include files that define the component parts of the head.

You can adapt this file to try out the different parameter settings available and render different views of the head.

It is anticipated that you will want to add the model to your own scene files, in which case you can add '#include' statements for the components you wish to use, position and scale the objects as required and copy the parameters and settings you need from the "head.pov" scene file. Alternatively you can use the scene file as the basis for an include file used in your scene so that the definition of the head is kept separate from the rest of your main scene file.

Note: Various include files add their own camera definitions if the variable 'cam' is not defined. This causes warnings to be displayed and results in the last camera definition being used. To ensure that the camera definition from your scene file is used you can either define your camera at the bottom of your scene file (or at least after the includes) or declare the variable 'cam' e.g. '#declare cam=1;'.

Most of the parameters in the scene file are optional as each include file contains its own default declarations. Some of the objects require textures to be added when used in your scene file, otherwise they will appear as black shapes.

The parameters that control the definition of an object generally need to be set before the "#include" statement for that object.

Return to the Top


Textures

The texture file contains sample skin, lip, eyebrow, eyelash and various makeup textures.
The main skin colour can be adjusted from the head.pov file by setting the darkness and the redness.
An alternative green translucent skin is included as illustrated in the image above.
The amount of Eye shadow and blusher can be set from the head.pov file.
The eyelash texture can be controlled to adjust the thickness, length and colour of the lashes.
The eye brow colour can be adjusted.
The lip texture contains two layered textures, with the colour you choose being overlayed on top of the skin texture. If you define a lip colour with a transparency setting, the lip colour will take account of the underlying skin colour you have chosen.

Return to the Top


The Face


The face include file actually contains half a face, defined as a mesh of smooth triangles. To get the full face use two copies of the face object with one copy scaled <-1,1,1> (as demonstrated in the sample scene file). Sample skin textures are contained within the sample texture file described above.

Return to the Top


The Lips


The lips include file contains half a pair of lips, defined as a mesh of smooth triangles. To get the full set of lips use two copies with one scaled <-1,1,1>. A sample lip texture is contained within the sample texture file described above.

Return to the Top


The eye


eyeColour=1;
eyeBrightness=0.5;

eyeColour=2;
eyeBrightness=0.5;

eyeColour=3;
eyeBrightness=0.5;

eyeColour=1;
eyeBrightness=1;

eyeColour=2;
eyeBrightness=1.5;

eyeColour=3;
eyeBrightness=1.5;
The eye is modelled in POVRay using CSG (Constructive Solid Geometry). This makes it easy to adapt the eye to your own needs. The eye colour, the size and shape of the pupil, and the position and orientation of the eye can all be readily adjusted from your scene file. To get two identical eyes, use the object twice, with one copy scaled <-1,1,1>. To define two eyes that can be adjusted separately (e.g. different colours) you can simply include the file twice, preceding the '#include' with different settings.

The eye colours available are included within the file eye.inc.

Return to the Top


The upper eyelash and The lower eyelash


Upper and lower eyelashes are provided as small POVRay meshes that can be duplicated and scaled by <-1,1,1> to give two sets of eyelashes. A sample eyelash texture is provided in the texture file described above and applied in the face.pov scene file. Parameters in the face.pov file can be used to control: A random element is also introduced into the spacing between individual eyelashes in the texture.

Return to the Top


The eyebrow


The eyebrow is a small POVRay mesh that can be duplicated and scaled by <-1,1,1> to give two identical eyebrows. A sample eyebrow texture is provided in the texture file described above and applied in the the face.pov scene file.

Return to the Top


The ear


The ear include file contains a single ear. This can be duplicated and scaled by <-1,1,1> to give two identical ears.

Return to the Top


The upper teeth and The lower teeth


The teeth include files contain half an upper set of teeth and half a lower set of teeth. Each half-set is a union of the meshes for the individual teeth.

To get a full set of teeth, use the upperTeeth and lowerTeeth objects twice, scaling the second copy of each by <-1,1,1>. Alternatively you can take a copy of the mesh objects in the include file, change the names and adjust the left and right teeth independantly. For example you can remove a tooth from the left set and change the texture of a tooth in the right set to gold.

Individual teeth can also be translated or scaled within the include file.

Return to the Top



Hair, HairStyle and Hairline



The hair include files are used to add hair to your model. You can select from a list of predefined hair styles by using the hairStyle variable (e.g. 'hairStyle=3'). You can also change the hair colour and length, the number and thickness of hairs and a whole bunch of other parameters as illustrated in the files.

Some more samples rendered using these files can be found here, along with a summary of the settings used.

How it works

The 'hairstyle.inc' include file is used in a POVRay scene file to create a hair object. This file contains an #include statement for the 'hair.inc' include file, which in turn contains an #include statement for the 'hairline.inc' include file. The file 'hairline.inc' contains a 'hairline' mesh that follows the contours of the head object, covering only the parts of the head from which hair is to be 'grown'. The 'hair.inc' file defines hairs based upon the 'hairline' object and a series of parameters supplied to it. The 'hairstyle.inc' file sets a series of parameters that will create particular hair styles or, if hairStyle=0 is specified, uses parameters set within the PovRay scene file to adjust the default settings.

The 'hair.inc' file projects a random series of lines from a theoretical hair 'centre' to find points on the 'hairline' object and their corresponding normals. A hair is added at each point by cutting a section from a torus. This is initially oriented so that it sticks up from the origin and projects in the direction of the positive y-axis, bending over towards the positive z-axis. Transformations and scaling are then applied before orienting the hair and translating it to its correct position.

A large number of hairs are required to provide good coverage, unfortunately this increases the render time from a few seconds to hours. 10,000 hairs are required to provide a full head of hair at a hair thickness of 0.004. It is recommended to perform test renders with a few hundred, thick hairs to get a reasonable impression of how the hairs will be positioned, increasing the number and reducing the hair thickness for the final render.

If the head is to be positioned a long way from the camera, it is possible to get a reasonable effect with less hairs or by rendering the hairline mesh itself using the hair colour to mask the colour of the skin (thus helping to conceal any gaps between the hairs).

Unlike most of the components in this package which generate half an object, this include file generates a complete head of hair. This is because hair is usually not very symmetrical, so scaling half a head of hair by <-1,1,1> does not generally produce good results. In theory this means that the theoretical 'centre' of the hair (the centre from which the hairs radiate) could be moved away from the y,z plane, but at present the algorithms in the hair.inc file prevent this from working very well.

Various changes can be made within the hair include file (or a copy of it) to change the shape and behaviour of the hair. For example, the object used to create each hair can be changed from a torus to any object of your choosing. You could use a cone to generate spikes or a spline to create highly sophisticated hairstyles. The supplied file defines separate sections for the Fringe and for the main body of hair. You can readily use the same technique to define as many sections as you wish. Furthermore, each section can obey reasonably complex transformations. For example, the main body of hair in the supplied file turns hairs towards the back of the head based upon their distance from the centre in the x dimension, the hair thickness is also adjusted around the middle of the head to thicken it out where otherwise it would require a greater number of hairs to cover.

Return to the Top



HairTexture

The Hair texture include file takes a base colour and adds variations of light and dark as might be found in hair. It also adds bands of translucency to help break up sharp shadows. If included prior to the 'hair.inc' file, the texture will be applied to each hair.

This can also help reduce render times where the head is positioned far from the camera, as a smaller number of larger hairs can be used.

Return to the Top



Example of using BlobMan Interface and Adapter for using BlobMan Macros


POV-Person currently only provides the POV-Ray model of a head (and neck), but can be used in combination with BlobMan 4.2 (Copyright Peter Houston of Houston Graphics) to create the model of a complete person.

BlobMan uses POV-Ray blob objects to define a complete person based upon a set of parameters that are used to position the various body parts. Blobman 4.2 includes both male and female body definitions along with a range of compatible clothing. Blobman also includes a head, but a head is notoriously difficult to model using blobs.

The files provided with POV-Person illustrate how to transplant the POV-Person head onto the BlobMan body.

Note. BlobMan is not written by the POV-Person team and is not covered by the POV-Person license.

Return to the Top


Author: Chris Bartlett
E-Mail:
mailto:c_bartlett@btconnect.com
Last revised: 14 Aug 2004 (CB)
© Copyright: POV-Person Team 2004.