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\3D View\D3D Settings... dialog box and move Shading (Shadows level) to maximum. 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 Options\3D View\Textures...\Use Textures option.
       You will see something like this:


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

       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 - heavy 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 gap (in front part of BMW):

    there are 12 vertices there (hit CTRL-A to verify). Switch to SELected mode and 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 it down to reduce vertical length of normals. After several "drags" the length can be seriously reduced and inner part became darker:

           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 Options\3DView\Textures\[v]Use textures option.
  • Enable environment mapping by checkmarking Options\3DView\Textures\[v]Multiple textures (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).
  • Locate the Environm.bmp file in Files\ folder of this tutorial.
           This file is the following image:

           If you have properly enabled all the necessary options in Options/3DView/Textures menu branch, 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 on the front and on the rear part and still looks awfully. This bad feature of projection can be avoided using combination of normals-tools 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.
  • Create\Object\Detach tool.
  • Switch to selected mode
  • Click (and drag) to detach selected faces.
  • Enter objects' name.
           The only to 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, that it's in front view in the middle of the car: on the axis of simmetry. In the side view it should be 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:

           That 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 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 that way. As you might notice, 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.

  • 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.
  • Click and drag to draw an ellipse, that is fitted into bright-red area:

    ... click where the black dot is and, holding left button down, drag the mouse to get an ellipse, like on the following image:

           After you release the button, a dialog will appear where you should type amount of Horizontal Steps : 30-100, as it is prompted on the image. After you hit OK, you will get a spline with 30-100 vertices in it.
           But splines is not the object, while we need an object for gismo.
           To create an object from 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 now, 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 gaps 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 was gismo-generated, glasses were detached and projected as before, the hoods' convexity was done with rotation tool. Enjoy!


  • Table of contents