Jump to content

Recommended Posts

Example #1 (hide skirt)

ns.thumb.png.75015d60c0e5b9067e62447a33af123c.png

 

Example #2 (swap body model with another one)

swap.thumb.png.1619217b71abba8b638fb646006aa32a.png

 

Prerequisites

---------------------------------------------------------

 

 

1. Hiding some Meshes from a Model

---------------------------------------------------------

 

Unpack CPK file (media/cpk/CharaModel.cpk), you'll get many files like 0000, 0001, ...

CriPakTools.exe CharaModel.cpk ALL

The real filenames are listed in media/afs/CharaModel.als (one filename per one line).

 

In this example, we use Mariana's default costume: mdb_02mar_000_0_S_def_00.fed.
So, rename file 0085 to mdb_02mar_000_0_S_def_00.fed.

 

Load the FED file in Noesis, and find a mesh which you wanna hide.

In this example, we'll hide the skirt mesh.

 

noe01.thumb.png.6720a3a7018b30f262b67d33832af585.png

Then load FED file in hex editor.
Goto faceOffset position (570176), and fill data with zero for 2160 bytes (= the number of faces * 6 bytes).

After editing, reload FED file in Noesis to confirm if it works.

 

Replace FED file in CPK using CriPakTools.

CriPakTools.exe CharaModel.cpk 0085 NEW_FED_FILE OUTPUT_CPK_FILE

Put generated CPK file into ux0:rePatch/TITLE_ID/media/cpk/.
Run the game.
 

2. Swapping Two Models

---------------------------------------------------------

First, replace FED file in CharaModel.cpk with desired one.
In this example, we swap Yuina's default costume with Mariana's swimsuit-H.

CriPakTools.exe CharaModel.cpk 0230 mdb_02mar_007_0_G_swH_00.fed OUTPUT_CPK_FILE

And the second, replace TEX file in CharaTex.cpk with right one.

CriPakTools.exe CharaTex.cpk 0499 mdb_02mar_007_0_G_swH_00.tex OUTPUT_CPK_FILE

HINT: You can get TEX files from CharaTex.cpk using the same method as I mentioned above.

 

 

Link to comment
On 7/22/2018 at 9:33 PM, xperiagenerator said:

awesome

have you found a complete nude model yet?

 

Sadly, not yet.

Every model has holes inside clothes, like the picture below.

We need to find some methods to edit/add mesh for FED file.

model.thumb.jpg.9e1f21c2b954bdd5998fe52251a5470b.jpg

 

Link to comment
On 7/26/2018 at 12:59 AM, xperiagenerator said:

have you searched in the blue ocean version?

Yes, I searched almost all, but it seems that there are no complete nude model, including DLCs.

 

It's possible to edit textures of swimsuits.

But the problem here is that clothes have different reflection color compared to skin, so it looks white.

I guess we need to edit material settings of clothes in FED file.

0001.thumb.png.b20cdc8c78c3b0052da8c1a32fdd4fd5.png

Link to comment
  • 2 weeks later...
  • 3 weeks later...
  • 1 month later...
  • 1 month later...
16 hours ago, DOAX3GLITCHER said:

i can help you

tell me where normals and uv starts

 

contact me in private if posible

 

Thank you for help! ?

Here is the diff to display normal and UV offsets in Noesis.

--- fmt_recolove_fed_ORIGINAL.py
+++ fmt_recolove_fed.py
@@ -10,7 +10,7 @@
     noesis.setHandlerTypeCheck(handle, fedCheckType)
     noesis.setHandlerLoadModel(handle, fedLoadModel)

-    # noesis.logPopup()  # show console
+    noesis.logPopup()  # show console
     return 1


@@ -82,6 +82,7 @@
         _padding(bs)

         normals = []
+        print(" -> normalOffset: %d" % bs.tell())
         for i in range(myMesh["numVert"]):
             x = _getFloat(bs)
             y = _getFloat(bs)
@@ -95,6 +96,7 @@
             _padding(bs)

         uvs = []
+        print(" -> uvOffset: %d" % bs.tell())
         for i in range(myMesh["numVert"]):
             u = _getFloat(bs)
             v = _getFloat(bs) + 1.0

BTW, I couldn't find any "send PM button" on this site, guessing it's because my rank is Junior Member... ?

 

 

Link to comment
3 hours ago, DOAX3GLITCHER said:

i need a screenshot of the model file (fed) opened in hex editor wich highlight vertex,normal,uv

Hi, here is an example of Mariana's swimsuit-H model (mdb_02mar_007_0_G_swH_00.fed).

 

Fig1. Target Mesh (4th mesh of the FED file)

fig01.jpg.c25e366feab6763b2e4813b71e53c369.jpg

 

Fig2. Overview in Hex Workshop

fig02.jpg.44076076b7df9e6dc0174a2aceb48b12.jpg

 

Fig3. Mesh Header Description

fig03.jpg.12a2106a223a0c59e66ac512e56dc15b.jpg

 

 

Link to comment
  • 2 months later...
  • 1 month later...
On 3/29/2019 at 10:56 AM, DOAX3GLITCHER said:

Little update (project is still alive even if its evolving really slow)

progress

managed to import/export model into blender

 

only weight is missing (need more time)

Glad to see this project alive.
Is it possible to edit the mesh, export to the game and play with the edited models?

If it is, can you tell me how to import/export to blender?

Link to comment
  • 1 month later...

A quick research progress

 

1. Vertex Color

The UNKNOWN area means vertex color (RGBA in 4 bytes).

That's why swimsuit looks different than skin does.

 

2. Bone Weight

7th data of FPACMESH: Contains weight groups (bone count, bone ID, weights).

8th data of FPACMESH: Contains maps to associate vertex ID with weight group ID.

Link to comment
  • 1 month later...
  • 4 weeks later...

After thousands hours of researching, I finally figured out data structure.

 

The file consists of header, offsets and data blocks like this.

mesh-header.png.740115fda58fa4f08f7745041a1fec21.png

 

Description using pseudo code:

///// common structure /////
header = {
  char name[8];
  short blockCount;
  byte offsetType;  // 2: int, 6: short
  byte unknown[5];
};

offsets = {
  int offset;  // short if offsetType == 6
  int size;    // short if offsetType == 6
} x blockCount;

// for each offsets, goto (header base address + offset)
block = any data of (size) bytes;

 

///// details of FPACMESH data blocks /////
block[0] = {
  boundingBoxPos1 = { float x, y, z };
  boundingBoxPos2 = { float x, y, z };
  byte meshCount;  // 0: morph, 1: has one mesh, 2: has two meshes
  byte unknown[3];
};

///// if meshCount > 0 /////
block[1] = {
  short _faceCount;  // faceCount = _faceCount / 3
  short materialId;
  byte unknown1[12];
  int vertexCount;
  byte unknown2[12];
  vertices = { float x, y, z } x vertexCount;
  // padding here
  normals = { float x, y, z } x vertexCount;
  // padding here
  vertexColors = { byte R, G, B, A } x vertexCount;
  // padding here
  UVs = { float U, V } x vertexCount;
  // padding here
  faces = { short idx0, idx1, idx2 } x faceCount;
  // padding here
} x meshCount;

// The game uses unique values below
block[2] = {
  uniqVertices = { float x, y, z } x uniqVertexCount;  // uniqVertexCount = size / 12
};
block[3] = {
  uniqNormals = { float x, y, z } x uniqNormalCount;  // uniqNormalCount = size / 12
};
block[4] = {
  uniqVertexColors = { byte R, G, B, A } x uniqVertexCount;
};
block[5] = {
  uniqUVs = { float U, V } x uniqUVCount;  // uniqUVCount = size / 8
};
block[6] = {
  uniqWeights = {
    int boneCount;
    weights = {
      int boneId;
      float weight;
    } x boneCount;
  } x uniqVertexCount;
};

// unique IDs are defined in block[7]
block[7] = {
  short uniqVertexIds[vertexCount];
  short uniqNormalIds[vertexCount];
  short uniqVertexIdsCopy[vertexCount];  // same as uniqVertexIds
  byte unknown[vertexCount];
  byte zeros[vertexCount];
} x meshCount;

// NOTE 1: padding means 16 byte padding
// NOTE 2: all integers should be read as unsigned
Link to comment
  • 2 weeks later...

@simezi

(1) Make sure that your input format is correct.

Input DDS file should be DXT5 DDS file with no mip-maps (miplevel = 1).

####### Convert PNG to DDS
> texconv -f DXT5 -m 1 -bcdither -y input.png

####### Convert DDS to GXT
> psp2gxt -i input.DDS -o output.gxt

https://vvvv.org/contribution/texconvgui

 

(2) When copying data, ignore the first 0x40 byte header of GXT. Just keep the original header.

 

---

BTW, I found a problem when overwriting FPACMESH.

The cell edges of body turned black. Still finding solution...

ry1.jpg.466d94164fc5451000af2c590bf5958d.jpg

 

Link to comment
  • 3 weeks later...
  • 1 month later...
On 10/17/2019 at 1:02 PM, FrancisBeacon said:

Alex, Arc could either of you please make your mods public? I've gotten the swaps to works etc... but I wouldnt know where to begin on editing the textures to get the results you guys have shown.

 

Appreciate it

No plan to share modded files, because I don't have time to respond each specific requests.

 

For getting texture, you can use this Noesis script.

fmt_recolove_textures.py

 

Each *.tex file contains multiple textures for a costume, and you can get texture's address (in hex) and size (in decimal).

tex-view.png.8a4e8447172fe0c6607a5db752609268.png

 

For editing texture, please see the previous post.

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use