Closed Indarello closed 2 years ago
A lot of code changed between 4.9.1 (January 11, 2020) and 5.0.7 (May 30, 2020). I made my first pull request on January 19th, and over the coming months I changed a lot of code, including major changes to bones and coordinate system handling. Some commits that may have broken "special cloth" bone weights:
Since I'm probably the person who broke "special cloth" bone weights, perhaps I should try to fix it. But I need a lot more information, since I know very little about how "special cloth" bone weights work. I don't think I've ever seen decent-looking cloth bone weighting in Skyrim.
@Indarello It would be helpful if you could provide the following information:
Hopefully, with this information, I will be able to reproduce the error.
Some preliminary observations from examining testcopy.nif, which has shapes "bot" and "try to copy weight here":
So I think I understand the problem:
Now, keep in mind that these conclusions are preliminary. I may not be understanding the problem correctly at all. And I can't test any of this in Fallout 4, because I don't have Fallout 4.
@Indarello Some questions:
Keep in mind that I am not suggesting that you have done anything wrong. I am not suggesting any procedure to follow. I am not proposing a solution. I'm merely seeking to understand the problem. Solutions will be addressed later.
@ousnius Some questions:
I cant find any buttons you asking, probably they don't exist in F4 outfit studio I just imported dress from .obj and I just simply copied boneweight, and I think it should work ok, I dont udnerstand all this development staff "global-to-skin transform", "vertex to map" and so on, please dont ask me about them or provide images what button I should press to give you this info. I just noticed that in nifskope dresses look different and I thought that may help you, I dont care if after fix they still look different in nifskope, I just want it solved for game
@Indarello I apologize for my long technical post. I should have realized it would not be useful to you. I have a bad habit of inflicting long technical explanations on my colleagues when I get excited about something I'm working on. I'm sorry.
@ousnius Ideas for solutions
This is assuming my reasoning above is correct. I see the problem as this: how to help the user fix the bad data. Fixing the bad data manually is very difficult, as far as I know.
Idea 1: When loading a skinned mesh from any source, check for inconsistencies between node and skin data. (Node data gives the bone-to-global transform. Skin data gives the skin-to-bone transform. They are connected via the global-to-skin transform.) If inconsistencies are found, pop up a dialog window with choices. For inconsistencies in standard bones, the options would be:
For inconsistencies in custom bones, the options would be:
Idea 2: When the user does "Reset Transforms", check for the existence of custom bones. If there are any, offer the user the choice of how to reset them:
The dialog window could also give information about how many standard bones and custom bones have inconsistencies. Perhaps it could even list them. (Currently, "Reset Transforms" updates skin data and does not change nodes.)
Idea 3: In the "Copy Bone Weights" dialog, there's currently a check for a mismatch between the source and target global-to-skin transforms. We could add a check for inconsistencies between node and source skin data, and ask the user what to do. For standard bones, the options would be:
For custom bones, the options would be:
Currently, "Calculate target skin bone data from node data" is always done (I think). In Outfit Studio 4.9.1 and older, if I recall correctly, "Copy skin bone data from source to target" is always done.
Of course, these three ideas are not mutually exclusive. We could do all three.
I tested this problem with different versions and found that 4.9.1 is latest properly working version for this issue next version available for download (5.0.7) have this bug
So when you copy boneweight from some clothing that have special cloth bones: they are copied and have physics in game, but they are dispalced in game (see img 1) and not displaced in nifskope (see img 2) But for proper custom boneweight copy they should be dispalced in nifskope (see img 3) and in result will look good in game https://imgur.com/a/bHpdX6a
Or maybe I understand something wrong, what I do: 1)load project with my new dress (my dress is img 2) 2)import from nif another working dress (custom working dress is img 3) with custom bones 3)set reference to working dress and copy boneweight for my new dress 4)delete custom dress, save and build outfit