Model rendering with Milkshape and POV-Ray 3.5
Copyright (C)2003 Neil Jedrzejewski
(Email)
Milkshape's materials and POV-Ray
The Milkshape POV-Ray export plug-in tries to export as many of your Milkshape material properties as possible. At the moment it exports the following:
- Ambient Light
- Diffuse Light
- Speculuar light and intensity
- Object Transparency
- Texture Map
Because Milkshape uses OpenGL to display models and POV-Ray is a ray tracer, these material properties dont work exactly the same way in the two programs. The plug-in creates simple POV-Ray materials, enough for you to do simple renders of your models. You can tweak the include file yourself to reproduce any specific effects you need. See the POV-Ray documentation for details.
Below is a list of the material properties exported from Milkshape by the plug-in and what they look like using a simple POV-Ray Render.
Objects with no material
The exporter always creates on default material which is assigned to mesh objects that don't have a material assigned in Milkshape. This is so that they show up in POV-Ray and is a default grey colour.
Ambient colour
Ambient light is the colour of the light in your environment. If you were in a room with red lights, everything in the room has a red tint, even if in fact objects in that room may be blue for example. The followings picture shows a white teapot with a red ambient light as seen in Milkshape and rendered with POV-Ray.


Diffuse colour
This is the actual light that the object reflects and has the biggest influence over its colour. You should use diffuse colour for setting basic colours of your objects. The followings picture shows a teapot with blue diffuse light as seen in Milkshape and rendered with POV-Ray.


*NOTE* For objects with an assigned texture bitmap, the plug-in doesnt export the diffuse colour.
Specular highlights
This defines how much and how sharp an objects reflective high-lights are. Milkshape allows you to set the colour of highlight but in POV-Ray, specular highlights dont work the same way. Instead, the red component of you chosen color defines how strong the highlights are. The slider underneath the button sets how sharp the highlights are.
The following examples show a dark green teapot with a red component of 255 and the slider at 100%


Transparency
The transparency slider can be used to adjust how transparent your objects are. The pictures below show an orange teapot with 50% transparency.


Bitmap Textures (skins)
You can cover your objects in a BMP format texture and the plug-in will export it with any UVW mapping co-ordinates retained. Because the plug-in was originally designed for use by Half-Life modellers, it defaults to setting the image format in the include file to BMP format. However, you can use GIF, TGA, PPM, PGM, PNG, JPG or TIFF format if you prefer but you will need to edit the generated include file. Section 2 of the tutorial explains how.

