Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Weapons Explained
Weapons Explained [message #-994062] Sun, 13 October 2002 21:15 Go to previous message
Anonymous
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.

- 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 (gm proly stands for Gun Mesh or Gun Model, or whatever you prefer [Wink] )

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

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)

Origin: use world axes coordinate, positioned a little back of the weapon's pivot
(approximately at elbow's position)

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.

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)

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.

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

--------------------------------------------------------------------------------

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.

Hope that helped,
Abjab

[ October 15, 2002, 20:09: Message edited by: Abjab ]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What size is/was your scripts.dll?
Next Topic: Respect for fan map makers !
Goto Forum:
  


Current Time: Tue Aug 06 06:40:03 MST 2024

Total time taken to generate the page: 0.01131 seconds