Jump to content

Weapon Rigging


moonsense715

Recommended Posts

Author: Läubi

Skill level: 5

 

 

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 one

for this see the Handposition Tutorial]

  • 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

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 see edit1]

 

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.

 

File: w_rifl.gmax/w3d

image-19-W_TOP.JPGimage-19-W_LEFT.JPGimage-19-W_BACK.JPG

 

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 twohanded mode like shoulder

in Leveledit as mentionted before.]

 

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

 

 

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.

 

File: f_gm_rifl.gmax/w3d

image-19-TOP.JPGimage-19-LEFT.JPGimage-19-BACK.JPGimage-19-CLIP_IMAGE.JPG

 

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.]

 

 

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.

 

File: w_rifl_b.gmax/w3d

image-19-B_TOP.JPGimage-19-B_ROTATE.JPG

 

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:

  • X: -0.9516
  • Y: -7.6463
  • Z: 7.3055
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.]

 

 

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.

For informations see edit1]

 

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]

 

 

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...