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,
|
© POV-Person Team 2004 Design notes Sample Hairstyles POV-Person Home Page Back to Chris' Ray Tracing Page |
||||
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. |
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.
![]() 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 colours available are included within the file eye.inc.
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.
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.
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.
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.
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.
Author: Chris Bartlett