Page 1 of 12

Cryengine Converter tool (cgf-exporter)

Posted: Sun Aug 02, 2015 4:53 am
by Markemp
Cryengine Converter

Project Location: or
Current version: 1.2.0
Executable: ... /releases/

Change log:
07/04/2021: 1.2.0 release. Upgrade framework to .Net 5.0 (big performance gains!). Deconflicts Hunt (and similar versions) and Star Citizen.
06/12/2021: 1.1.1 release. Support for Hunt models.
01/24/2021: 1.0.8 release. Support for Sonic Boom, ArcheAge, and (some) Star Citizen #ivo files
12/20/2020: 1.0.7 release. (There was a 1.0.6, but forgot to record it). Works with Crucible game files now.
04/21/2020: 1.0.5 release. Fixed rotation issues.
12/30/2019: 1.0.4 release. Fixed material handling and a ton of bug fixes.
10/07/2017: 1.0 release. Full Collada support. Support for Armature/rig with vertex weights. Support for Star Citizen 2.6 files (and earlier).
12/17/2015: 0.84 released. Most of the exploded geometry issues fixed (Thanks, Coffee!!)

Introducing a tool designed to convert modern Cryengine games into .dae and .obj files.

This program is written in C#, and although I haven't done any performance enhancements yet it is still pretty fast. You can script it up with Powershell to batch process a number of .cgf and .cga files at once. There is also an Cryengine Importer Blender add-on I've written that assists bringing in Cryengine files into Blender, creating the proper material Node Groups, etc.


Copy cgf-converter.exe to the path (for convenience, unless you want to reference the location each time you run it). Then follow the usage details below:

cgf-converter [-usage] | <.cgf file> [-outputfile <output file>] [-objectdir <ObjectDir>] [-obj] [-blend] [-dae] [-smooth] [-throw]

-usage: Prints out the usage statement

<.cgf file>: The name of the .cgf, .cga or .skin file to process
-outputfile: The name of the file to write the output. Default is [root].obj
-noconflict: Use non-conflicting naming scheme (<cgf File>_out.obj)
-allowconflict: Allows conflicts in .mtl file name
-objectdir: The name where the base Objects directory is located. Used to read mtl file
Defaults to current directory.
-dae: Export Collada format files (Default)
-blend: Export Blender format files (Not Implemented)
-fbx: Export FBX format files (Not Implemented)
-smooth: Smooth Faces
-group: Group meshes into single model

-throw: Throw Exceptions to installed debugger

Bug Reporting:

Please add a new Issue at the GitHub page:

Future enhancements:

Games currently tested against:
Star Citizen (through 3.12)
MechWarrior Online
Armored Warfare
Ghost Sniper 3
Sonic Boom
(Not Aion. That is Unreal engine)

If you'd like to participate in the future development of this tool, please send me a message or just contribute to the Github. Thanks!

Special thanks to shakotay2 for helping sort out some format issues.
Special thanks to Coffee for making me not stupid about transform matrices.
Special thanks to th3st0rmtr00p3r (James) for helping solve the final object rotation issue that's been plaguing me for years!

Re: Cryengine Export tool (cgf-exporter)

Posted: Sun Aug 02, 2015 4:54 am
by Markemp
Cryengine Importer!

This replaces the 2 powershell scripts Asset Importer and Mech Importer. It's been consolidated into a Blender add-on, written in python, and a new Prefab Importer feature has been added.

You can find this new tool at:

The tutorial video on how to use it can be found at:

It's been tested heavily for MechWarrior Online. It probably doesn't work for 2.3 or newer Star Citizen files, but I'll be working on updating it to handle those game files as well. The Cryengine Converter tool does work for Star Citizen 3.0 files though!

Re: Cryengine Export tool (cgf-exporter)

Posted: Sat Aug 29, 2015 5:24 pm
by Markemp
Ok, I fixed the dreaded exploded geometry issue for Cryengine files! It turns out to be several factors:

(@revelation, if you want the code specifics for your cryengine_cgf.dll for Noesis, I'll be happy to share them with you)

1) The transform vector is in 2 places. A Vector3 called Transform, and then a 4x4 matrix where the bottom row was the same value. However occasionally the Transform vector didn't have any data, so you always had to use the matrix for this info.

2) The values needed to be divided by 100. Why? I have no idea. They just do.

3) The transform of any piece was based on where its parent was placed. So if you had an item that was 4 deep in the hierarchy, you had to add the transforms of *each* of the parents, all the way to the root node.

Anyway, between that and bug fixes (still in progress), shit be working yo!


Well.. mostly. There are still some pieces that aren't playing nicely, but the vast majority do. I'll sort them out eventually.

Bonus: These should work with Armored Warfare game files too, if you want some juicy tank models!

Caveat: Cryengine has gone away from the .dds files containing all the mipmaps, and instead now creates a separate dds file with a numerical extension for each level (dds.1, dds.2, dds.etc), along with what is probably an index file. No big deal, as the format is known and I can incorporate this into my program eventually. And tools already exist to convert them.

As always, anyone who wants to participate in my github and help develop the program, your help is definitely appreciated! My next goals are armatures, animation files (.caf), and exporting directly to Blender files (.blend).

Re: Cryengine Export tool (cgf-exporter)

Posted: Thu Sep 03, 2015 4:00 am
by revelation
i have been following the work you have been doing. parts of my plugin were cross referenced against pyffi as well. doing some major cleanup on all my plugins. will see if i can contribute to your work when i can make some time. will be good to get all of the features sorted out for supporting this engine and its formats.

Re: Cryengine Export tool (cgf-exporter)

Posted: Wed Sep 16, 2015 6:52 am
by erik945
Thank you for your work!
What news about position/rotation submeshes?
I watch your sources - you use only transform matrix44 only for positions submeshes (without rotations), but class ChunkNode has Pos and Rot properties but don't use it - what is it?

Re: Cryengine Export tool (cgf-exporter)

Posted: Mon Oct 05, 2015 3:01 pm
by Markemp
erik945 wrote:Thank you for your work!
What news about position/rotation submeshes?
I watch your sources - you use only transform matrix44 only for positions submeshes (without rotations), but class ChunkNode has Pos and Rot properties but don't use it - what is it?
Crap, was on vacation when you asked this.

From my understanding: The Node chunk is where the scale/rot/transform info is stored for each "object". Each Node chunk has one Mesh chunk. Each Mesh chunk can have multiple Submesh chunks, which contain the actual vertex info.

There is a parent Node chunk that all other Nodes are based off of. And Nodes can have children as well, so think of a tree structure. Parent Node, its children, and the children of those children, etc. And the transform of each Node is based off of the transform of its parent, all the way to the Root. So to calculate the actual transform of any particular Node, you have to add it to all the ones all the way to the Root.

Code: Select all

        public Vector3 GetTransform(ChunkNode chunkNode, Vector3 transform)        //  Calculate the transform of a node by getting parent's transform.
            float x = chunkNode.Transform.m41 / 100;
            float y = chunkNode.Transform.m42 / 100;
            float z = chunkNode.Transform.m43 / 100;
            // if we're at the parent, we just want to return.  Otherwise we want to go up to the next level.
            // Matrix math here.  final x is x*m11 + y*m12 + z*m13.  Same for y and z
            if (chunkNode.Parent != 0xFFFFFFFF)
                transform.x += x * chunkNode.Transform.m11 + y * chunkNode.Transform.m12 + z * chunkNode.Transform.m13;
                transform.y += x * chunkNode.Transform.m21 + y * chunkNode.Transform.m22 + z * chunkNode.Transform.m23;
                transform.z += x * chunkNode.Transform.m31 + y * chunkNode.Transform.m32 + z * chunkNode.Transform.m33;

                transform = GetTransform((ChunkNode)ChunkDictionary[chunkNode.Parent], transform);

            return transform;
This should actually calculate the rotation as well, but it's probably wrong which is why I'm having problems right now. The hatch picture (round thing on front starboard side) is in the right location (at least the parent node), but some of the internal structure (children of it) aren't. That's without applying the rotation component. When I apply the rotation, all the subcomponents end up in the right place relative to each other, but the parent node ends up on the wrong side of the ship, near the back.

There are also some other components that have weird issues, like the hatch covers on the wing fans. The can be located *relatively* close to where they are supposed to be, but just not quite rotated correctly.

Obviously I'm screwing up the calculations some how, but not quite sure what is going wrong yet. I'm *so* close to having this working that it hurts. :(

Re: Cryengine Export tool (cgf-exporter)

Posted: Tue Oct 06, 2015 8:01 pm
by erik945
Thank you for answer.
If you be interested - two problematic models.
In GameSdk displayed normally. ... s.cgf?dl=0 ... _.cga?dl=0

Re: Cryengine Export tool (cgf-exporter)

Posted: Tue Oct 06, 2015 9:09 pm
by Markemp
The mobiglass model did import into Blender without issue, although it did take a while to complete. What error did you get?


I'll take a look at the other one too.

edit: The other one "worked" too, although it's having the normal issues with the position of some child Nodes not being in the right place.


Re: Cryengine Export tool (cgf-exporter)

Posted: Tue Oct 06, 2015 9:51 pm
by erik945
the problem is in the position / rotation of the elements.
In mobiglass lenses are not quite in place (see under blue glass)

Re: Cryengine Export tool (cgf-exporter)

Posted: Tue Oct 06, 2015 9:57 pm
by Markemp
erik945 wrote:the problem is in the position / rotation of the elements.
In mobiglass lenses are not quite in place (see under blue glass)
Oh yeah. A number of models have that issue, since my transform & rotation math isn't right yet. I'm hoping someone can point out where I'm going wrong, otherwise a lot of models are going to require a lot of manual tweaking. :(

Re: Cryengine Export tool (cgf-exporter)

Posted: Tue Oct 27, 2015 3:49 am
by erik945
It seems not work with the new build of ( 1.3)

Re: Cryengine Export tool (cgf-exporter)

Posted: Tue Oct 27, 2015 3:58 am
by Markemp
erik945 wrote:It seems not work with the new build of ( 1.3)
Yup, I've heard there were issues. I'll take a look and see if I can get an updated version for this weekend.

Re: Cryengine Export tool (cgf-exporter)

Posted: Mon Nov 16, 2015 1:07 pm
by erik945
Any news?

Re: Cryengine Export tool (cgf-exporter)

Posted: Tue Nov 17, 2015 2:02 am
by Markemp
Try the dropbox download again. I put my latest version out there (let's call it 0.84 for lack of a better term), where I'm working on cleaning up the export, adding new chunks, etc. No major changes, but it may be a bit more reliable. Let me know what works and what doesn't work (and specifically what didn't work).

Re: Cryengine Export tool (cgf-exporter)

Posted: Thu Nov 19, 2015 11:13 am
by erik945
don't work. Sorry.
Example files: ...
Can you add option's for skip mtl files?
Thank you!