2. Car geometry

Creating the car's geometry itself in CarCAD is rather inconvenient. So for this it's better to use a proper 3D graphics program. For example, 3D Studio Max R3.1 (that's the one I happened to have ;-). Of course, the art of working with it is a topic that goes far beyond the scope of this guide...but even so it's not all that scary ;-) A sufficiently persistent person will master the basic principles of working in a couple of evenings, together with a, um...teapot and some wise old book like "3DS for Dummies" ;-) All the more so since we don't need to create photorealistic scenes in it.

To keep things simple, let's assume that the car model you can load into 3DS MAX is already available (discs with collections of models are sold, and you can download a huge number of models from the Internet, at least from http://www.3dcafe.com/, and get useful advice on working with the programs – say, at http://www.render.ru/) If you want to create something of your own – no problem either, grab some blueprints and go...a rough approach is described in Atam's tutorial – manually, point by point, face by face...at least doing it in MAX is much more convenient than in CarCAD. By the way, it'll even turn out better ;-)

But, as I said, to start with let's take an already finished model. For example, I downloaded from http://www.3dcafe.com/ this "Ford Explorer" model.


Now we need to prepare it for conversion. The thing is, this is a model for professional "photorealistic" rendering, and it has lots of details that are unnecessary for our purpose. Diligent designers draw everything – radiator grilles, fuel filler caps, a steering wheel wrapped in multicolored wires... ;-) No, I'm not saying that's bad, it's great, but still... the model may end up containing up to several tens (or hundreds) of thousands of triangles. If you try to stuff that into the game (and if it doesn't choke on such a marvel of technology), it will slow down terribly, which is the last thing we need. So an overly complex model has to be simplified.

(Note: it's quite possible that there are other, more effective ways of simplifying...here I've only described the ones I know myself. Don't shoot the pianist...he plays as best he can ;-)

Another note, for paranoids obsessed with copyright: if the thought of using someone else's work bothers you – don't use it, do everything yourself, nobody is forcing you. If you're a designer and you're offended that your model will be "simplified" by someone – what's the problem, don't give your models to anyone, if they need them – they'll find them elsewhere. And in general, I consider objections on this matter unfounded. Want to explain how to sculpt models yourself – write your own guide. ;-)

First you need to turn all geometry objects into ordinary meshes (a mesh is an object defined directly by points and faces in space; there are others too, say, NURBS – lines and surfaces defined by mathematical dependencies; or MAX primitives – for example, a box defined by three sides; however we use meshes) Having selected the whole car, right-click on the selection and choose Collapse selected to mesh.

Then you need to get rid of the groups. (sometimes in MAX objects are combined into so-called groups; they are selected as a single object, although they consist of several) Having selected everything, run the menu command Group/Explode.

Now you need to merge the small parts of the car into large parts. The thing is that any car in NFS4 can consist of no more than 28 parts:
     Body (with high, medium, low and extremely low detail);
     Wheels (front, middle, rear, left, right, high and medium detail);
     Removable roof;
     Interior;
     Dashboard;
     Driver without head;
     Driver's head;
     Mirrors (right, left);
     Brake discs (right, left);
     Removable headlights.

Of course, nobody is forcing you to make that many. Usually everything is made only in high detail, without trifles like mirrors and brakes. However, each part must have a unique name. You can't, say, make two parts called "body" – the extra ones simply won't be shown. In my time I was greatly surprised why, out of the whole body, I could only see the left fender ;-)

So, each such part must be a separate mesh. Let's start with the body. Let's pick some part of the body and glue all the others to it. To do this, go to the panel Modify – the modifier list already has Editable Mesh. (if it doesn't, click on Edit Mesh, or, if there's no such button there, on More and there select Edit Mesh)

     Next, in the rollout Selection you need to select the element mode.

     

     And then, by clicking on Attach, click on all the other parts that make up this part (i.e. the body). A window may appear warning about a material conflict. You can answer however you like, the materials won't be needed anyway ;-) The only problem is that undo may not work afterwards...so be careful, don't glue on anything extra. However, you can unglue it back using the button Detach. ;-)

     Here I had to glue together all the parts except the wheels ;-) I'll do the interior later.

  

Here you can also see how many faces the model has – select the mode Faces  and select the whole body. Hmm....4.7 thousand – actually it could have been more. ;-)
     

  

Note: it's not always the case that a model is divided into separate meshes. You often come across 3DS models consisting of a single mesh, where its parts are "elements" of the mesh, or it isn't divided into parts at all. No big deal, with the command Detach from Edit Mesh you can always detach the selected elements (or faces, depending on the mode) into a separate mesh – you'll be asked then to enter a name for it, or into a separate element of the same mesh.

Now you can proceed directly to simplifying. This can be done in two ways.

The first – the modifier Optimize. (if it's not in the list – then More.../Optimize)

The degree of "optimization" can be changed with the parameter Face Thresh.      Although how it optimizes is, of course, its own business... ;-)

At the bottom of the panel there is information about how many polygons there were before the operation and how many there are now.

If your car had large "flat" surfaces split into many triangles, this operator can help, but nevertheless...it often turns out rather crooked. ;-)

Since Optimize - a modifier; after you achieve the desired results, don't forget to convert the result to mesh. (right-click on the model/Collapse selected to mesh)

Sometimes (if you loaded not a *.max scene but imported a model *.3ds), it may turn out that Optimize won't work. The problem here is the following – due to strange texturing in the model, each of its faces is considered to stand separately from the others. Look:

Here is a surface of two faces
and here are TWO surfaces of two faces (shifted for clarity, but in reality they coincide and this is not noticeable)

Naturally, such a surface of two separate faces will not be smoothed. Nor optimized.



To fix this, you can use the command Weld.      In Edit Mesh enable the vertex mode , select all the vertices of the object and execute the command Weld selected. This command welds together all selected vertices located at a distance Weld threshold (set nearby) from each other. Thus, with a small threshold coinciding but separated vertices will weld together and the problem is solved.

</td>


Here we smoothly approach another way of simplification – using the same Weld.

Gradually (the key word!) increasing threshold, repeat the command
until we achieve an acceptable result. It must be remembered that Weld
– is a mindless thing ;-), and it may work in such a way that it will be scary to look at. Also
take advantage of the fact that the command acts only on selected vertices.

      

     The hood before the operation and after.

To use this method, much more attention
and manual work is required ;-) In practice, if you set out to get a good result,
it turns into banal manual editing of the mesh, by vertices and faces. We select
two or more vertices that need to be joined, weld them with weldwith a large
threshold.... move the displaced vertices back into place...look in perspective...curse,
press Undo and redo... ;-)

The task is to get a model with a low number of faces, say, around
1000 +/- 500 (maniacs, of course, do fewer, but what the hell...let your
Voodoo5 earn the money invested in it ;-) It is desirable, of course, that
it not differ too much from the original and not be lopsided (this
happens if you act with the same weldwithout thinking...usually
the radiator grilles and similar small but numerous parts suffer.
Actually, the more time you spend and the more careful you are when creating
the car, the better the result will be.)

Remove vertices from large planes, but leave enough in
the area of the curves, otherwise the car will turn out box-like. Remove all small
details that can be done with a texture – fuel caps, trim, door handles,
windshield wipers, radiator grilles (in the latter case the whole grille will need to be
replaced with a plane – do not allow "holes" in the surface)

     
















=>








Well, the body is more or less simplified (909 faces, and that's not the limit...I was too lazy
to bother further ;-)


The wheels can be optimized from these, or new ones can be made with MAX tools...better
to make new ones – much less hassle. You can just take plain cylinders from Create/Standard
Primitives/Cylinder
.j



Or make a more complex wheel – first a profile is drawn from
an ordinary line (spline) Create/Splines/Line, and then with the modifier Lathe
this profile is rotated around the Z axis.

     Well, I'll make ordinary cylinders, except
that I'll make three segments along the length, slightly reduce the ends and move the middle vertices
closer to the ends to create the impression of a "rounded" wheel.


 Now
it remains to make the interior and the driver...in principle, this can be pulled from another
car for NFS, but what's the difference... One plane, three ChamferBox –
seats, and the driver with the steering wheel is made by hand...all of this is mercilessly Optimize-ed...
After 10 minutes of playing with Edit Mesh, Optimize and MeshSmooth
from four cubes and a torus we got this alien ;-)

Now we need to weld the large parts of the interior again in accordance with
the list above... head separately, body separately, the remaining interior
separately.


Well, that's practically all. The most important part – the geometry
of the car – is ready. (this is, of course, relative; I repeat, the more time you
spend on "tuning" and "polishing" each line of the car, the better the
result will be. And the best result will be if you make all the geometry yourself,
from start to finish...but that will be once you've gained a bit of experience ;-)

I hope
you didn't rotate the car itself relative to the coordinate axes? If so –
now rotate it parallel-perpendicular to the axes, since rotating it by
an arbitrary angle afterwards will not work. And finally, export the car
to 3ds format and uncheck preserve texture coordinates, otherwise in
the resulting file all your faces will be split.



       The resulting file will be 50-70
kb in size – it's even pleasant to look at. ;-)



CarCAD guide © Baco, 2001.

Comments

Do you agree with the author? Share your experience or correct us.

Reviews: 0
Sign in  or  sign up  Sign in or sign up to leave a comment.