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 next 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 ]
Weapons Explained [message #-994061] Sun, 13 October 2002 21:47 Go to previous messageGo to next message
Anonymous
Wow, stellar tutorial.
Weapons Explained [message #-994060] Sun, 13 October 2002 23:58 Go to previous messageGo to next message
Anonymous
Good job with the info abjab, now how about some example w3d files to show how it all fits together?
I mean a complete set with all animations and etc.
Weapons Explained [message #-994059] Mon, 14 October 2002 02:06 Go to previous messageGo to next message
Anonymous
Sweet! Thanks a million.
Weapons Explained [message #-994058] Mon, 14 October 2002 02:30 Go to previous messageGo to next message
Anonymous
No Message Body
Weapons Explained [message #-994057] Mon, 14 October 2002 02:32 Go to previous messageGo to next message
Anonymous
Good Info -- thanks!
Weapons Explained [message #-994056] Mon, 14 October 2002 02:57 Go to previous messageGo to next message
Anonymous
This is good stuff, will help alot [Smile]
Weapons Explained [message #-994055] Mon, 14 October 2002 06:13 Go to previous messageGo to next message
Anonymous
you made it way harder than it is.
Weapons Explained [message #-994054] Mon, 14 October 2002 06:22 Go to previous messageGo to next message
Anonymous
and how did you do it then ?
Weapons Explained [message #-994053] Mon, 14 October 2002 07:07 Go to previous messageGo to next message
Anonymous
gee.... most of us know about that you now... i thought you figered out how to make reloading animation and hand position.
Weapons Explained [message #-994052] Mon, 14 October 2002 10:00 Go to previous messageGo to next message
Anonymous
quote:
Originally posted by Havoc 89:
gee.... most of us know about that you now... i thought you figered out how to make reloading animation and hand position.

Perhaps you need to read again, I've explained the hand position.

And for the reloading animation, it has nothing to do with the weapon, only thing you need
is the magazine correctly named and exported, as I've also explained in there, as for the
animation itself, it's the character that is animated. Settings are made in Level Editor.

[QUOTE]Originally posted by Nodbugger:
you made it way harder than it is.[/QUOTE

ROFL, you're welcome [Roll Eyes]

Abjab

[ October 14, 2002, 17:08: Message edited by: Abjab ]
Weapons Explained [message #-994051] Tue, 15 October 2002 07:21 Go to previous messageGo to next message
Anonymous
I think GM = Gun Mesh, CM = Clip Mesh
Weapons Explained [message #-994050] Tue, 15 October 2002 08:46 Go to previous messageGo to next message
Anonymous
Yeah tought about that, or more likely Gun Model and Clip Model...

Abjab
Weapons Explained [message #-994049] Tue, 15 October 2002 12:22 Go to previous messageGo to next message
Anonymous
quote:
Originally posted by Abjab:
[QUOTE]Originally posted by Havoc 89:
gee.... most of us know about that you now... i thought you figered out how to make reloading animation and hand position.

Perhaps you need to read again, I've explained the hand position.

And for the reloading animation, it has nothing to do with the weapon, only thing you need
is the magazine correctly named and exported, as I've also explained in there, as for the
animation itself, it's the character that is animated. Settings are made in Level Editor.

quote:
Originally posted by Nodbugger:
you made it way harder than it is.[/QUOTE

ROFL, you're welcome [Roll Eyes]

Abjab

really??? well i should read again... maybe i missed some stuff. i guess i was in a hurry.
Weapons Explained [message #-994048] Tue, 15 October 2002 12:58 Go to previous messageGo to next message
Anonymous
Well, if you're still in a hurry, here to save you some time [Wink]

...

quote:
Originally posted by Abjab:
...
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...
...

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

...
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.
Export the magazine mesh with both geometry type (bone transform and geometry).
Name the magazine: f_cm_rifl (where rifl matches your weapon's name)
...

Oops made a mistake: You don't need to check "bone transform" for the clip mesh, I'll edit
the message above to correct it. Also the f_cm_rifl is not exported alone, it's the clip mesh name inside f_gm_rifl.w3d model file.

Abjab
Weapons Explained [message #-994047] Tue, 15 October 2002 15:13 Go to previous messageGo to next message
Anonymous
avyone have been able to make it work???

because thats really wierd. when i search to make a full animated weapon i found that u need at least 13 files!

xxxx is your weapon name (dunno if its support more than 4 digits)

**************************************************
Hierarchical model files type:
**************************************************

1) f_gm_xxxx.w3d - Gun Model, must have a separate clip model having the name : f_cm_xxxx

2) f_cm_xxxx.w3d - separate clip model for reload animation

*************************************************
Pure animation file type:
*************************************************

This time we use f_ga_xxxx_(action) where GA stand for Gun Animation

1) f_ga_xxxx_enter.w3d - not sure of this one but i think its the one used when u scroll weapons and a weapon appear.

2) f_ga_xxxx_exit.w3d - the opposite of enter animation

3) f_ga_xxxx_fire.w3d - custom firing animation for weapons best examples: Laser chaingun, minigunner...

4) f_ga_xxxx_idle.w3d - dunno....

5) f_ga_xxxx_relod.w3d - not a mistake, its really relod and not reload. Reload animation for gun.

**************************************************
Bone only file type(or more pure animated thing... im not sure):
**************************************************

now, the finals files used for hand animation(ha)(f_ha_xxxx_enter).

1) f_ha_xxxx_enter.w3d

2) f_ha_xxxx_exit.w3d

3) f_ha_xxxx_fire.w3d

4) f_ha_xxxx_idle.w3d

5) f_ha_xxxx_relod.w3d

--------------------------------------------------
Now ill explain a little about the files "use existing bone" of renx when u export.

the f_ga_xxxx_(action) file need the f_gm_xxxx.

the f_ha_xxxx_(action) file need the f_skeleton.w3d (file in always.dat).

I think the f_ga_xxxx_(action) are the same file as f_ha_xxxx_(action) except they have fingers bone included.

i tried to look into f_skeleton.w3d(yes with note pad [Razz] ) and i saw some word about finger1, finger2... bone.
--------------------------------------------------

all i said in this tread may or not be accurate, but looking all weapon of renegade, i think we will get it [Big Grin]

edit: i added some star to make it easier to read [Wink]
edit2: i made a typo about Ga(gun animation), i putted Am instead... dunno why lol, now is fixed, no more typo in this reply [Wink]

[ October 16, 2002, 12:17: Message edited by: Francois ]
Weapons Explained [message #-994046] Wed, 16 October 2002 05:29 Go to previous messageGo to next message
Anonymous
all that stuff seems really complicated. Im glad U people are smart, 'cause I am way to stupid for all that. LOL

Really cool Tutorial. [Big Grin]
Weapons Explained [message #-994045] Wed, 16 October 2002 17:55 Go to previous messageGo to next message
Anonymous
Great work Francois, Have'nt checked those files yet.

I'll try to have a quick look at them if I have time.
I suspect that those f_ga_xxxx files are pure animation using the f_gm_xxxx for skeleton and
f_ha_xxxx are probably using s_a_human skeleton.

Anyway by this weekend some of you will be looking at those w3d, wich will get some real
good tutorial possible [Wink]

see ya
Abjab
Weapons Explained [message #-994044] Wed, 16 October 2002 06:19 Go to previous messageGo to next message
Anonymous
quote:
Originally posted by Francois:
avyone have been able to make it work???

because thats really wierd. when i search to make a full animated weapon i found that u need at least 13 files!

xxxx is your weapon name (dunno if its support more than 4 digits)

**************************************************
Hierarchical model files type:
**************************************************

1) f_gm_xxxx.w3d - Gun Model, must have a separate clip model having the name : f_cm_xxxx

2) f_cm_xxxx.w3d - separate clip model for reload animation

*************************************************
Pure animation file type:
*************************************************

This time we use f_ga_xxxx_(action) where GA stand for Gun Animation

1) f_ga_xxxx_enter.w3d - not sure of this one but i think its the one used when u scroll weapons and a weapon appear.

2) f_ga_xxxx_exit.w3d - the opposite of enter animation

3) f_ga_xxxx_fire.w3d - custom firing animation for weapons best examples: Laser chaingun, minigunner...

4) f_ga_xxxx_idle.w3d - dunno....

5) f_ga_xxxx_relod.w3d - not a mistake, its really relod and not reload. Reload animation for gun.

**************************************************
Bone only file type(or more pure animated thing... im not sure):
**************************************************

now, the finals files used for hand animation(ha)(f_ha_xxxx_enter).

1) f_ha_xxxx_enter.w3d

2) f_ha_xxxx_exit.w3d

3) f_ha_xxxx_fire.w3d

4) f_ha_xxxx_idle.w3d

5) f_ha_xxxx_relod.w3d

--------------------------------------------------
Now ill explain a little about the files "use existing bone" of renx when u export.

the f_ga_xxxx_(action) file need the f_gm_xxxx.

the f_ha_xxxx_(action) file need the f_skeleton.w3d (file in always.dat).

I think the f_ga_xxxx_(action) are the same file as f_ha_xxxx_(action) except they have fingers bone included.

i tried to look into f_skeleton.w3d(yes with note pad [Razz] ) and i saw some word about finger1, finger2... bone.
--------------------------------------------------

all i said in this tread may or not be accurate, but looking all weapon of renegade, i think we will get it [Big Grin]

edit: i added some star to make it easier to read [Wink]
edit2: i made a typo about Ga(gun animation), i putted Am instead... dunno why lol, now is fixed, no more typo in this reply [Wink]

one question that bothers me... in level edit, there are only 3 places to put a w3d file... they are 1st person view, 3rd person view and back model. so then how can that work with 13 files. i know there are supposed to be 13 files i checked with XCC mixer. so then how do you think you get all those file in level edit???

[ October 16, 2002, 13:20: Message edited by: Havoc 89 ]
Weapons Explained [message #-994043] Wed, 16 October 2002 08:10 Go to previous messageGo to next message
Anonymous
well all those 13 file are only for the fisrt person view. with the "xxxx" name i think u only setup the main model, and renegade automaticly load other stuff like reload animation... sound long to do??
nah, just think about it, when the model is done, only remain anim and boning stuff....

posted by Adjab:

I'll try to have a quick look at them if I have time.
I suspect that those f_ga_xxxx files are pure animation using the f_gm_xxxx for skeleton and
f_ha_xxxx are probably using s_a_human skeleton.

Well for the ga stuff yep, just look into the file with notepad u see the currenty file name, and the other file name just near it...

and for the ha, like i said just looking into the file trough notepad u see f_skeleton... dunno if it use the s_a_human... anyway maybe this week or later we will be able to do a complete animated weapon [Smile]

i hope all i said will work (i sure it will work [Wink] )
Weapons Explained [message #-994042] Wed, 16 October 2002 08:35 Go to previous messageGo to next message
Anonymous
quote:
Originally posted by Francois:
Well for the ga stuff yep, just look into the file with notepad u see the currenty file name, and the other file name just near it...

and for the ha, like i said just looking into the file trough notepad u see f_skeleton... dunno if it use the s_a_human... anyway maybe this week or later we will be able to do a complete animated weapon [Smile]


Try WDump instead of notepad... You'll have a better idea of what the names are there for [Wink]

Abjab
Weapons Explained [message #-994041] Wed, 16 October 2002 12:12 Go to previous messageGo to next message
Anonymous
quote:
anyway maybe this week or later we will be able to do a complete animated weapon [Smile]
i hope your rite about that. if we solve weapons then... well, we just figerd out the biggest mystery of renegade, and also the hardest

[ October 17, 2002, 12:32: Message edited by: Havoc 89 ]
Weapons Explained [message #-994040] Mon, 28 October 2002 06:13 Go to previous messageGo to next message
Anonymous
so did anyone got it working???
Weapons Explained [message #-994039] Mon, 28 October 2002 10:24 Go to previous messageGo to next message
Anonymous
im waiting for a w3d2gmax importer that save stuff to try it out... [Frown]
Weapons Explained [message #-994038] Mon, 28 October 2002 10:38 Go to previous messageGo to previous message
Anonymous
i see... yes that will help out alot.
Previous Topic: What size is/was your scripts.dll?
Next Topic: Respect for fan map makers !
Goto Forum:
  


Current Time: Wed Jul 10 23:40:05 MST 2024

Total time taken to generate the page: 0.00939 seconds