Jump to content

Finally, we can recreate zxfda's "火焰流光教程" mod


Recommended Posts

  • 2 weeks later...

So here is the under-testing mod. fgMed_LEI102_RAC005_firetest.zip

Since it is a testing mod, I won't put it to the download area.

 

Credit goes to:

@zxfda for the idea and fire materials

@vagonumero13 for his super-powerful g1m_xml tool and the disclose of the myth of shader code. They made the digging of new shader code possible. 

 

Secrets for modders:

    The secret is a shader code @8224EA4A , which I recently dug out from the 8470 "PB2" shader codes found by vagonumero13. "PB2" represents: "Physically Based 2 Standard Shader". 

    I believe, all usable shader are listed in the file : "Character.sid" which can be extracted from "system.rdb" by using qrdbtool.exe. For example, in the file, line 8662:

                                               PB2-AlepmeAtT,CE1ResourceShaderPhysicallyBased2Standard[PB2-AlepmeAtT],R_G1S[PB2-AlepmeAtT]

    "PB2-AlepmeAtT" is the shader's name, its hash code can be found in the file "sid_alt_hash.txt" that is included in vagonumero13's g1mtools version 1.2 download. And yes, it is 0x8224ea4a (line 13753).

    Unfortunately,  to find out what is a shader doing is a luck testing. However, TN has kindly given us a big gift!  I started by testing shaders used in g1m files for stages, and found the big gift from TN: the file name of the g1s (shader) files are in CamelCase naming convention! PB2 = Physically Based 2 Standard Shader; Alepme = Albedo Emissive; At =Alpha Test, i.e. transparent, T = Texture Animation. That is very important, because in order to use the shader code, we will also need to know the "Attributes" settings in the "MaterialAttributes " section of the g1m file.  But we only have a 1/8662 chance to find a g1m file show us what kind of setting is needed for a shader we want to test. Here comes the great help of TN's big gift: each CamelCase code has its settings, so we can work out the combination. for example, in our case,  Lucky enough, Lisa's nova glasses g1m has a hash: @E42F15B7 "PB2-AlepmeT". It shows us the attribute settings are four special entry: "aleScl" / "alePMPrms" for "Alepme" and  "txC0" /"txCrC0" for "T". After try-and-error tests, I found that "Alpha test" is not controlled by attribute but is the myth setting of mesh flag : <SubmeshesSection>/<Submesh>/<Flags value ="0x35">. As vagonumero13 guessed before, the Flags is a binary Flag array: 0x35= 0011 0 1 0 1. My finding is: the first one is for "do Alpha test", the 2nd one is for "use other bone set". In order to enable transparency, the Flag must be set to 0x3D for costumes.

   

That is all my secrets, hope you guys can hunt down more useful shader codes and settings. 

 

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