Jump to content

Weapon Rigging - Author: Laubi / Abjab


Guest Mauler

Recommended Posts

Guest Mauler

How to create a Weapon
Posted on October 15, 2002, by Abjab at the Westwood Forums
Edited, reformated and images added by Läubi on June 4, 2003

image-19-WEAPON_PERSPEKTIVE.JPG [edit: I have reformated the tutorial as well as adding some comments with knowledge that was found out later and
things I have found out myself. Additives are marked with a red `edit` plus a number -Läubi ]

Ok I know allot of you people have been trying to figure out how to create your weapons
so they are correctly positioned and oriented depending on if its viewed in 1st or 3rd person
or if its on the character`s back.

Well I`ll try to make it easy to understand.

First you need 3 individual models for the weapon.
it`s always a good idea to use same name convention WW uses for their models, I`ll use
the auto-rifle weapon for the example.
[edit1: If you do this you can use the reloadanimation and handposition of the WS weapon,
if you do not find a weapon that fits your needed handpostion/reload animation you can create your own

  • Weapon models for 3rd person view are named like this:
    w_rifl.w3d (where rifl is your weapon name)
  • Weapon models for when the gun is on the character`s back are named like this:
    w_rifl_b.w3d
  • Weapon models for 1st person view are named like this:
    f_gm_rifl.w3d
File: w_rifl.gmax/w3d

image-19-W_TOP.JPG

image-19-W_LEFT.JPG

image-19-W_BACK.JPG

3rd person weapon models:

All characters have a "gun bone" that tells renegade which hand does hold the gun.
the weapon`s pivot point is positioned at this "gun bone" position.
In other words, once you have created your weapon mesh, move its pivot where
you want the hand to be.

You fix the style that the character should hold the gun in Level Editor i.e.:
Shoulder: uses both hands (second hand position is set automatically by Renegade)
Pistol: uses one hand etc...
[edit2: This is only autosetup for 3rd Person view! For 1st Person view]

Now the weapon and its pivot needs to be correctly oriented in RenX:

Weapon Orientation:
Viewing from top, the weapon should be pointing to the right, and the top side of the
weapon is facing you.

Pivots Axes:
X is pointing to the front of the gun (right in top view)
Y is pointing to the top side of the gun (pointing at you in top view)
Z is pointing to the right side of the gun (down in top view)

Weapons Bones:
MuzzleA0, A1: position at which bullets are fired, muzzle bones pivots axes
are oriented the same way the weapon`s pivot is.

eject: 
position at which shells exits, its pivot`s Z axis is pointing to the back of the gun
and its pivot`s X or Y determines which way the shell exits (I think X does)
[edit3: As far as I know the eject bone is obsolent for 3rd person view because Renegade do not
show the outcoming clip in 3rd Person view]

Origin: 
use world axes coordinate, positioned a little back of the weapon`s pivot (approximately at elbow`s position)
[edit4: from my experience this affects the position of the elbow if you use an two handed mode like shoulder
in Leveledit as mentioned before.]

If you use a muzzle flash aggregate, link it to the muzzle just like for vehicles.

File: f_gm_rifl.gmax/w3d

image-19-TOP.JPG

image-19-LEFT.JPG

image-19-BACK.JPG

image-19-CLIP_IMAGE.JPG

1st person weapon models:

For 1st person view, you can use the same model, or create a simplified version of it
with details only in the viewable parts of the gun. Also, for 1st person view, you have
to create a magazine mesh for the reload anim.
[edit5: Better use a simpler version of the weapon for 3rd Person view than for 1st Peron view!]

Like for 3rd person view, the weapon`s pivot position determines where the hand
should hold the gun.

Weapon Orientation:
Orientation of the weapon for first person view is different then the 3rd person.
Viewing from top, the weapon should be pointing down, its right side facing you.

Weapon Pivot axes:
X is pointing to the top side of the gun (right in top view)
Y is pointing to the back side of the gun (up in top view)
Z is pointing to the right side of the gun (pointing at you in top view)

Magazine Pivot axes and position:
X is pointing to the right side of the gun (pointing at you in top view)
Y is pointing to the back side of the gun (up in top view)
Z is pointing to the top side of the gun (right in top view)

The pivot of the magazine is positioned at the top of the magazine mesh (pivot`s Z max),
back most of the magazine (pivot`s Y max) and left most of the weapon side (pivot`s X axis).

The magazine mesh itself is positioned wherever you want it to be on the gun.
Name the magazine: f_cm_rifl (where rifl matches your weapon`s name)

Weapons Bones:
MuzzleA0, A1: for 1st person view, muzzle bone uses a different pivot orientation,
X points direction of bullets (down in top view)
Y is pointing to the right side of the gun (pointing at you in top view)
Z is pointing to the top side of the gun (right in top view)

eject:
eject bone`s pivot orientation is also different from 3rd person view,
X should be pointing direction of shells to exit (right, up 45 degree)
Y is pointing to the back side of the weapon (up in top view)
Z is pointing right, down (45 degree)

Origin:
Origin might be determining how far the gun is from the camera, in the auto-rifle
w3d, it is centred to the weapon`s pivot position, aligned with world coordinates.
[edit6: in fact this is the bone that gets attached to the gunbone of the character. How far the weapon is
away from your Character is setup in Leveledit.]

File: w_rifl_b.gmax/w3d

image-19-B_TOP.JPG

image-19-B_ROTATE.JPG

Back weapon models:

This is the model used when on the back of the character, there is no bones for this
model. Only the mesh itself and its origin.

Weapon orientation:
Same orientation of the 3rd person model.

Viewing from top, the weapon should be pointing to the right, and the top side of the
weapon is facing you.

Weapon`s pivot orientation:
Since it is on the character`s back and that the weapon is not straight on the back, the pivot
axes determines the angle of the weapon on the character`s back.

Since this would be hard to explain, here`s the XYZ rotation in absolute world coordinates for
the auto-rifle. To set your weapon`s pivot rotation simply click on the "affect pivot only" in the
hierarchy tab, then right click on the rotate tool and type this in absolute world X,Y,Z:

Weapon`s pivot is centred with the weapon

Origin is positioned at the same point where the hand should hold the gun
in 3rd person view. (weapon`s pivot point of 3rd view model)
Origin using world axes coordinate as always.
[edit7: I dunno what Ajab means with that, but you just need to center the orgin to the weapon.]

  • X: -0.9516
  • Y: -7.6463
  • Z: 7.3055
You can download the files
I used to create the screenshots here.
This is just the standard rifle imported into Gmax, I have corrected just the textures a bit and set the bones so they are not visible after export.
Finish:

Ok that`s it for the RenX part, now all the rest is set in Level Edit, try messing around with
settings until you get the results you wish.
[edit8: You can now start with doing your own handposition and reloadanimation if you want one.]

Hope that helped,
Abjab

[edit9: I hope that too, and I hope my notes help you to better understand this Tutorial.
Have fun with the Tutorial and modding for Renegade]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.