  __  _   ____   ____                         _____           ___  ___  __ 
 |  \| | |  __| |  __|                       |  ___|         |  _|| _ ||   \
 | \ \ | |  _|  |__  |                       | |___  /\| |/- | |_ |   || | |
 |_|\__| |_|    |____|                       |_____| \/\ |   |___||_|_||___|
-------------------------------------------- Chris' Crazy Car Factory of Fun -
Version 1.42                                                By Chris Barnard
29th December 1999


CarCAD -
A very sketchy, out of date, Users Manual.
I am currently looking for somebody who could make a really good manual for
me. If you'd like to help, email me. It would be useful if you've made a
CarCAD tutorial or something like that in the past that I could take a look
at - I really would like a good manual to replace this old thing.

==============================================================================
 I N T R O D U C T I O N
==========================================================================================

I threw this manual together very quickly for the v1.4 release of CarCAD.
Hopefully, most people with some experience of 3D editors should be able to
use CarCAD without much guidance, except with some of the more 'obscure'
parts of the interface.
Most of the stuff here is just basically an amalgamation of all the
documentation I've written for CarCAD since version 1 - some of which has
been brought up to date.

==============================================================================
 C O N T E N T S
==============================================================================
 Here are the sections currently in the manual - they should be pretty easy
 to find:

 GETTING STARTED
   Requirements
   Getting the program running
   Part Editor
   Vertex Editor
   Dummy Editor
 MENU OPTIONS
 THE EDITING WINDOW
   Adding/Removing vertices and triangles
   The UV Remapper
 LOADING 3DS FILES
 NOTES
 KNOWN BUGS/ISSUES


==============================================================================
 G E T T I N G  S T A R T E D
==============================================================================

  You'll need the following files to get CarCAD running:

     - MSVBVM50.DLL run-time library.
     - COMDLG32.OCX

  These are available at my homepage, 'www.nfscheats.com/editor', under the
  downloads section.
  To get the DirectX 3D view working, you'll need DirectX 6 installed. If
  you get a 'Run-Time Error 13' (or something like that), then CarCAD doesn't
  like your version of DirectX. Anything older than DirectX 6 will NOT work.

Getting the program running
===========================

  The program should be fairly self-explanatory.

    - Extract an '.FCE' file from a suitable car 'VIV' file.
      I would suggest using VIVWizard for this, which is available from

              www.nfscheats.com/nfstoolbox


    - Run the program ('CARCAD.EXE')
    - Load the FCE file (from the File->Open menu)
    - First thing you will see is three views of the car. You can select to
      view each of the viewports available separately by clicking on the
      buttons in the toolbar at the top of the window.
      The buttons have the following meaning

      3D - View the car in 3D (you have to switch the 3D view on before it
           will work)
      XY, ZX, ZY - View the mesh from different sides.
      UV - View the UV (texture map) points for the car.

      If the car has a texture map, it can be extracted from the VIV (its
      usually called 'car00.tga') file and loaded with the 'Load Texture Map'
      menu item under the 'File' menu.
    - You can select different parts of the model using the part list in the
      top-right corner of the window. The currently highlighted part is the
      part under editing. You can see other parts by clicking on the
      checkboxes next to the part names.

Part Editor
===========
    - You can move a part using the 1, 2 and 3 keys - in a similar fashion to
      moving parts with 'mrc' (the cartool program from EA). Each key
      increments the part along a certain axis (1 - X, 2 - Y, 3 - Z) - holding
      down 'shift' moves the part in the opposite direction. I admit, this is
      a bit imprecise and clumsy, but I'll write a better system later.
    - You can switch editing modes with the 'Edit' menu.
    - You can use the plus and minus keys on the numeric keypad to zoom in and
      out at any time.

Vertex Editor
=============
    - The vertex editor displays only one side of the model at a time. Use
      the 1, 2 and 3 keys to change the view between X-Y, Z-X and Z-Y views
      (or the toolbar buttons).
    - You can use the mouse to select vertices. Click over a vertice and it
      should go blue to indicate it is selected. Hold down 'shift' whilst
      clicking to deselect a point. Note that the program will select all
      points within a certain area of the mouse, so you have to be careful
      whilst selecting and moving vertices - you might have selected a vertice
      somewhere else on the car that is obscured by the vertice you are
      selecting. Make sure only the nodes you want to move are selected by
      checking on different views (although this doesn't always pick up on
      them either - if you are extremely unlucky a node could be hidden by
      unselected vertices lurking on top of the selected node on all views;
      if that made any sense I'm amazed). This can also be an advantage when
      you want to move a vertice on one side of the car and have the same
      thing happen on the other side - it makes sure everything stays
      symmetrical.
    - Don't select too many vertices at one time and try to move them.
      Selecting all the nodes in a complicated object is a big no-no. I've had
      some funny things happen (don't know what's going on, and don't want to
      find out either). You'll notice it takes a long time to move a large
      number of nodes because it has to redraw all the triangles connected to
      each node everytime they move.
    - Oh - use the cursor keys to move selected nodes, or the mouse (click and
      drag).
    - Just in case, when I write 'node', I mean 'vertice' - they are the same
      thing (vertice = node = vertice = point on a polygon). Thought I'd
      better throw that in.
    - You can use the 'D' key to deselect all vertices. It makes sense to do
      this from time to time just to make sure you haven't accidentally left
      vertices selected that you don't know about.
    - Use the 'S' key to invert currently selected vertices - i.e. all
      selected vertices become deselected, all deselected vertices become
      selected. Use with caution - note the bug about moving too many nodes
      at one time.
    - You can use Page Up, Page Down, Home and End to scroll about the screen
    - Note: to edit vertices on different parts, you need to go back to the
      part editor and select the part you want to edit from the part list.
      Then go back to the vertice editor.

Dummy Editor
============
    - Similar to the vertex editor. Use 1, 2 and 3 keys to change views.
    - Select a dummy by clicking on it. Only one dummy can be selected at any
      time. The dummies are the yellow circles and are used for car lights.
    - Use the 'N' key to name a dummy (max. 64 characters).
    - Cursor keys move dummies.
    - You can use Page Up, Page Down, Home and End to scroll about the screen

==============================================================================
 M E N U  O P T I O N S
==============================================================================
Below is a run-down of the all the menu options and what they do.

- File
  - New
      Creates a new FCE file in memory.
  - Open
      Open an FCE file.
  - Save
      Save FCE.
  - Save As
      Save FCE as a new file.
  - Parts
    - Extract Part
        Extract currently selected part from an open FCE file and save to
        a PRT or TXT file.
    - Insert Part
        Insert a PRT or valid TXT file into an open FCE file.
  - Load Texture Map
      Load a TGA or BMP file as the texture map for the current FCE file.
  - Convert 3DS
      Load a 3DS file into CarCAD (see 'Loading 3DS files').
  - Convert 3DS to PRT
      Load a 3DS file and save all objects to PRT files.
  - Export 3DS
      Export current FCE file to 3DS.
  - Exit
      Quit CarCAD.

- Edit
  - Part Editor
      Selects Part editing mode.
  - Vertex Editor
      Selects vertex editing mode.
  - Dummy Editor
      Selects dummy editing mode.
  - Triangle Editor
      Selects triangle editing mode (use for UV remapper).

  - Swap X, Y, Z
    - Swap X Y
        Swap X and Y axes around.
    - Swap X Z
        Swap X and Z axes around.
    - Swap Y Z
        Swap Y and Z axes around.

  - Mirror
    - Mirror X
        Mirror X-axis about centre point.
    - Mirror Y
        Mirror Y-axis about centre point.
    - Mirror Z
        Mirror Z-axis about centre point.

  - Rescale Model
      Rescale mesh by between 1 and 200%.
  - Centre Part
      Move the currently-selected part to the origin.
  - Centre All Parts
      Move all parts collectively to the origin.
  - Copy Part
      Copy one part over another. This can only be used if both parts
      contain the same number of vertices and triangles. For example, if
      you've altered one of the wheels and you want to alter them all.
  - Colours
      Add/Remove primary and secondary colours.

- View
  - Editing Window
      Show/Hide the triangle/vertices editing window at the bottom of the
      screen.
  - Tool Window
      Show/Hide the side-window.

  - 3D View
    - Toggle D3D View On/Off
        Turn the Direct3D view on/off.
    - Toggle Non-D3D View
        Turn the internal wireframe 3D view on/off.
    - Wireframe
        Show the mesh as a wireframe in the Direct3D view.
    - Solid
        Show the model as a solid object in the Direct3D view. The object
        will be texture-mapped if one has been loaded (with the
        'Load Texture Map' menu option).
  - Vertices
      Show/Hide vertices on mesh views.
  - Polygons
      Show/Hide polygons on mesh views.
  - Normals
      Show/Hide normals on mesh view (the normals cannot yet be edited).
  - Dummies
      Show/Hide dummies (light sources) on the mesh view.
  - Maintain Aspect Ratio
      When unchecked, the display is streched so that all vertices fit on
      the screen.

- Tools
  - Reverse Winding Order
      Switches all polygon indexes around (use when the model appears to
      be inside-out when viewed in 3D).
  - Remove Duplicate Polys
      Remove all polygons that are exactly the same (sometimes there might
      be some duplicate polygons in a 3DS file when it is converted).
  - Remove Unneccesary Verts
      I once converted a 3DS file where every triangle was made using
      different vertices, even though the majority of the vertices overlapped
      with other vertices. This function finds all vertices that are in the
      same position and alters all the polygons so that they indexed onto only
      one of the vertices found, deleting the rest.

- Help
  - About


==============================================================================
 T H E  E D I T I N G  W I N D O W
==============================================================================
The editing window can be shown by clicking on the 'View'->'Editing Window'
menu option. The editing window basically allows you to alter coordinate data
and other values for the vertices and triangles in the model, as well as
adding/removing vertices and triangles - and using the 'UV remapper' (more on
that later).

Adding/Removing vertices and triangles
--------------------------------------
    One of the major updates to version 1.3 was vertice and triangle adding/
    removing. The remove functions have not been entirely tested, but they
    appear to work (don't trust them, though). I've included an example file
    of a pickup truck that shows that it does work - it's the '60s pickup
    truck (used for traffic), with a proper back that is sunk in (instead of
    just a flat surface).
    To add points, you need to open the Editing Window (from the 'view' menu)
    Currently, adding this stuff is quite tricky (not for the faint hearted)
    - but it is possible.
    The two buttons in the Editing Window (V and T) select 'V'ertice or
    'T'riangle editing, and are just used to display two different sets of
    editing options. You can select triangles and vertices from this window
    - clicking on different triangle numbers will temporarily highlight the
    triangle selected (you cannot just click on a triangle with the mouse).
    Anyway - adding vertices is pretty simple; just click on the 'Add
    Vertice' button in the 'Vertices' section of the Editing Window.
    Note: The vertices always appear at the centre of the object (0,0,0). If
    you create two vertices on top of each other, you can still move them
    individually by entering values for their X, Y and Z coordinates, or by
    deselecting one of the points, by unchecking the 'Selected' option in
    the editing window (with the correct vertice highlighted)
    ***** ADDING TRIANGLES *****
    This is very rudimentary, but it works.
    First, select three vertices - make sure you ONLY have THREE selected, or
    you won't be allowed to add the triangle. The three vertices you have
    selected will make up the three points for the triangle. Next, select the
    'Triangles' section in the Editing Window (click on the 'T' button), and
    click on the 'Add Poly' button. If all goes well, you will be told which
    vertices are being used to make up your triangle, and the polygon should
    appear. Here comes the CATCH... 3D triangles have a side which is
    visible, and a side which is not (it is see-through on one side).
    The method used to work out which side is visible is defined by the order
    of the vertices. I won't go into details, but basically, there's a 50/50
    chance that the triangle you added won't be visible from the right side.
    DON'T PANIC - if this happens (use the Direct3D view to see), click on
    the 'T' button in the editing window, select the triangle which is facing
    the wrong way, and look at the numbers I1, I2 and I3 - these are the
    indexes for the vertices used to make up the triangle. All you have to do
    to sort out the problem is swap two of the indexes around - it doesn't
    matter which two, just click on the text boxes and enter the values
    manually. If the triangle you are altering has texture map UV values set
    to it, then you'll also need to swap the corresponding values in the
    U1, U2, U3 and V1, V2, V3 fields otherwise the texture map gets shifted
    around oddly.
    Then, don't forget to click the 'Apply' button. The triangle should now
    be facing the right way.
    Catch #2: The texture map (UV) values for each triangle are set to 0 when
    the triangle is created - you will have to enter the UV values manually
    (sorry - this is very tricky and takes a lot of practice). Or, if you
    are creating an entire new texture map from scratch you could use the
    UV remapper.

The UV Remapper
---------------
    There's still some work left to do on the texture remapper, but it mostly
    works - the only main problem is that using the remapper changes ALL the
    texture map coordinates for a particular part, so you can only really use
    it when you are going to create a texture map from scratch.

    It should be *fairly* straightforward to use. Basically, click on
    'Edit'->'Triangle Editor', turn on the editing window 'View'->'Editing
    Window' and click on the 'T' button within the edit window. Maximise the
    CarCAD window, click on the 'UV' button on the right of the 'Triangles'
    frame and you should see a UV Remapper frame to the right of the triangles
    frame.

    The basic use of the UV Remapper is to assign texture map coordinates to
    the polygons in the model. To do this, I've split the texture map area
    up into seven sections, with each section being used to define a different
    view on the car.
    Normally, the sections are split up as follows:
     ___________________________________
    | 1 Side                            |  This is the texture map as I've
    |                                   |  split it up - each section has
    |                                   |  the following meaning:
    |___________________________________|     
    | 4 Front         | 2 Top           |  1 - Shows the side view of the car
    |                 |                 |  2 - Displays the car as seen from 
    |                 |                 |      the top.
    |_________________|                 |  3 - Smaller version of view 2; use
    | 5 Back          |                 |      it for the underside of the car
    |                 |                 |  4 - Use for the front of the car.
    |                 |                 |  5 - Exactly the same as 4, use it
    |_________________|                 |      for the back of the car.
    | 6 Wheel| 3 Chass|                 |  6 - Put the wheel polygons in this
    |        |        |                 |      section.
    |        |--------|                 |  7 - Junk anything else in here.
    |        | 7 Other|                 |
    |________|________|_________________|
                
    You need to assign each polygon to a different section of the texture map
    (sorry - this isn't automatic *yet*). Do this by clicking on the polygons
    (use the dots in the centres of the triangles to find where to click) and
    then selecting which section you want the polygon to appear in from the
    list in the UV Remapper frame (editing window). You can also set multiple
    triangles to a particular section in one go by holding down the mouse
    button on one of the viewports and dragging the cursor to draw out a box.
    When you let go of the mouse button, all the triangles under the box will
    be set to whatever is the currently selected UV section.
    To hide sections from the screen (helpful when you've got a lot of
    polygons on the screen), just click on the relevant checkbox number in the
    UV Remap frame and all polygons assigned to that number will disappear
    (temporarily).
    To save the assignment configuration, click the 'save' button - this'll
    save all the UV section assignments to a file 'XX.UV' (where XX is the
    name of the file you are editing). You'll want to do this so you can load
    the assigned sections back in again later (however, if you add polygons
    after assigning and saving polygon configurations, you'll want to resave).
    When you reckon you've got it all sorted, click on the 'REMAP' button.
    Then, select the UV view.
    If everything's gone according to plan, you should a rather nice texture
    map outline which you can use to build a texture map from scratch.
    The best way to start making a texturemap is to take a screenshot of the
    UV view, load it into a paint package and rescale it to 256x256 (standard
    texturemap width/height) - then start editing with the wireframe as a
    guide. One thing you might like to note is that NFS3 actually allows any
    texture map size that is a multiple of 8 (I think) - so you can have
    512x512 if you want, or 256x512, 128x512, etc, etc. I think this is true,
    but I could be wrong - it definately works if you use 512x512, but the
    TGA files you'll create will be nearly 1 MB in size.

    If you click on the 'Edit' button in the 'UV Remapper' frame, you can
    edit the positions, sizes and properties of the different UV sections.
    You have to type the values into the boxes on the screen, but it should
    be fairly straightforward after a bit of trial-and-error.

==============================================================================
 L O A D I N G  3 D S  F I L E S 
==============================================================================

There are currently two ways that you can load 3DS files, it should be pretty
easy to get to grips with - except with what you should do with the 3DS files
after you've loaded.
You can either load the 3DS file straight into CarCAD to be converted into
an FCE file (using the 'File->Convert 3DS' menu option), or you can convert
each object in the 3DS file into a PRT file ('File->Convert 3DS to PRT').
The reason I've added the second option is because FCE files can only have
16 parts in them, so only the first 16 objects in a 3DS file will get loaded
when you use the 'Convert 3DS' function. Converting to PRT ensures all the
objects in the 3DS file are loaded and available to CarCAD.

Anyway, there are a couple of hints I can give you when you convert a 3DS file
- most of the time, when a 3DS file is loaded, things will initially look
rather screwed up - but you should expect that.

    After converting a 3DS file, the first thing you should do is select
    'Edit'->'Centre All Parts' to centre (yes, that's the english spelling)
    everything to 0,0,0 on the screen - this may not be absolutely necessary,
    but sometimes is.
    Next, if everything's stretched right off the screen in a weird manner,
    switch off the 'maintain aspect ratio' option in the 'View' menu. This'll
    stretch the view to make sure all the vertices are on the screen.
    If you need to do this, it's almost certain that the axis (X, Y, Z) setup
    used by the 3DS file is different to the NFSIII setup. So, you should
    begin by swapping the X, Y, Z axes around. I've found that most of the
    time, the Y and Z axes should be swapped, then the model will be facing
    the right way (sort of). To do this, simply click on the 'Edit'->'Swap X,
    Y, Z'->'Swap Y Z' menu option. If this doesn't work, you can try a bit of
    trial and error, but I'm fairly certain that any 3DS will load correctly,
    it's just you have to know how to interpret what you're seeing on the
    screen (because CarCAD doesn't). If its any help, these are the view
    window orientations that CarCAD uses:
                             __________ __________
                            |3D View   |ZX        |
                            |          |Top       |
                            |__________|__________|
                            |XY        |ZY        |
                            |Front     |Side      |
                            |__________|__________|

    So, basically, if the top of the 3DS model isn't in the top window, then
    you'll have to swap some of the axes around to get it right. The model
    will also have to be facing the right way, otherwise NFS3 will think the
    back of the car is the front, so be sure to check against other models,
    and use the mirror function in the 'Edit' menu.

    Finally, save the file to FCE and exit CarCAD - then load CarCAD up again
    and load in your saved FCE file. Doing this makes sure the FCE file loads
    OK and will make certain that all variables used in CarCAD are totally
    reinitialised. Then, look at the top-left view port (the 3D view) - if the
    3D view is turned off (as it always is when you load CarCAD from scratch),
    the FCE file details should be on screen. Scroll through the list and find
    the X, Y and Z half-sizes for the mesh - if it seems too big (the sizes
    are in metres, and remember they should be doubled for the width, height
    and length of the car), use the rescale function to resize the car. Then
    save and reload (just to make sure).

    One last note - if you find that when you view the FCE file with Direct3D 
    view that the model appears to be inside-out (all the polygons are facing
    the wrong way), then you can attempt to rectify this by clicking on
    'Edit'->'Reverse Winding Order'.


==============================================================================
 N O T E S
==============================================================================

  1. The new 3D wireframe view in CarCAD will eventually be replace by
     Direct3D, but it's useful for quickly viewing the car, and if you can't
     get FCEView to run. One thing to note is that it doesn't display
     perspective correctly - car parts further away from the car don't get
     smaller (as they should do) - this give the optical illusion of making
     the car seem bigger at the back (the point furthest from the screen)
     than at the front - remember that this isn't really the case, so you
     shouldn't go making things smaller because it all looks out of
     proportion.
  2. The TGA loading routines are a bit of a cheat - I made a quick TGA to BMP
     converter, that I use to load a TGA file, save it to a temporary bitmap
     file, and then just load the bitmap file as before (this all happens
     automatically). There shouldn't be any problem with this method, unless
     you are VERY low on disk space (the temporary bitmap is saved to the
     same directory as CarCAD).

==============================================================================
 K N O W N  B U G S / I S S U E S
==============================================================================

- First of all, be VERY CAREFUL when using the program - there are lots of
  things you could do that would cause the program to crash, so just take it
  easy, and make sure you save your car at regular intervals. Oh, and take
  note that there is NO undo function.
- I've had some problems with cars that are created from scratch in CarCAD,
  and also with cars that have had polygons removed or added. They seem to
  work fine in-game, but if you attempt to load them into EA's CarTool, they
  can cause a few problems. Usually, CarTool will load, but if you attempt
  to use the editing modes (such as the vertex and normal editors) - it will
  crash. The only way to sort this out is to keep loading CarTool until it
  doesn't crash - it seems that after a while, the problem clears itself
  (somehow!), so all I can suggest is that you keep trying different editing
  modes, cycling through each option on the CarTool menu, until the program
  doesn't crash anymore.
