I'd still would like to have a player import/export Blender tool for GTAIV.
If someone is interested in making a tool, or if I have enough time to work on one, this is what I understand so far from the mesh and skel files and odr files since I can't seem to find any info on this even in OpenIV docs.
MESH file
The 2nd section is vertex definition properties. My guesses as to what its formatted is:
location? / vertex normal? / Weight distribution for a the 4 possible bones that it can be weighted to - this corresponds to the following field / bone indices that its associated with (referenced in .skel file) / vertex color / ?? / UV? / UV again? might have 2 uv maps, maybe the second is for lightmaps?
The order of the vertex is likely its id since its not defined anywhere else in the properties.
ODR
The odr file defines most of the materials of the model as well as where the skeleton file can be found.
The only shaders that a ped modder needs to worry about are:
gta_ped_skin_blendshapes.sps (head)
gta_hair_sorted_alpha_expensive.sps for hair
gta_ped.sps for clothing
The shaders section is formatted like this:
for gta_ped: gta_ped.sps diffuse_texture relative_path_to_normals_texture specular
exponent? normal_strength? specular color?(I think this needs to be 0.0;0.0;0.0) path_to_spec_texture strength of spec map?
gta_hair_sorted_alpha_expensive.sps: gta_hair_sorted_alpha_expensive.sps diffuse_texture relative_path_to_normals_texture specular exponent? normal_strength? specular color - this has 0.0;0.0;0.0 path_to_spec_texture strength of spec map?
gta_ped_skin_blendshapes.sps: gta_hair_sorted_alpha_expensive.sps diffuse_texture additional_color_for_head relative_path_to_normals_texture spec_exponent? normal_strength? specular color? path_to_spec_texture strength_of_spec_map?
Notes on spec color - it has to be 0.0;0.0;0.0 because this is black, if you had any other color it results in a weird shininess on the model.
skel section just points to where the skel file is
lodgroup - I'm not sure that there needs to be too much focus on this one since many custom models won't include lods anyways.
for
the high med and low lods definition in GIMSIV these just look like
they might be filler numbers likely because there are no support for
lods used for a custom model. Might be a definition of distance, which
explains why GIMSIV is using 9999
SKEL file - I know the least about this one so much of this is a guess and any information about it is welcome.
The skel file might be needed because they have the index of the bones. the mirror field is unknown but it has the same value as the index.
The files exported by GIMSIV seem to have some invalid values such as scale being 0.0 or being near 0, so its possible the skel file doesn't matter that much aside from the indices and the names of the bones.
It's probably important to note that it is the index of the bone that corresponds to the vertex weight in the mesh file, and not the id... so I don't know what that's used for. Is it possible to be lazy and just re-export the same skel file that OpenIV gave?
I'm not sure what rotmax and rotmin fields are. Orient is probably the rotation, not sure what sorient is but even GIMSIV gives 0s for this.
No comments:
Post a Comment