XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Aug 22, 2017 6:34 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 1609 posts ]  Go to page Previous  1 ... 104, 105, 106, 107, 108  Next
Author Message
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Mon Apr 10, 2017 6:49 am 
Offline
advanced

Joined: Sat Apr 09, 2016 5:36 pm
Posts: 72
Has thanked: 4 times
Have thanks: 13 times














You can make the ads go away by registering

GHzGangster wrote:
unknown123 wrote:
...

PS3 stuff


So that's where MGO stats came from! I remember googling for it, but when I stumbled upon that site (mgostat.com, was it?) it was already down, so I had no way to contact creators.

Thank you for providing ticket, BobDoleOwndU was trying to do the same to get me a ticket, but he moved onto other projects.
I am having some troubles though, sent you PM with details. Nevermind - game uses only login_id to log on ps3.

PS: if you are still interested in modding the game, you probably should join mgsv modding discord.


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Mon Apr 10, 2017 7:27 am 
Offline
n00b

Joined: Fri Aug 15, 2014 6:00 am
Posts: 18
Has thanked: 3 times
Have thanks: 1 time
unknown123 wrote:
So that's where MGO stats came from! I remember googling for it, but when I stumbled upon that site (mgostat.com, was it?) it was already down, so I had no way to contact creators.

Thank you for providing ticket, BobDoleOwndU was trying to do the same to get me a ticket, but he moved onto other projects.
I am having some troubles though, sent you PM with details. Nevermind - game uses only login_id to log on ps3.

PS: if you are still interested in modding the game, you probably should join mgsv modding discord.

Ah, if you did manage to log in, that's good.

Site was mgo.io, but there wasn't really much activity there.

Not really interesting in modding the game honestly. I was really only interesting in some MGO stuff, but I don't even play that anymore. Haven't touched TPP in a long time either. I'd be happy to help you with the server stuff, though I really didn't do a whole lot for the TPP server.

Also, I'm really busy with MGO2 stuff as well.


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Mon Apr 10, 2017 7:35 am 
Offline
advanced

Joined: Sat Apr 09, 2016 5:36 pm
Posts: 72
Has thanked: 4 times
Have thanks: 13 times
GHzGangster wrote:
I'd be happy to help you with the server stuff, though I really didn't do a whole lot for the TPP server.


Best thing you can do is to opensource your scripts which pull data for mgo (without any private data ofc). This will give people a way to resurrect your site (which is always nice).
TPP has a lot of data and I don't have time to work on both TPP and MGO; you will save me some time by opensourcing your scripts.

And btw, how did you dump keys from ps3? MITM attack with ssl cert replacement, like I did?


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Mon Apr 10, 2017 3:51 pm 
Offline
n00b

Joined: Fri Aug 15, 2014 6:00 am
Posts: 18
Has thanked: 3 times
Have thanks: 1 time
unknown123 wrote:
Best thing you can do is to opensource your scripts which pull data for mgo (without any private data ofc). This will give people a way to resurrect your site (which is always nice).
TPP has a lot of data and I don't have time to work on both TPP and MGO; you will save me some time by opensourcing your scripts.

And btw, how did you dump keys from ps3? MITM attack with ssl cert replacement, like I did?

I didn't dump keys actually. I changed the SSL verification callback in the game to accept any certificate. Then I just talked to my server, and my server proxied requests to the main server.

I will probably open-source that stuff now, yeah. It's a bit messy, but someone else can figure that out. Just need to figure out what is really needed though.


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Sat May 06, 2017 6:04 pm 
Offline
ultra-n00b

Joined: Thu Oct 29, 2015 9:23 pm
Posts: 8
Has thanked: 0 time
Have thanks: 5 times
So I got my hands on the terrain shader, and after studying it, I've figured out exactly what parameters it takes. This should making deciphering the htres a lot easier.

The texture maps it consumes:
WorldTexture
SrmTexture
NormalTexture
AlbedoTexture
MaterialIndicesTexture
MaterialSelectMapTexture
TileMapTexture

HeightMapTexture

The bolded ones are the new discoveries. The first few are all normal ftx texture that are assigned in the terrain's fox2. The heightmap we already knew was encoded in the htre, but I don't know anything about where the bolded ones are. My guess is that they're somewhere in the htre. The MaterialIndicesTexture is probably what the htre calls materialIDs. I'm guessing it specifies what terrain materials go where.

The heightmap is read as a float in the shader, so that confirms that the height is encoded in a 32-bit format. Interestingly, MaterialIndices, MaterialSelectMap, MaterialWeightMap, and TileMap are each read in as half4's, so they're probably encoded in a 16-bit format. For MaterialIndicesMap and the heightmap, only the r channel of the texture is read, so each value is probably only stored as one channel (makes sense for the heightmap, no idea what that says about the material IDs, though). Interestingly, though, the others seem to use four channels, so I'd expect to see them encoded as a 16-bit RGBA. That should help a lot in tracking the data down.

Here's a snippet from the shader that shows how the maps are used:

Code:
float4       materialAndWeight = (float4( materialLists * 1.0h/256.0h ) + float4( floor( materialWeights * 256.0h ) ));

   
   materialAndWeight.xy = materialAndWeight.x > materialAndWeight.y ? materialAndWeight.xy : materialAndWeight.yx ;
   materialAndWeight.zw = materialAndWeight.z > materialAndWeight.w ? materialAndWeight.zw : materialAndWeight.wz ;
   
   materialAndWeight.xz = materialAndWeight.x > materialAndWeight.z ? materialAndWeight.xz : materialAndWeight.zx ;
   materialAndWeight.yw = materialAndWeight.y > materialAndWeight.w ? materialAndWeight.yw : materialAndWeight.wy ;
   
   materialAndWeight.yz = materialAndWeight.y > materialAndWeight.z ? materialAndWeight.yz : materialAndWeight.zy ;

   outMaterialIndex = (half4)frac( materialAndWeight ) * 256.0h ;
   outMaterialWeight = (half4)floor( materialAndWeight ) / 256.0h ;

   half2   materialSelectTableUvParam = half2( 1.0h/16.0h, 0.5h/16.0h );
   half2   materialSelectTableUv = half2( outMaterialIndex.x * materialSelectTableUvParam.x + materialSelectTableUvParam.y, 0 );
   outTopMaterialIndex = (half)TFetch2DH( inMaterialIndicesTexture, SamplerPoint, materialSelectTableUv ).x ;


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Sun May 07, 2017 9:44 pm 
Offline
ultra-n00b

Joined: Thu Oct 29, 2015 9:23 pm
Posts: 8
Has thanked: 0 time
Have thanks: 5 times
I think I've mostly decoded the lba format. My thinking was that it was probably just a binary form of the TransformEntitys from the fox2's. I used TppLandingZone.lua to find the name of a random locator and get some coordinates to compare against (check OverwriteBuddyVehiclePosForALZ() in that file). sovietBase_aacr001 has the locator name of afgh_antn006_gim_n0000|srt_afgh_antn006, also defined in afgh_sovietBase_asset.fox2. I found that, after the header, the first four values were -2147.00024, 441.305634, -1511.29321, 3.113926e-39, which was very close to -2006.886,425.727,-1127.261, the vehicle drop point for that LZ as defined in TppLandingZone.lua.

Here's an 010 Editor header to parse the lba files. I ran it on a few files and it looked good, but it's my first attempt at making one:

Code:
//------------------------------------------------
//--- 010 Editor v7.0.2 Binary Template
//
//      File: *.lba
//   Authors: youarebritish
//   Version: 1.0
//------------------------------------------------
LittleEndian();

struct Lba {
    struct Header {
       int numLocators;
        int unknown1;
        int unknown2;
        int unknown3;
    } header;
   
    struct Locator
    {
        struct Vector3
        {
            float x;
            float y;
            float z;
            float w;
        } transform_translation;
        struct Quat
        {
            float x;
            float y;
            float z;
            float w;
        } transform_rotation_quat;
        uint locatorName;
        uint unknown4;
    } locator[file.header.numLocators];
} file;


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Mon May 08, 2017 4:35 pm 
Offline
ultra-n00b

Joined: Thu Feb 04, 2016 7:24 pm
Posts: 9
Has thanked: 0 time
Have thanks: 0 time
How did you get the terrain shader? are the other shaders accessible too? I would like to write a max/maya shader that emulates tpp rendering.


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Mon May 08, 2017 4:59 pm 
Offline
advanced

Joined: Thu Dec 24, 2015 7:45 am
Posts: 65
Has thanked: 10 times
Have thanks: 8 times
redspike474 wrote:
How did you get the terrain shader? are the other shaders accessible too? I would like to write a max/maya shader that emulates tpp rendering.

You need to xor the .fsop files located in data1\shaders\dx11 by 0x9C. This will give you the source code.


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Mon May 08, 2017 9:57 pm 
Offline
ultra-n00b

Joined: Thu Feb 04, 2016 7:24 pm
Posts: 9
Has thanked: 0 time
Have thanks: 0 time
Could you post them or PM me them ? Im pretty sure when I last looked into it there wasnt full shader source... just bits.


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Wed May 10, 2017 4:51 am 
Offline
ultra-n00b

Joined: Thu Oct 29, 2015 9:23 pm
Posts: 8
Has thanked: 0 time
Have thanks: 5 times
Managed to extract (what I think is) a splatmap from an htre. The big block of data after the heightmap is an RGBA texture encoded as ubytes. I'm not sure which terrain input texture this corresponds to, although my guess would be that it's the MaterialWeightMapTexture, as the sum of all values in a given pixel is 255. It has the same weird interleaving appearance as the heightmap. No idea what's causing that.

We still haven't located the following terrain tile textures:
-MaterialIndicesTexture (only R channel is used, so probably a greyscale texture).
-TileMapTexture (RGB)
-MaterialSelectMapTexture (probably RGBA)


Attachments:


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



Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Sat May 13, 2017 2:15 am 
Offline
ultra-n00b

Joined: Thu Oct 29, 2015 9:23 pm
Posts: 8
Has thanked: 0 time
Have thanks: 5 times
I've got a revised version of the .lba template. This one works on three of the four .lba formats I've found so far. The fourth format is completely different from the others and I haven't been able to make sense of it yet. Luckily, I've only found two examples of this fourth type so far (one being mafr_drum001.lba).

Code:
//------------------------------------------------
//--- 010 Editor v7.0.2 Binary Template
//
//      File: *.lba
//   Authors: youarebritish
//   Version: 2.0
//------------------------------------------------
LittleEndian();

//------------------------------------------------
// Struct definitions
//------------------------------------------------
enum <uint> Format { TYPE_0 = 0, TYPE_2 = 2, TYPE_3 = 3, TYPE_UNKNOWN };

struct Vector4
{
    float x;
    float y;
    float z;
    float w;
};
//------------------------------------------------
// File format
//------------------------------------------------
struct LbaFile
{
    struct Header
    {
        uint numLocators;
        Format format;
        double empty <hidden=true>;
    } header;

    if (header.format == TYPE_0)
    {
        struct LocatorType0
        {
            Vector4 translation;
            Vector4 rotation;
        } locators[header.numLocators];
    }

    else if (header.format == TYPE_2)
    {
        struct LocatorType2
        {
            Vector4 translation;
            Vector4 rotation;
        } locators[header.numLocators];
        struct LocatorType2Metadata
        {
            uint locatorName;
            uint dataSet;
        } metadata[header.numLocators];
    }

    else if (header.format == TYPE_3)
    {
        struct LocatorType3
        {
            Vector4 translation;
            Vector4 rotation;
            uint unknown30;
            uint unknown31;
            uint unknown32;
            uint unknown33;
        } locators[header.numLocators];
        struct LocatorType3Metadata
        {
            uint unknown34;
            uint unknown35;
        } metadata[header.numLocators];
    }
} file;


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Tue May 23, 2017 2:36 am 
Offline
ultra-n00b

Joined: Thu Oct 29, 2015 9:23 pm
Posts: 8
Has thanked: 0 time
Have thanks: 5 times
I've started on deciphering the .frt route files. I've identified most of the data, but the relationships between them still aren't clear. For instance, I don't know how nodes and edges are mapped to events, or how exactly the route is traversed.

An frt file contains a list of hashed route IDs, a list of vector3 node locations, a list of what I think are edges in the node graph, and a list of route events, which have an event type and parameters.

Here's my current template:
Code:
//------------------------------------------------
//--- 010 Editor v7.0.2 Binary Template
//
//      File: frt.bt
//   Authors: youarebritish
//   Version: 0.1
//------------------------------------------------
LittleEndian();
struct Header
{
    char ROUT[4] <hidden = true>;
    short unknown1 <hidden = true>;
    short routeIdCount;
    int unknown2 <hidden = true>;
    int unknown3;
} header;

int routeNodesAddress <hidden = true>;
int routeEdgesAddress <hidden = true>;
int rouseNodeEventsAddress <hidden = true>;

uint routeIds[header.routeIdCount];

struct UnknownStruct
{
    int unknown4a;
    int unknown4b;
    int unknown4c;
    int unknown4d;
} unknown4[header.routeIdCount];

struct RouteNode
{
    float x;
    float y;
    float z;
} routeNodes[(routeEdgesAddress - routeNodesAddress)/sizeof(RouteNode)];

struct RouteEdge
{
    ushort from;
    ushort to;
} routeEdges[(rouseNodeEventsAddress - routeEdgesAddress)/sizeof(RouteEdge)];

struct RouteNodeEvent
{
    uint type;
   uint params[11];
} routeNodeEvents[(FileSize() - rouseNodeEventsAddress)/sizeof(RouteNodeEvent)];


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Tue Aug 01, 2017 7:17 pm 
Offline
ultra-n00b

Joined: Tue Dec 13, 2016 4:59 am
Posts: 6
Has thanked: 1 time
Have thanks: 0 time
Hey there, looking to see if anyone can help me out with this FTEX file. It's quite a few KBs large, but when I convert it with FtexTool it ends up 1KB and completely black. Does anyone know why this might happen?

Image
Image


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Tue Aug 01, 2017 9:01 pm 
Offline
double-veteran
double-veteran
User avatar

Joined: Thu Oct 22, 2009 10:24 am
Posts: 818
Location: Russia, Siberia
Has thanked: 150 times
Have thanks: 83 times
Can you upload sample?

_________________
Thank you for all you do here
my blog | my forum


Top
 Profile  
 
 Post subject: Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
PostPosted: Tue Aug 01, 2017 9:29 pm 
Offline
ultra-n00b

Joined: Tue Dec 13, 2016 4:59 am
Posts: 6
Has thanked: 1 time
Have thanks: 0 time
Yes, here's a link to all the .FTEXS and .FTEX files for the texture.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1609 posts ]  Go to page Previous  1 ... 104, 105, 106, 107, 108  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group