Summary: Plugins that allow Lightwave users to create and use Normal Maps.
The original gramps object shown on this page was created by David Maas. Check out his Age with Dignity tutorial which leads you through his "detail-up technique" to create the object.
Background
Recently I have been assisting Lightwave users who are creating lo-res objects for some virtual reality applications. Originally they were creating hi-res objects and using Surface Baker and its "Bake Illumination" feature to create a UV texture map that captured the detailed shading of their hi-res objects. After using qemLOSS3 to create a lo-res version of their object, they used the baked UV texture map on the lo-res object to make it appear as if it had as much detail as the hi-res object. The main drawback to this in their virtual reality environment was that if their light position changed or the object orientation changed in relation to the light position, the shading on the object did not change to match those new orientations. So that is why I took an interest in what is commonly being referred to as Normal Maps.
ATI Technologies released a set of tools and applications called NormalMapper which takes a hi-res and lo-res 3D object and creates a Normal Map from the hi-res object and maps its surface normals onto a lo-res object. Since these are surface normal vectors that are being mapped rather than just a texture map, the shading of the object will change based on the light and object orientations. I wanted to experiment with these Normal Maps, so I initially wrote an NMF export plugin for Lightwave, which was the file format needed by the NormalMapper utility. So my first tests involved exporting hi-res and lo-res Lightwave objects to NMF format and then using the NormalMapper application to create a Normal Map TGA file that could be viewed on the lo-res object with ATI's NMFView application. The results of these were very encouraging, so I proceeded to create the Normal Map plugins described in the following sections to allow Lightwave users an easier way to create Normal Maps and render objects with those Normal Maps.


Normal Map Plugins
I did not spend much time trying to write web page documention for the 4 plugins found in this release. These are mainly just brief descriptions of the plugins intended for the users I have been working with and for anyone else wanting to experiment with these plugins.
Basilio Noris (aka dies-irae) has created a pdf document (in 3 languages) that includes illustrations and more detail about using the plugins. The English manual, French manual, and Italian manual have all been made available for the benefit of other Lightwavers. Thanks very much, dies-irae, for your hard work on these documents!
And Jerry Jang has translated this web page and some of the information from the pdf documents into Chinese and made it available on his web server in the tutorials section ( http://www.cg-power.com/tutorials/plugin/NormalMap/NormalMap.htm ). Thanks very much Jerry for this translation!
This is the main plugin of the four; it is the ATI NormalMapper application converted into a Modeler plugin. It provides a way to create a Normal Map from Modeler, complete with a LW panels interface for all the NormalMapper options.
Before you run the plugin, you should have the lo-res object in the foreground layer(s) and the hi-res object in the background layer(s) of Modeler. Both objects should only consist of polygons, so you should freeze them if they contain subdivision surfaces.
In the plugin's Lo-res Model Parameters section, the Image type parameter will allow selecting any of LW's standard 24 bit formats. If the user does not actually have some of those image savers installed, the plugin should detect that when it tries to save the image and then default to the Targa saver (which is built-in to LW, so it should always be available). The Lo-res UV map option allows the user to select an existing UV map they would like to use to determine the map that will be used to create the Normal Map image. The UV map should have every vertex of the lo-res model represented somwehere in the map. There is an option to export the lo-res (and hi-res) objects to NMF format in case someone wants to use the ATI NormalMapper tools for whatever reason.
Hint: By default, the ATI NormalMapper routines render beyond border areas of polygons in a UV map, This can be a problem particularly with Atlas UV maps; some parts of a UV map can be overwritten when they extend the image in those border regions. This will cause glitches to appear in the final rendering of your lo-res object because the surface normal vectors in those regions will not be correct. This problem can be eliminated by initially creating the lo-res object's Atlas map with the "Relative Gap Size" set to about 100% (or greater) rather than the default 20%.
In the Hi-res Model Parameters section, the Bumpmap image is optional. If the user wants their hi-res object's bump channel to be included in the resulting Normal Map, a grayscale image must have been created in advance that depicts the bump heights of the hi-res object's surfaces. If the hi-res object's bumpmap is an existing single image, just make sure the image is loaded into the Image Editor before the NormalMapCreate plugin is run and select the appropriate UV map from the Hi-res Model Parameter section of the NormalMapCreate interface. Don't forget, the bumpmap image must already be loaded into the Image Editor before the NormalMapCreate plugin is run (I know that's a little inconvenient, but the LWpanel macro for selecting an image did not supply a "(load image)" option to that pull-down like most LW image pull-downs allow, and I didn't bother to spend the time to add that menu option). Every other hi-res parameter should be pretty obvious.
Hint: If the hi-res objects' bump channel is made up of images, procedurals and gradients, there are a couple of ways to use Surface Baker in Layout to bake an image that can be used. The BumpMapCreate plugin was written to help with this, but it has a severe limitation if there are Alpha blended layers in the bump texture (see directions on how to use this plugin below). So here is another method for creating a bumpmap using Layout's Surface Baker ability to bake the diffuse channel (you should already be somewhat familiar with the Surface Baker shader, otherwise acquaint yourself with the Surface Baker plugin by running through Newtek's LW_Baker: Surface Baking the Cow tutorial).
The Advanced Parameters section just gives the Lightwave user the same options that the ATI NormalMapper application allows. I am not going to describe any of these parameters on this web page. If you are truly interested in these parameters, download the ATI NormalMapper distribution and browse the included Readme file. There is one small gotcha that I will mention here. The NormalMapCreate plugin allows you to generate the Normal Map in Tangent space, since that is the coordinate space used by the ATI NMFView application. However, if you want to use the exported NMF files and the tangent space normal map in the NMFView application, the Normal Map TGA image must be flipped in the vertical direction before it can be used with NMFView. The flipped image problem is a Targa reading problem of the viewer. In the header part of the TGA, there's a "type" field which tells some things about the pixels order and encoding. Lightwave TGA has a last to first row order, and unless the application to reads them accordingly, it'll read the image "upside-down". So nothing to worry about, just flip the image before you try to use it with NMFView (actually, if you open the TGA and then resave it untouched in photoshop, it's "type" changes and the viewer reads it correctly).
The Normal Map created by the NormalMapCreate plugin can now be used in an OpenGL or DirectX application similar to the NMFView application. The NormalMapShader plugin (see below) will also allow the Lightwave user to use the Normal Map image from within Lightwave.
This plugin provides an alternate way to create a Normal Map image. It is used in Layout, along with the Surface Baker shader plugin. There are advantages and disadvantages to using this plugin as opposed to the Modeler NormalMapCreate plugin, so you can try both methods and decide which is the best alternative for you.
In Layout's Surface Editor, add this shader to every surface of the hi-res object on which you want to bake the normals. There is no interface for this plugin, so just adding it to the surfaces is sufficient. Then on one of those surfaces, also add Surface Baker with the following options:
Choose the UV map, resolution and image type (a 24 bit format is best, otherwise as with all other surface baking you'll have to disable the alpha channel when you are ready to use the image)
Render the hi-res object and Surface Baker will save a Normal Map complete with the bumps from the bump channel of the hi-res object. This is one of the advantages of using this plugin, the Normal Map will automatically contain the hi-res bumps without having to create the additional bump map that was necessary if you wanted to include the hi-res bumps into the Normal Map created by the NormalMapCreate plugin.
The major disadvantage of this method is that the map is baked upon the hi-res object's UVmap, rather than the lo-res object's UV map technique that NormalMapCreate uses. If the UV maps of both the lo-res and hi-res objects aren't very different, this isn't a big problem, but is still less precise than Normal Maps created with NormalMapCreate. The differences will be most evident when dealing with extremely low poly objects.
A shader plugin used with Surface Baker in the exact same way as NormalMapColor. The image it creates can be used with the NormalMapCreate Modeler plugin to add the hi-res objects bump channel to the lo-res model's normal map. This one should be applied to all the surfaces of the hi-res model and works in conjunction with Surface Baker to save a grayscale image where each pixel is the bump height value of the hi-res surface.
However, alpha blended layers don't effect the baked bumps! This a problem within Lightwave and the LWShaderAccess data structure available through the plugin SDK. All this shader is doing is reading the LWShaderAccess structure's bumpHeight field, and that value is not being altered by any alpha blended layers. But I've left this plugin in the distribution anyway, since it might be a little easier way to generate a bump map if you aren't using alpha blended layers. If you are using alpha blended layers, use the 5 step diffuse channel baking technique described above in the NormalMapCreate section of this web page.
ATTENTION: See the note below in the download section about the NormalMapShader.p file found in this set of plugins. I guarantee you will want to replace it with TB's NormalMap shader plugin.
This shader will allow you to render the lo-res object using the Normal Map created from the hi-res object with NormalMapCreate or NormalMapColor. After adding the NormalMapShader plugin to one of your lo-res object's surfaces, double clicking on the entry in the shader list brings up the Texture Editor to change the image map settings. You will need to choose the Normal Map image created with either NormalMapCreate or NormalMapColor. You'll also need to select the UV Projection type and the appropriate UVMap.
Once those values are set in the NormalMap Texture Editor, that surface's shader can then be copied and pasted to any other surfaces on your lo-res object that need it. Now just render your lo-res object and it's surface normals should be altered based on the surface normals stored in the Normal Map image.
Downloading the Normal Map plugins
I have only tested these with LW7.5 and LW8, but I don't believe they will work in any versions prior to LW7.5.
Thanks to Basilio Noris (aka dies-irae) there are pdf manuals in 3 languages.
And don't forget, Jerry Jang has translated this information into Chinese and made it available in his tutorials section:
Thanks very much dies-irae and Jerry, for all your work on these documents! And thanks also to David Maas for his gramps object, and Michael Blackbourn for allowing the use of his images in the pdf manuals!
Changes in the 8/8/2003 update
This is just a brief summary of the changes made to the plugins for the Aug. 8, 2003 update. These changes were made based on comments I have seen in various threads on newsgroups, mailing lists, forums, as well as private e-mail messages sent to me about these plugins.
Links to various information about Normal Maps and these plugins
I have been amazed at how much interest these plugins have generated, I thought when I originally released them they would only be of interest to some game developers and some people generating real-time content. However, while looking at my monthly web site logs I discovered many web pages and mailing list/forum discussions about these plugins. I do believe these plugins have generated more interest than any of the other plugins I have released. Here are some links to some general normal map discussions and some that specifically reference these plugins. There is some valuable information and lots of creative examples to be found here:
SimplyLightwave.com video tutorial
SimplyLightwave.com discussion
Amapi 6, ZBrush 1.5 and Lightwave 7.5 demon tutorial
Newtek forum discussion about these plugins
CGTalk discussion about these plugins
CGTalk discussion about creating a normal mapped Fell beast creature
CGTalk discussion about creating game models
CGTalk discussion about Hi-res ZBrush objects
CGTalk discussion about normal mapping applications
Digital Sculpting Forum discussion