Combine Excella's head and body MOD
Mar 28, 2014 14:46:12 GMT 10
reituolc, Mister T, and 12 more like this
Post by aman on Mar 28, 2014 14:46:12 GMT 10
This process of combining head/eye/hair meshes with body MOD has only been tested with RE5 Excella character.
To get a complete Excella you need 4 files
em8500.mod (body)
evf0400.mod (head)
evf0401.mod (hair)
evf0403.mod (eyes)
Each file contains its own collection of bones. When you import the body MOD in Noesis, you may find that the body MOD contains neck, head and eyes bones to support an animated head. Our goal is to take the textures and meshes from the body part MOD file and inject them to body MOD. Since we only keep the body MOD bones, all the bone id used by body parts mesh must be converted to the equivalent bone id in the body MOD file.
At high level a MOD file have the following structure:
-Header (objects counts, starting offset of lists, bounding sphere/box dimensions)
-bone_list
-bone_transform_list
-bone_table
-bone_group_list
-group_info
-texture_list
-material_list
-mesh_list
-weight_count
-weight_sphere_list
-vertex_list
-second_vertex_stream(optional, not all mod file has this, vertex that deformed by 8 bones get vertex tangent from this list)
-face_index_list
bone id references are stored in bone_group list and weight_sphere_list.
Here is a link to a tool called "RE5ModelMerge". This tool is based on Surveyor's DMC4Model converter source so big thanks to him. Use it to dump the bone group contents for each body part file.
www.mediafire.com/download/sm0z090w4z8670s/RE5ModelMerge.zip
www.mediafire.com/download/bou2bxcj7cxilxn/RE5ModelMerge_v2.zip
RE5ModelMerge.exe evf0400.mod
BoneGroup 0 : [31] 2 3 4 5 6 7 8 9 13 14 18 19 20 21 23 24 25 26 30 31 33 34 36 37 38 42 43 44 45 82 83
BoneGroup 1 : [31] 4 5 6 13 14 20 21 23 24 30 36 37 38 42 43 44 45 51 52 53 57 58 59 60 61 62 69 70 76 77 82
BoneGroup 2 : [31] 4 32 34 35 39 40 46 47 48 54 55 57 58 59 60 61 62 63 64 65 66 67 68 71 72 73 74 75 76 77 78
BoneGroup 3 : [21] 4 30 33 34 37 38 44 45 46 52 53 59 60 61 62 69 70 71 72 76 77
BoneGroup 4 : [31] 4 5 11 12 14 15 21 28 29 32 39 40 41 47 48 49 50 54 55 56 63 64 65 66 67 68 73 74 75 77 78
BoneGroup 5 : [29] 2 3 4 5 15 21 22 39 40 41 47 48 49 50 51 52 53 54 55 56 65 66 67 68 74 75 78 81 82
BoneGroup 6 : [23] 4 5 6 7 8 9 10 11 12 13 15 23 24 25 26 27 28 29 30 31 32 42 50
BoneGroup 7 : [32] 2 3 4 5 8 9 10 11 12 13 14 15 16 17 18 20 21 22 25 26 27 28 29 31 32 34 35 39 40 41 47 48
RE5ModelMerge.exe evf0401.mod
BoneGroup 0 : [2] 5 6
RE5ModelMerge.exe evf040e.mod
BoneGroup 0 : [2] 79 80
So the head have many bone_group and use many bones. the hair use 2 bones and eyes use two bones (one for each eye).
Open body MOD file in Noesis. press F6 turn on skeleton. Turn on data view (Tool menu->Data View), expand the bones tree, click on the bone name and an axis icon will mark the location of the bone. Noesis does not support clicking on the skeleton for bone info. It may be easier to find bone by exporting the mod file to 3d editor.Find the chest, neck , head, left eye and right eye bone and write down their names (which contains also their id).
Import head MOD to Neosis and find the chest, neck and head bone names. Import hair MOD to Noesis , since Excella hair has no moving parts, all bone will be map to head bone in body MOD. Import eye file to Noesis and find the left eye, right eye bone names
Here are what I found in Excella
em8500.mod (body)
chest - bone 24
neck - bone 83
head - bone 84
right eye - bone 86
left eye - bone 87
evf0400.mod (head)
chest - bone 2
neck - bone 3
all other will be map to bone 84 in the body MOD
evf0401.mod (hair)
don't care , all bone will be map to bone 84 in the body MOD
evf0403.mod (eyes)
right eye - bone 80
left eye - bone 79
all other bone will be map to bone 84
When inject head into body MOD , scan all bone_group/weight_list change all bone 2 to bone 24, bone 3 to 83, other bone id to 84
When inject hair into body MOD , change all bone id to 84
When inject eyes into body MOD , change bone 80 to 86, bone 79 to 87, the rest to 84
I am not going to bore you with the detail of how to fix up MOD header (combine object counts, adjust section offsets, expand bouncing box), rebase texture/material/bonegroup indices, re-scale/re-position all vertices after a body part is injected into body MOD.
Here is the full syntax of RE5ModelMerge.exe:
==============
RE5ModelMerge [-nf] [-o output.MOD] body.MOD body_part.MOD[:id-new_id][:id-new_id]=def_id[+] [body_part.MOD... etc]
==============
switches in [] are optional
-nf : optional, mesh/object with flag 0x820 crashes RE5. 0x820 is converted to 0x020 by default. this switch disable the conversion.
-o : optional, specify a output MOD file name , default is pl0100.mod (for Sheva)
body.MOD : required, the main body MOD file name, i.e. em8500.mod
body_parts.MOD: name of the body part mod to merge to body mod (i.e evf0400.mod)
:id-new_id ,optional bone conversion hint, change bone id to new_id. you can have several hints one after another
i.e. evf0400.mod:2-24:3-83=84
=def_id ,required (must have this!), this is a catch all bone_id, bone id that does not have a conversion hint will be given this def_id
see conversion hint example
+ , optional, this character indicate a dummy mesh will be added at the end.Need this to prevent Excella's eyes messing up other mesh
Put all 4 MOD files and RE5ModelMerge.exe in the same location in your computer.
Examples:
The first version of full Excella was create using following command:
RE5ModelMerge.exe -o pl0100.mod em8500.mod evf0403.mod:79-87:80-86=84+ evf0400.mod:2-24:3-83=84 evf0401.mod=84
-This create mod file contains body+eye+dummy_mesh+head+hair. also give each eye an eye bone so they can roll. Unfortunately the eyes only work for one person, they shifted out of place for everyone else.
The v3 version of Excella was create using following:
RE5ModelMerge.exe -o pl0100.mod em8500.mod evf0400.mod:2-24:3-83=84 evf0403.mod=84+ evf0401.mod=84
- This give you body+head+eyes+dummy_mesh+hair, both eyes use the head bone (84) so they can not roll, but they should not shift out of place.
So try out RE5ModelMerge and see whether it works for other characters.
Unsolved issues:
- Some RE5 installation and DX10 version show Excella head with very dark shader. May have been fixed by v2.
- Eye bones do not work correctly, eye move out of place (except for xJillxSherryx).
- Why mesh flags 0x820 crashes RE5
Things to try:
- Excella body MOD seems to have eye lid bones. Maybe someone can make her blink like Sheva.
To get a complete Excella you need 4 files
em8500.mod (body)
evf0400.mod (head)
evf0401.mod (hair)
evf0403.mod (eyes)
Each file contains its own collection of bones. When you import the body MOD in Noesis, you may find that the body MOD contains neck, head and eyes bones to support an animated head. Our goal is to take the textures and meshes from the body part MOD file and inject them to body MOD. Since we only keep the body MOD bones, all the bone id used by body parts mesh must be converted to the equivalent bone id in the body MOD file.
At high level a MOD file have the following structure:
-Header (objects counts, starting offset of lists, bounding sphere/box dimensions)
-bone_list
-bone_transform_list
-bone_table
-bone_group_list
-group_info
-texture_list
-material_list
-mesh_list
-weight_count
-weight_sphere_list
-vertex_list
-second_vertex_stream(optional, not all mod file has this, vertex that deformed by 8 bones get vertex tangent from this list)
-face_index_list
bone id references are stored in bone_group list and weight_sphere_list.
Here is a link to a tool called "RE5ModelMerge". This tool is based on Surveyor's DMC4Model converter source so big thanks to him. Use it to dump the bone group contents for each body part file.
www.mediafire.com/download/sm0z090w4z8670s/RE5ModelMerge.zip
www.mediafire.com/download/bou2bxcj7cxilxn/RE5ModelMerge_v2.zip
RE5ModelMerge.exe evf0400.mod
BoneGroup 0 : [31] 2 3 4 5 6 7 8 9 13 14 18 19 20 21 23 24 25 26 30 31 33 34 36 37 38 42 43 44 45 82 83
BoneGroup 1 : [31] 4 5 6 13 14 20 21 23 24 30 36 37 38 42 43 44 45 51 52 53 57 58 59 60 61 62 69 70 76 77 82
BoneGroup 2 : [31] 4 32 34 35 39 40 46 47 48 54 55 57 58 59 60 61 62 63 64 65 66 67 68 71 72 73 74 75 76 77 78
BoneGroup 3 : [21] 4 30 33 34 37 38 44 45 46 52 53 59 60 61 62 69 70 71 72 76 77
BoneGroup 4 : [31] 4 5 11 12 14 15 21 28 29 32 39 40 41 47 48 49 50 54 55 56 63 64 65 66 67 68 73 74 75 77 78
BoneGroup 5 : [29] 2 3 4 5 15 21 22 39 40 41 47 48 49 50 51 52 53 54 55 56 65 66 67 68 74 75 78 81 82
BoneGroup 6 : [23] 4 5 6 7 8 9 10 11 12 13 15 23 24 25 26 27 28 29 30 31 32 42 50
BoneGroup 7 : [32] 2 3 4 5 8 9 10 11 12 13 14 15 16 17 18 20 21 22 25 26 27 28 29 31 32 34 35 39 40 41 47 48
RE5ModelMerge.exe evf0401.mod
BoneGroup 0 : [2] 5 6
RE5ModelMerge.exe evf040e.mod
BoneGroup 0 : [2] 79 80
So the head have many bone_group and use many bones. the hair use 2 bones and eyes use two bones (one for each eye).
Open body MOD file in Noesis. press F6 turn on skeleton. Turn on data view (Tool menu->Data View), expand the bones tree, click on the bone name and an axis icon will mark the location of the bone. Noesis does not support clicking on the skeleton for bone info. It may be easier to find bone by exporting the mod file to 3d editor.Find the chest, neck , head, left eye and right eye bone and write down their names (which contains also their id).
Import head MOD to Neosis and find the chest, neck and head bone names. Import hair MOD to Noesis , since Excella hair has no moving parts, all bone will be map to head bone in body MOD. Import eye file to Noesis and find the left eye, right eye bone names
Here are what I found in Excella
em8500.mod (body)
chest - bone 24
neck - bone 83
head - bone 84
right eye - bone 86
left eye - bone 87
evf0400.mod (head)
chest - bone 2
neck - bone 3
all other will be map to bone 84 in the body MOD
evf0401.mod (hair)
don't care , all bone will be map to bone 84 in the body MOD
evf0403.mod (eyes)
right eye - bone 80
left eye - bone 79
all other bone will be map to bone 84
When inject head into body MOD , scan all bone_group/weight_list change all bone 2 to bone 24, bone 3 to 83, other bone id to 84
When inject hair into body MOD , change all bone id to 84
When inject eyes into body MOD , change bone 80 to 86, bone 79 to 87, the rest to 84
I am not going to bore you with the detail of how to fix up MOD header (combine object counts, adjust section offsets, expand bouncing box), rebase texture/material/bonegroup indices, re-scale/re-position all vertices after a body part is injected into body MOD.
Here is the full syntax of RE5ModelMerge.exe:
==============
RE5ModelMerge [-nf] [-o output.MOD] body.MOD body_part.MOD[:id-new_id][:id-new_id]=def_id[+] [body_part.MOD... etc]
==============
switches in [] are optional
-o : optional, specify a output MOD file name , default is pl0100.mod (for Sheva)
body.MOD : required, the main body MOD file name, i.e. em8500.mod
body_parts.MOD: name of the body part mod to merge to body mod (i.e evf0400.mod)
:id-new_id ,optional bone conversion hint, change bone id to new_id. you can have several hints one after another
i.e. evf0400.mod:2-24:3-83=84
=def_id ,required (must have this!), this is a catch all bone_id, bone id that does not have a conversion hint will be given this def_id
see conversion hint example
+ , optional, this character indicate a dummy mesh will be added at the end.
Put all 4 MOD files and RE5ModelMerge.exe in the same location in your computer.
Examples:
The first version of full Excella was create using following command:
RE5ModelMerge.exe -o pl0100.mod em8500.mod evf0403.mod:79-87:80-86=84+ evf0400.mod:2-24:3-83=84 evf0401.mod=84
-This create mod file contains body+eye+dummy_mesh+head+hair. also give each eye an eye bone so they can roll. Unfortunately the eyes only work for one person, they shifted out of place for everyone else.
The v3 version of Excella was create using following:
RE5ModelMerge.exe -o pl0100.mod em8500.mod evf0400.mod:2-24:3-83=84 evf0403.mod=84+ evf0401.mod=84
- This give you body+head+eyes+dummy_mesh+hair, both eyes use the head bone (84) so they can not roll, but they should not shift out of place.
So try out RE5ModelMerge and see whether it works for other characters.
Unsolved issues:
- Some RE5 installation and DX10 version show Excella head with very dark shader. May have been fixed by v2.
- Eye bones do not work correctly, eye move out of place (except for xJillxSherryx).
Things to try:
- Excella body MOD seems to have eye lid bones. Maybe someone can make her blink like Sheva.