CGF Exporter!Project Location: https://github.com/Markemp/Cryengine-ConverterCurrent version:
0.84Executable: https://dl.dropboxusercontent.com/u/816 ... verter.exe
Change log (last updated 12/17/2015):
12/17/2015: 0.84 released. Most of the exploded geometry issues fixed (Thanks, Coffee!!)
Introducing a new tool designed to convert modern Cryengine games (Cryengine 3.4 and newer) into .obj files! And eventually export them to Collada (.dae), 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.
The .obj files that it creates should have the proper material library referenced (in Cryengine terms; not usable by most .obj importers), with the proper materials assigned to each group.Usage:
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] [-flipUVs]
-usage: Prints out the usage statement
<.cgf file>: Mandatory. The name of the .cgf or .cga file to process
-output file: The name of the file to write the output. Default is <cgf File>.obj. NYI
-objectdir: The name where the base Objects directory is located. Used to read mtl file. Defaults to current directory. USE THIS ARG!!!
-obj|-blend|[-collada|-dae]|-fbx: Export to .obj or .blend format. Can be any. Only -obj implemented right now.
-flipUVs: Flips the UV. Defaults to... true? Whatever Blender likes by default. NYI (Note: Unless I find a use case for this, may not implement)Notes:
[*]-blend doesn't do anything, and -obj is on by default. You can only export to obj format right now.
[*]You can't do anything with armatures. Noesis + cryengine_cgf.dllKnown issues:
[s]* Exploded geometry is still an issue.[/s] FIXED!!
* Not all features implemented (see TODO list).
* No support yet for bones/animation.
* If you put a trailing "/" in the objectdir argument, it will not find the associated .mtl file. For example, use "e:\game\objects" and not "e:\game\objects\".
* Buggy as all get out.Bug Reporting:
For now, please just copy the output of the command prompt, and I may send a debugging version for additional info via PM Future enhancements:
From the TODO file at github:Version 0.9
* .mtl files - convert Cryengine .mtl files to .obj .mtl files, and better mtl file handling. COMPLETE
* Break classes into separate files. IN PROGRESS
* Input validation, error checking, etc. IN PROGRESS (mostly done)
* Move version, id, type and offset so they are read from the chunk table, not the chunks. COMPLETE
* add build version into the output
* Bug fix so some .obj files import properly to Blender (exploded geometry issue) COMPLETE!!!
* Output to a user defined file (default to <object name.obj>)
* Export to Collada (including armature)Version 1.0
* Export directly to .blend files
Games currently tested against:
Star Citizen (pre 0.9 Arena Commander)
Star Citizen (current version as of 8/1/2015)
Special thanks to the creators of the pyffi library at http://sourceforge.net/projects/pyffi/files/
. Without those files I wouldn't have been able to refactor it to work against modern CE games!
If you'd like to participate in the future development of this tool, please send me a message. Thanks!
Special thanks to shakotay2 for helping sort out some format issues.
Special thanks to Coffee for making me not stupid about transform matrices.
You can make the ads go away by registering