Table of contents


       Open last file with THIS LINK.
What this tutorial is started from is a description of normals and their role in shading of solid meshes. By default, shading is the aim of adjusting normals.
       But the normals are also used to generate environment mapping. It's not really hard to adjust normlas for good environment mapping. It's much harder to adjust normals, that the shading AND environment mapping are good-looking BOTH.
       Thus, before adjusting normals, you have to decide what aim are you pursuing.

       Before starting adjusting normals, we have to setup D3D settings properly.
       Open Options\Settings... dialog box and on Direct 3D tab move Shading (Shadows level) slider to the rightmost position. Hit OK to close dialog box.

       Hide all wheels, remaining visible only body object.
       Good shading is when the car is recognizable without textures. To switch displaying of textures off, uncheck the Settings\Textures\Use Textures option in pop-up menu of 3D View. Disable wireframe (uncheck Settings\Shade,Fill\Wireframe\Enable) and Flat-shading (uncheck Settings\Shade,Fill\Flat Shading).
       You will see something like this:


       Before adjusting normals you need to switch OFF automatic normals updating by unchecking Options\Normals\Automatic Update in main menu.

       All normals-adjusting tools are in Surface...\Normals... branch:       

  • Normalize - resets length to 1.0
  • Rotation - rarely used to rotate normals.
  • Scaleing - used to adjust shading. Scales normal length. Used to decrease length and reduce brightness. Since most of games do not pay attention to normals' length - this tool can be used to emulate shading by making normals in cars' lower part shorter.
  • Flip - flips normal direction. Used after mirroring objects.
  • Calculate - default calculation. Equal to Automatic update option.
  • Projection - projects normals out from axis center
  • By Gismo - powerful tool to generate normals for environment mapping. It will be described in last topic of this step.

           Scaleing.
           This tool used to imitate shading by reducing normals' length. I'll illustrate this tool on front gap of BMW.
           Select vertices that belongs to INNER side of the well (in front part of BMW):

    there are 12 vertices there (hit CTRL-A to verify). Switch to SELected mode, choose Surface...\Normals\Scaleing tool and switch to side view. Click and drag mouse left to reduce horizontal length of normals (in current view) and drag mouse down to reduce vertical length of normals. After several "drags" the length can be seriously reduced and inner part became dark:

           This tool is very helpful when adjusting shading. Especially, when you have generated cool environment mapping, you can adjust notmals length to make shading better as well.

           Calculate.
           This tool calculates normals to default and resets normals length.

           Projection.
           VERY IMPORTANT TOOL when creating environment mapping. This tool projects normals out from the axis center.
           For proper understanding how it works, lets enable environment mapping for the car:
  • Enable texture by checkmarking Settings/Textures/[v]Use textures option.
  • Enable environment mapping by checkmarking Settings/Textures/[v]Multiple textures (chrome) option.
  • Enable high-level chrome by checkmarking Settings/Textures/Always high blend (high chrome) option.
    NOTE: "Environment mapping", "chrome" and "textures blending" are the SAME NOTIONS.
  • Open material editor.
  • Choose the lower material in the list (there might be several < default material > lines there). This material should be with texture.
  • Checkmark Reflection Map there and hit on Load Map.. button (on the right from this checkmark).
  • In Textures browser add Environm.bmp file which is located in Files\ folder of this tutorial.
           This file is the following image:

           If you have properly enabled all options in Settings/Textures branch of 3D view's pop-up menu, then the sample material will look like this:

           After you hit OK you will see the car with chrome:

    ... and actually, it's awful.
           Returning to Projecting normals, choose this tool and click on the body in side view.
           The following image illustrates how the normals will be projected:

    the red arrows shows that all normals (I've selected several vertices to show normals) are "projected" out from the axis center.
           At the same time, normals in front view haven't been changed (minimal changes) and still looks, like they were calculated with Calculate tool:

    the red lines shows that normals are not crossed where the axis center is.
           To project normals along three axis at a time you can hold down SHIFT key when clicking on the object. You can click on object again, holding the shift key down. The following image illustrates, that even in front view the normals are projected, while I've clicked in side view:

           At the same time, the chrome became better. But it still has a feature: it extends (becomes larger) on the front and on the rear part and still looks bad. This bad feature of projection can be avoided using combination numeric bar #1 (where value less than 100% can be set), using EXTended mode (not a part of this tutorial) or using powerful By Gismo tool.

           The last thing should be noticed is that all normals-tools can be applied to objects and to vertices.


           This type of normlas-generation is used to reset normals to default and to generate standard normals. This method can be done by single click with Calculate tool and used to generate normals for normal shading of the mesh.
           As for environment mapping - it becomes awful with this method.


           This combination of tools is a real nice alternative to normal shading and nice chroming at a time.
           First, you reset normals to default with Calculate tool.
           Then switch to side view and place axis center near the lower part of doors:

    ...then switch to Front view and choose Projection tool. Click on the object (but don't hold SHIFT key!). If the axis center in the front view was in the middle of the car (not on the left etc.), than you will get what we need:

           As you see, the chrome is nice and shading is also good:


           This method generates normals, like most of Need for speed 4 cars have. I like this method as well as Gismo-method.
           It is concluded in braking the car apart and using projection tool to these parts with different locations of axis center.
           First of all, I introduce you the tool that we haven't used before: Create\Object\Detach. This tool detaches face (or selected faces) from the object into new object. To detach group of faces you follow the steps:

  • Switch object to faces level
  • Deselect all faces
  • Select group of face you want to detach. Be accurate here.
  • Choose Create\Object\Detach tool.
  • Switch to selected mode
  • Click (and drag) to detach selected faces.
  • Enter objects' name.
           The only thing i want you notice is that when detaching - simply click but don't drag the mouse.

           Using this tool, accurately detach cars' hood with front bumper and headlight. Then detach all glasses. Then detach luggage-hood, rear with rear-bumper.
           The following image illustrates the objects you will get:


           Now we shall project normals of these objects and then unite them into one body.
           Switch selected mode off and hide all detached parts.
           Place the axis center in front view in the middle of the car, then in the side view on the level of doors' lower part:

           Choose Projection tool and apply it to this object, holding the SHIFT key down. I'll call this (projection+SHIFT) a "3D-projection" farther.
           Unhide glasses and place the axis center lower than the car and 3D-project normals for the glasses:

           Unhide front and rear parts and 3D-project normals for these parts, placing the axis center, as it's shown on the image:
    and...

           Finally, you get the real cool chroming and average shading:

           It seems, that all Electronic Arts cars in Need for Speed 4 have this time of normals.


           This is an improved Projection normals.

           After projecting the whole car with Projection tool it was noticed that in front and rear parts, the chrome (environment texture) bigger, than in the center of the car:

           This happens because the normals in front and rear parts are, practically, parallel, and this causes fitting a small area of environment texture into front and rear parts:

           During some experiments it was noticed, that the best chroming is achieved when the normals are like on the following image (green):

    ... and the bright red lines show where the axis center should be if we want to project normals this way. As you see, there are a lot of points where the axis center should be - the more vertices, the more different points. But the darker red line shows where all these centers are located in general. So, we need to:

  • Specify the set of points where the axis center can be during projecting normals.
  • Project normals, placing the axis center in one of specified points.
           Specifing the set of points was done by creating an object. This object I call Gismo. As a rule, it's an elliptic object. Vertices of this Gismo-object are the points where the axis center can be. Thus the gismo object should be high-detailed.
           Choosing the point from set is done by the rule:
    it's the closest vertex of gismo object to current vertex of processed object.

           To generate Gismo normals for the car follow the steps:
  • Choose Create\Spline\N-Gon and switch to top view.
  • Create very detailed N-Gon (30-100 steps) which fits the bright red area.
           But spline is not an object, while we need an object for the gismo.
           To create an object from this spline, you can use Create\Surface\Revolution in front view, but I used Create\Surface\FillSpline and clicked on the spline. This tool fills the spline with a faces, producing an object:

           Rescale it horizontally, that it lloks like this:

    ... and move it to the lower part of doors:

  • Create a gismo object. (just done).
  • Hide all the objects, leaving visible only gismo-object.
  • Choose tool: Surface\Normals\Gismo (cars' body will turn gray (disabled)). It means, that this object is currently selected as Gismo-Object. Switch to side view, zoom closer and, holding CTRL key down, click on Gismo-object. It will turn gray.
  • Holding SHIFT key down (for 3D projection) click on cars' body. It will receive Gismo normals
  • Delete gismo if it's not necessary, or adjust it and apply Gismo-normals again.

           Well, the gismo normals looks like Calculate and Projection, but this tool is way better, since you can modify gismo to generate custom normals. For the instance, the gismo can be rotated a bit in the side view and chroming will look like this:


           You can combine all the normals-generation tools, apply them to objects parts or even to small group of vertices - all approaches are good in achieving realistic chroming and shading.


           After you have generated perfect environment mapping you can adjust shading a bit. This can only be done with Surface\Normals\Scaleing tool. You can accurately adjust normals length to imitate wells and for other reasons.
           You can also adjust normals direction (a bit only, since it changes environment mapping) with a Surface\Normals\Rotation tool. For the instance, the normals on a raised part of the hood can be rotated (a bit) and it will imitate convexity:


           Yeah, it's cool as hell. The file is
    HERE.
           The normals were gismo-generated, glasses were detached and projected as before, the hoods' convexity was done with rotation tool. Enjoy!


  • Table of contents