I'm interesting in converting maps.Do you think this is possible with the script too?

Late respond, but well, I was out:

Its not possible extract maps with the plugging (If you're saying about the world maps) Yet, the plugin it does open almost all the dds.phyre file, which are the texture of the models and even maps.We can only wait till they upgrade the plunging.

Topher on Qhimm forums made an unpacker for Steam version (They use VBF files):http://forums.qhimm.com/index.php?topic ... #msg240957Might help for modding. They use the same file format and structure, therefore a script posted here should work on PC files too. I'm going to see right now.

Got my hands on the Phyre SDK.It seems those .phyre files are exported blob files specified for the corresponding platform.originally imported DAE files are XML, but they get compiled to a proprietary binary format.In the SDK, there is no importer for this or whatsoever.

There are full source, and u actually can do a reverse tool from it.

About .phyre files

Quote:

The PhyreEngine™ runtime requires that all assets are in an optimized format for the target platform. The PhyreEngine™ target format is a .phyre file – this is a binary serialized form of a PhyreEngine™ PCluster object, which is the internal mechanism the PhyreEngine™ game engine uses to cluster together related objects for loading and unloading. This format cannot be directly exported from typical DCC tools, but must be converted from an intermediate format. For typical 3D data, the supported format is COLLADA, and we provide exporters for Maya and MAX. Other COLLADA exporters (including those for other DCC packages) are available, but compatibility is not guaranteed. Other source formats are supported for different types of asset.

For PC .phyre description is much simplier due the most procces already are part of yre graphic's driver.

So, phyre extension basicaly is a part of very complicated occlusion culling system.

For a DDS file u can actually cheat (Didnt tryed yet, but this Workflow should work). So dump a dds with a Untitled Project X from a memory, edit it, and then with that Asset tool, convert it in .phyre. This should work for a textures that didnt attached for a 3D models. Like backgrounds sprites etc

Not sure if there's still any interest in getting out the models for this game on PC, but I made a python script that can extract both the character meshes as objs as well as the DDS textures. I haven't managed to figure out the exact format of these phyre files, so instead the script searches for the faces, vertices, UV maps, and normals by looking for certain markers. While this isn't absolutely foolproof, it's now robust enough to process every character mesh in FFX/FFX-2 without complaining. I haven't looked at every single mesh or texture to verify it, but for every file I have checked, it works correctly (including all the main character low and high poly meshes).

The main script itself is phyre.py. You'll need python 3 to run it (I ran it on 3.5). The basics to run it look like:

That's it. There are some additional keyword arguments you can supply, but they are debugging tools for the most part. The only one that might be of interest is includeNormals for extractMesh(). By default it doesn't export the normals since they're unnecessary, but if you want them just add includeNormals=True to extractMesh().

I've also included my two test wrapper scripts. test_extraction.py is just a simple wrapper for extracting a single model. grab_meshes.py will extract all the models in the chr folder for both games. It'll create about 2GB of data and create some log files from the output, and it takes a couple minutes to run. For both scripts, you'll need to change ffxBaseDir and ffx2BaseDir to your install location. They'll both dump everything into the current working directory.

There are a number of files that it can't process, but these don't appear to have any actual mesh data in them anyway. For FFX the files are c051, k002, k004, k007, k014, k015, k017, k201, k212, k214, k302, k303, k403 and k999. For FFX-2 they're k015, k201, k303, k403, and k999. The script will also give a warning for a random NPC (n174 in FFX, n119 in FFX-2) about the UV maps being out of bounds, but it's for a single tri, and that's actually how it's defined in the .dae.phyre file. The script will still process the file with the warning.

Finally, some caveats. This script is almost certainly only gonna work on the PC port of FFX/FFX-2 HD Remaster. It will definitely fail for the PS3 files due to the difference in endianness, and I'd be shocked if it worked on the PS4 version. I made it specifically for character meshes, and I haven't tested it out on anything outside of chr/. Finally, this is good for extracting meshes only. You're still SOL if you want to modify the meshes for in-game use.

Attachments:

You do not have the required permissions to view the files attached to this post. Register to gain access.

Last edited by dtester1 on Tue Jan 31, 2017 8:33 am, edited 1 time in total.

You could convert it back to COLLADA if you knew the complete file structure. I'm not aware of any tools that can do that though, or else I wouldn't have made my scripts! As for getting bones and other data, I'm not familiar with how they are stored so I wouldn't know what to look for. I really just made the scripts to avoid having to manually create obj files using hex2obj for everything.

There is extra data associated with the vertices that would be easy to extract, but I don't know what it is. After the faces are defined, the rest of the file is a stream of the vertex data, ordered by each submesh. For each submesh with N vertices, the first 3*N floats are the vertex coordinates, the next 3*N floats are the normals, and the next 2*N floats are the UV coordinates. After that, there are x*N floats, but x isn't constant between files, or even always between submeshes within a file. I imagine at least some of this is vertex skinning data, but I don't know what else it may be.

If someone with more knowledge of skeletons and vertex skinning would like to extend my scripts, they are of course welcome to.

Who is online

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum