Tutorials
Modeling for PE a quick FAQ by Aldo
Basics of how to draw a model for PE object editor.
I have to assume you know how to use the modeling program of your choice, and
will keep this to a discussion of how the model interacts with Panzer Elite.
I want to draw a tank for PE. What orientation does PE use?
PE models use a standard X,Y,Z coordinate system to define width, length, and
height. X=width, Y=length, and Z=height. Since objects like tanks are
centered on their contact with the ground, the front of the object should face
in a negative Y
direction. This means the farther back on the object you go, the greater the
value for Y.
Why is the origin located in the center of the object?
This is the point PE will use for pivoting the object as it tries to turn to
the left and the right. If this point is off, you will see some rather
odd effect while trying to drive your new tank in the PE world.
Where is the ground located at in the PE world?
The ground has a height (Z value) of zero, so anything you draw with a negative
value of Z will be drawn below ground level.
What scale should I draw in?
Regardless of what program you are using to draw your model, one unit of measurement
should be equal to one millimeter in real life.
What kind of surfaces does PE work with?
PE uses simple 3 and 4 sided flat surfaces known as faces. The points
that define the edges of these surfaces are known as vertexes. Textures
look much nicer on 4 sided faces than 3 sided. PE does not use complex
surfaces like meshes, blocks, or splines.
What is the difference between 3 sided faces and four sided faces?
The main difference is in the ability to apply a texture to it. Think of a texture
as a picture you are going to paste on the side of your object. Since
all your pictures have 4 sides, it stands to reason that the 4 sided will fit
much nicer. More importantly, if you try to fit them to a 3 sided object,
you have to squish the texture to make it fit. During this process the
texture gets distorted and becomes a calculated combination of colors.
Try to avoid 3 sided faces whenever possible. You just can't get a texture
onto them with any kind of detail.
But that makes my object look like it is made from cardboard boxes?
Curved lines are very difficult for a computer to draw. They take a long
time to calculate. And given the fact that textures will not apply properly
to a triangle, we are limited to working with boxes. There is hope though, PE
uses special shading techniques to trick you into thinking you are looking at
a curved surface. Until these shading options are added in the object
editor, your tank will look very boxy. We will go into this in detail
in another FAQ.
How does PE know the difference between a track and a turret?
Objects need to be broken into groups (track, suspension, hull, turret, main
gun, etc.). PE will then have to know what groups are sub groups of another
(main gun is a sub group of the turret) and where these links take place.
This must be done in a program such as 3D Studio Max prior to importing the
model into the PE object editor. Once inside the editor these groups need
to be defined as to what the group is supposed to be. You have to tell
PE that a particular group is supposed to be the main gun of a tank, or an option
that the player has to add in the platoon setup screen. Another advantage
is
you can select faces by group within the editor.
Speaking of add-ons, who do those work?
Add-ons must be on the model before it is imported into the object editor. They
are then defined as an additional option for that tank by an object
attribute.
OK, I built my first object, and I have a problem. When I import the 3DS
model into the editor, none of the parts of the object are in the proper
place.
PE uses the defined pivot point as a reference point for the location for the
entire group. Be sure to use the "reset X" tool after moving the pivot
point.
This is easily overlooked since you do not notice this problem until you
view the model in the editor.
My object looks to be properly aligned, but entire group is missing from the
object.
This is caused by the groups not being properly linked in the 3DS model.
On a tank the hull is the main object. You import the object into the
editor by selecting the group that defines the hull. If any of the other
groups are not linked to the hull or another group that is linked to the hull
(main gun linked to the turret which is linked to the hull), the unlinked group
will not be imported into the editor.
When I view the object in the object editor sections of the object do not display
properly.
There a several possible culprits that can cause this. First off, the
object editor uses software rendering and not your 3D card. Most objects
look
better in the game than they do in the editor. This is not to say all
problems will magically go away once you view the object in the game, but many
problems associated with faces superimposed over the top of the other (Z buffering)
are cured by a good 3D card. I have also notice if there is a large difference
in the sizes of the surfaces, the PE engine gets confused.
What are the other causes of this?
PE calculates the points of a surface in a counter clockwise rotation (it plays
connect the dots). If it notices the surface is laid out in a clockwise
direction, it thinks you are looking at the back side of the surface.
To save precious CPU time, PE does not draw the back side of a surface.
There is an exception to this rule. If you define the surface as a 2 sided
material, PE will draw the surface front and back. If a surface is drawn
incorrectly, it can be "flipped" in the object editor.
But only part of the surface is missing.
This is usually caused by one of two problems with the surface. You already
know PE draws a surface by connecting the corners of a surface. If PE
encounters an edge where it has to change direction to clockwise to connect
part of the surface it will become confused on when to draw that part of the
surface. The second cause is "bent" surfaces. Since the
PE engine only works with flat planes, anytime a surface is not flat part of
it may be "clipped". Think of your surface as a playing card.
If you bend the card in the middle to make it fit, the engine gets confused
on what part of the surface should be drawn based on the viewing angle.
But this surface "moves" inside the object
as I change the view.
This goes back to the Z buffering of the PE engine. Try splitting the
larger of the offending surfaces into smaller pieces.
I see a gap between two surfaces that I know are touching.
Another weakness with the PE engine. If a surface starts along the side
of another surface, you will get a gap. Try to insure all the sides of
your surfaces start and stop at the end point of another surface. This
is one you may have to compromise on. Sometimes the texture dictates the
corner points of a surface.
Any other tips you can think of?
It helps to turn the grid on in the object editor(ctrl+g). The grid shows
you where the editor thinks 0 height, 0 width and 0 elevation for you object
is. This is also the point PE uses for rotating the object. If a
tank is not sitting on top of this point, the tank will not turn properly.
Instead of turning, it will magically rotate around this point. If the
object is above the center of the grid, it will appear to be floating above
the ground(Hmmm,,hovercraft). If your object is below the grid, it will
be buried in the ground (useful for bunkers). To fix this, reset the pivot
point of the objects main group.
Slightly elevating(5mm) the vehicle off of the z=0 plane helps keep the ground
from bleeding through the track.
If your turret does not rotate properly, change the pivot point until it looks
right.
More FAQ's on the way!