CryEngine 3 Weapon Tutorial

What you will need:


You’ll want to be comfortable with the basics of using your DCC to get data to CryEngine. You should probably know how to model and rig. You should probably also know the basics of keyframe-driven animation. Aside from that you’ll need a couple of basic assets in source-file format.


I used Maya to create these tutorials. I also used the exporter included in CryEngine 3, build 2456 – as I never could get the new improved version to work as intended. I’ve given up on trying to keep things on the right axis, and now use Z-UP and a Left-Handed Coordinate System. (Identical to Max’s settings, and by design CryEngine as well.)

Arms Asset (Out of Scope)

You’ll need a working first person rig. It should be able to export to a CHR file, and that CHR file should be able to interact with the engine nicely. I will not be providing these. If you need to create a set, then I recommend reading my tutorial on the subject. :)
Honestly, what we need here is the joints that the current arm skeleton uses. I tend to create a second copy of my arm source file specifically for dealing with weapons. (What I did was stripped out all the export information, so only the joints and mesh remain… then I move in a weapon and create a new file from the merge.)

Character Asset (Out of Scope)

You can just use the SDK-Agent file. You’ll need this for scaling the weapon against the guy holding the weapon. Chances are good when you build the model, it wasn’t to scale with the character – so we fix the scale (And probably relocate the pivot).

What you will create:

Creating the Weapon Model

This is where we start. We create a simple weapon model. Only one rule – it has to look good. It helps if the model has valid UVs (The Engine will complain less.) And in a production environment, you’ll probably want to apply a decent texture to those UVs. Me, I used a quick solution.

Third Person Weapon Asset

Basically, what we need is to accurately scale our weapon to the character – this includes moving it into position, relocating the pivot point, scaling the model to match the character, moving everything back to origin, and finally setting up the export data.

First Person Weapon Asset

Once we have a model to scale, we’ll create a seperate copy which will become the first person rig. This includes creating a joint heiarchy, binding it to the model, and adjusting the export data to represent a first person weapon.

Writing the Game Scripts

With geometry, we can put it in the engine. But it will not do anything. :\ We need to tell the engine that our new assets are a weapon, and how that weapon behaves. As even a basic implementation is fairly involved, I’ve already done most of the work here. You may have to rename a few things though. And it’s worth noting how phenomenally basic these files are – they achieve the very minimal effect, and nothing more.

Creating our Animation Set

Our scripts call animations that do not exist. This will not break anything, but it’s not functional nor complete yet. We need to create the basic animation set. And get them to the engine. Then we’re finished, we’ll have a weapon entity which we can drag into a level, pick up inside the game and use against the bots. (Or level geometry, w/e works.)

0 0 votes
Article Rating
Inline Feedbacks
View all comments
10 years ago

Hello Rancid1. Thanks god for you. You are the first maya user i found on Oh i forgot Seithcg is maya user too. If you would like to share knowledge and need some help or if i ever needed any help , plz contact me on my email provided , and we can stay in touch via skype , icq or any messenger u wish. Thanks for your tuts.

see you

10 years ago

thank you, very nice work