lucasvinbr / blender_io_GTA5Ped

import-export of parts of OpenIV's openFormats for peds
GNU General Public License v3.0
29 stars 7 forks source link

New issue when exporting the materials #4

Open siaxace opened 3 years ago

siaxace commented 3 years ago

Hey again,

So I've been dealing with a new issue when exporting the mesh but I know its stated in the README "The plugin does not look for textures (meshes are imported with UVs though) and doesn't create materials".

I was wondering if you are planning to add the materials data to the export function and do you have any suggestion for dealing with materials in the meanwhile?

My character is left with nasty seams on the edge of every joint and no matter what I do, without normal and specular maps I'm afraid I'm stuck with it.

lucasvinbr commented 3 years ago

Hey! So, at least for now I'm afraid I'm not planning to add support for materials... but maybe there's something else we can do about the seams hehe. If you'd like, could you please share some pictures of the problem?

siaxace commented 3 years ago

Ok so, here's what I'm dealing with: https://imgur.com/a/uN39unO

And here's the issue: the vertices along the edge of the seams are disconnected. So naturally what I do is I merge them together, then I smooth out the mesh and everything looks good in blender. So next part I export the mesh but sadly the seams appear again in the openIV viewer and also in game.

So what I did next was to test whether the problem is from blender or your plugin so I exported the smoothed out mesh in .fbx format and then I imported the very same .fbx file to blender and to my surprise, the seams appears again. So no matter what I do and how I export it, after importing it again to blender, the vertices get disconnected along the line of the seams and I'm really confused as to what is causing this.

3941 commented 3 years ago

Pretty sure the meshes get split at the seams of UV islands. Apparently that has to happen, or UVs won't work properly in game. Any model you export from the game and import in Blender is split like that, too.

You don't need to rely on Blender for textures at all. Openformats is completely text based, and thus can be edited in a text editor of your choice. I suggest exporting a complete model and matching textures (ydd and ytd) with OpenIV and learning from the generated files how it all comes together. It's pretty easy. Since all you can export from Blender is a .mesh, you have to put your model together like that anyway.

lucasvinbr commented 3 years ago

So, I've just uploaded version 0.0.7 of the plugin, which seems to deal with the bad normals at the seams. I'm not sure if the fix causes any problems (I haven't seen any in my quick testing). Please try it, hopefully the seams will be fine now hehe