Introducing a new tool designed to convert modern Cryengine games into .dae and .obj files. And eventually export them to , Blender .blend files and maybe even .fbx files if I get suitably motivated.

The current way of accessing modern Cryengine games was to use Noesis (by Mr Adults) with the cryengine_cgf.dll plug-in (by revelation). And this worked decently for most activities, but there were a number of limitations when used against the modern game files:

* Materials weren't referenced properly, so you had to manually create them and assign to the right vertex group (involved a lot of guesswork).* Didn't work with files newer than CE 3.4.* With some objects, the geometry was exploded and each component had to be manually placed.* Didn't recognize .cga files, although you could rename .cgf files to .cga.* The geometry was a bit haphazard, with tons of duplicate vertices.* UV maps weren't normalized.

This new tool 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 asset-importer.ps1 Powershell script I've written that assists bringing in Cryengine files into Blender, creating the proper material Node Groups, etc. That will get uploaded soon as well; more details to follow.

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!

Author:

Markemp [ Sat Aug 29, 2015 5:24 pm ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

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

Author:

revelation [ Thu Sep 03, 2015 4:00 am ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

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.

Author:

erik945 [ Wed Sep 16, 2015 6:52 am ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

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?

Author:

Markemp [ Mon Oct 05, 2015 3:01 pm ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

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.

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.

Author:

erik945 [ Tue Oct 06, 2015 8:01 pm ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

Thank you for answer.If you be interested - two problematic models.In GameSdk displayed normally.

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.

Author:

erik945 [ Tue Oct 06, 2015 9:51 pm ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

the problem is in the position / rotation of the elements.In mobiglass lenses are not quite in place (see under blue glass)

Author:

Markemp [ Tue Oct 06, 2015 9:57 pm ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

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.

Author:

erik945 [ Tue Oct 27, 2015 3:49 am ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

It seems not work with the new build of ( 1.3)

Author:

Markemp [ Tue Oct 27, 2015 3:58 am ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

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.

Author:

erik945 [ Mon Nov 16, 2015 1:07 pm ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

Any news?

Author:

Markemp [ Tue Nov 17, 2015 2:02 am ]

Post subject:

Re: Cryengine Export tool (cgf-exporter)

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