fgh1t6 Posted April 25, 2020 Posted April 25, 2020 This is a short tutorial for how to know which set of texture files are for an mesh in DOA 6. Tools needed: 1. g1m_tool package https://www.loverslab.com/topic/120211-vagonumero13-tools-redelbe-rdbtool-g1mtools-doa6decsave-update-15-april-redelbe-261/ 2. Blender & 3dMigoto plugin: https://github.com/DarkStarSword/3d-fixes/blob/master/blender_3dmigoto.py 3.Text editor, such as Notepad ++ In this tutorial we use the AYA_HAIR_036.g1m as example to locate the texture files for the ear part. Steps: 1. export vb/ib from g1m file with "g1m_export_with_vgmap.bat" from g1m_tool package. Import them into blender, and check the mesh number of the ear part: Here we found it is mesh 1. 2. drop the g1m file to g1m_xml.exe from the g1m_tool package to get the AYA_HAIR_036.g1m.xmal file. open it with a text editor. Search "SubmeshesSection" to go to the <SubmeshesSection> section. Within the section, find the Submesh block for the mesh we found in the previous step. For our case, the mesh is mesh 1, so we are looking for <Submesh idx="1">: Spoiler <Submesh idx="1"> <U_00 value="53" /> <VB value="1" /> <Bones_map value="0" /> <!--If you want a submesh to use the material of other, replace the U_OC, U_10, Material and Texture. U_0C seem to be the most important one in DOA6.--> <U_0C value="0" /> <U_10 value="2" /> <Material value="0" /> <Texture value="1" /> <IB value="1" /> <U_20 value="1" /> <IB_format value="3" /> <VB_Start value="0" /> <NumVertices value="236" /> <IB_Start value="0" /> <NumIndices value="948" /> </Submesh> Check the value in "<U_0C value="0" />. So we got the material index for the mesh is "0" 3. Now extract "AYA_HAIR_036.mtl" with qrdbtools. It is in CharacterEditor.rdb NOT MaterialEditor.rdb. Drop it to fid_utility.exe from g1m_tools package. open the resulted AYA_HAIR_036.mtl.txt file, and find the file name prefix for the material index 0: So the material is defined by MPR_Muscle_Character_AYAHAIR036_d01.kts and files used are listed in MPR_Muscle_Character_AYAHAIR036_d01.ktid. MPR_Muscle_Character_AYAHAIR036_d01.ktid can be decoded by fid_utility.exe as well. That is it. So far, I found that the game will accept whatever format g1t file you put in, so long the name is matching the list in .ktid. You can even change the size of these images, however, all images should be the same size otherwise you may have UV mapping errors.
Guest Posted April 26, 2020 Posted April 26, 2020 That's intriguing! And,,, would you solve a puzzle for me please ? When i downloaded this mod [Hitomi GI without Bra no Pants/ breakable added 0.99] I found him change the content of HTM_COS_004a.mtl . I extracted the original mtl file to compare what's difference, then i got confused...
Guest Posted April 26, 2020 Posted April 26, 2020 The left is the mtl file of him mod, the right is the original. I don't know how he tried to arrange these id numbers. So would you teach me what is the meaning of these id?
fgh1t6 Posted April 26, 2020 Author Posted April 26, 2020 On 4/26/2020 at 4:37 AM, kollector said: Spoiler The left is the mtl file of him mod, the right is the original. I don't know how he tried to arrange these id numbers. So would you teach me what is the meaning of these id? So far, I only knew very little on how the texture works. Thanks to vago's new tool, it makes the study so much easier! so I will use the xml file for all further explanation I found these numbers appear in 3 sections in the g1m file. The most directly affecting the game is the <MeshesSection>/<Submesh idx="xx">/ <U_0C value="n" />. the n is the number from the mtl file. In the same block,there is a <Texture value="N" /> which points to a g1m <Material idx="N" >block in the <MaterialsSection> section using the same set of files. Theoretically, the modder should have also added an extract <Material idx="3" >block in his g1m file. I just found another section linked to the material : the <AttributesSection> section. It is assigned by <MeshesSection>/<Submesh idx="xx">/ <Texture value="A" /> <Material value="A" />. This <AttributesSection>/<MaterialAttributes idx="A"> block listed a set of settings used by certain material hash code( these looks like "@E42F15B7" --- this is the code I am working on, It is ANIMATED UV !! ) Anyway, so for rearrange the material number, one need work on the below three numbers in each mesh block: <U_0C value="n" /> <Material value="N" /> <Material value="A" /> <Texture value="A" /> <Texture value="N" /> If change the number in mtl file only, change the n to match the mtl file. In you sample, all skin meshes need to change n from 2 to 3. The newly added b02 material uses n=2, it should also have a newly add "Material" and "MaterialAttributes", otherwise the mesh will look like a skin. HOWEVER!!! It is not making any sense and not possible to make so much changes without Vago's g1m_xml tool! So, I think the mod file was not based on HTM_COS_004a.g1m at all. It is a copy of HTM_COS_004.g1m
vagonumero13 Posted April 26, 2020 Posted April 26, 2020 6 hours ago, kollector said: The left is the mtl file of him mod, the right is the original. I don't know how he tried to arrange these id numbers. So would you teach me what is the meaning of these id? This is a change to make a breakable mod in a different slot. Because HTM_COS_004 is a special case of breakable costume where the normal .mtl and the brekable .mtl don't match (there are a few like that, Ayane, Kasumi and Phase4 also have at least one of those special cases), if he wanted another costume breakable in HTM_COS_004, he could make the normal .mtl and the brekable .mtl match.
Guest Posted April 27, 2020 Posted April 27, 2020 15 hours ago, fgh1t6 said: So far, I only knew very little on how the texture works. Thanks to vago's new tool, it makes the study so much easier! so I will use the xml file for all further explanation I found these numbers appear in 3 sections in the g1m file. The most directly affecting the game is the <MeshesSection>/<Submesh idx="xx">/ <U_0C value="n" />. the n is the number from the mtl file. In the same block,there is a <Texture value="N" /> which points to a g1m <Material idx="N" >block in the <MaterialsSection> section using the same set of files. Theoretically, the modder should have also added an extract <Material idx="3" >block in his g1m file. I just found another section linked to the material : the <AttributesSection> section. It is assigned by <MeshesSection>/<Submesh idx="xx">/ <Texture value="A" /> . This <AttributesSection>/<MaterialAttributes idx="A"> block listed a set of settings used by certain material hash code( these looks like "@E42F15B7" --- this is the code I am working on, It is ANIMATED UV !! ) Anyway, so for rearrange the material number, one need work on the below three numbers in each mesh block: <U_0C value="n" /> <Material value="N" /> <Texture value="A" /> If change the number in mtl file only, change the n to match the mtl file. In you sample, all skin meshes need to change n from 2 to 3. The newly added b02 material uses n=2, it should also have a newly add "Material" and "MaterialAttributes", otherwise the mesh will look like a skin. HOWEVER!!! It is not making any sense and not possible to make so much changes without Vago's g1m_xml tool! So, I think the mod file was not based on HTM_COS_004a.g1m at all. It is a copy of HTM_COS_004.g1m Thanks!
Guest Posted April 27, 2020 Posted April 27, 2020 15 hours ago, vagonumero13 said: This is a change to make a breakable mod in a different slot. Because HTM_COS_004 is a special case of breakable costume where the normal .mtl and the brekable .mtl don't match (there are a few like that, Ayane, Kasumi and Phase4 also have at least one of those special cases), if he wanted another costume breakable in HTM_COS_004, he could make the normal .mtl and the brekable .mtl match. Get it!
wingzg Posted April 27, 2020 Posted April 27, 2020 Great job! Please do more tutorials like this to help us understand modding a little better. I understand the purpose of easily finding the texture files. But, I have a question though. If I am understanding these .mtl file correctly, if I were to edit the value of "...HTMCOS004_a01" to "...HTMCOS005_a01", am I effectively changing which textures the costume is extracting from?
fgh1t6 Posted April 27, 2020 Author Posted April 27, 2020 4 hours ago, wingzg said: Great job! Please do more tutorials like this to help us understand modding a little better. I understand the purpose of easily finding the texture files. But, I have a question though. If I am understanding these .mtl file correctly, if I were to edit the value of "...HTMCOS004_a01" to "...HTMCOS005_a01", am I effectively changing which textures the costume is extracting from? The suggestion for .mtl file is to get information from but not use it to redirect. The reason is that redirecting from .mtl file is not reliable. I did before, it works, but recently in quit a few cases, for unknown reason, the log file showed that it is the default .mtl was loaded not the modified one. The recommended way is to redirect by putting modified .kts and .ktid files in the "Material" folder. Regarding to adding new material, I have tried to add material file set into .mtl file but they won't be loaded by the game at all. So using .kts and .ktid files is still the best way so far.
wingzg Posted April 27, 2020 Posted April 27, 2020 47 minutes ago, fgh1t6 said: The suggestion for .mtl file is to get information from but not use it to redirect. The reason is that redirecting from .mtl file is not reliable. I did before, it works, but recently in quit a few cases, for unknown reason, the log file showed that it is the default .mtl was loaded not the modified one. The recommended way is to redirect by putting modified .kts and .ktid files in the "Material" folder. Regarding to adding new material, I have tried to add material file set into .mtl file but they won't be loaded by the game at all. So using .kts and .ktid files is still the best way so far. Ah I see! Thank you so much for the information.
LongNeckPenguin Posted May 14, 2020 Posted May 14, 2020 Thanks for the info! Do you know the way to delete a part in the g1m, or make it transparent? In your case, remove the ear part in Aya g1m
fgh1t6 Posted May 15, 2020 Author Posted May 15, 2020 12 hours ago, bbhuang said: Thanks for the info! Do you know the way to delete a part in the g1m, or make it transparent? In your case, remove the ear part in Aya g1m The simple way is to use g1m_hide.exe, just hide it. I tried to clean up the g1m by remove unwanted meshes, these small parts just reduce the file by about 30kb. It is not worth the hard work except for the purpose of technique show off. But anyway, the steps are just the opposite of duplicate meshes as I wrote in other post: But after delete the meshes, you need to reorder all items, and correct the <VB value = **> and <IB value = **> for all remained meshes. That is why I really think it is not worth at all.
LongNeckPenguin Posted May 15, 2020 Posted May 15, 2020 1 hour ago, fgh1t6 said: The simple way is to use g1m_hide.exe, just hide it. I tried to clean up the g1m by remove unwanted meshes, these small parts just reduce the file by about 30kb. It is not worth the hard work except for the purpose of technique show off. But anyway, the steps are just the opposite of duplicate meshes as I wrote in other post: But after delete the meshes, you need to reorder all items, and correct the <VB value = **> and <IB value = **> for all remained meshes. That is why I really think it is not worth at all. Thanks a lot! Super helpful!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.