RocketBun-OG / autoBodyAE

Randomized configurable bodies for Skyrim: Anniversary Edition
GNU General Public License v3.0
12 stars 7 forks source link

Hair parts not morphed #2

Open alandtse opened 2 years ago

alandtse commented 2 years ago

This may be a limitation of racemenu but hairdos that rely on a morph may end up clipping into the body since they may not be adjusted by ApplyBodyMorphs.

I noticed this using Lydia using Bijin with hair physics patch. In that, she is assigned KS Metropolis as a haircut. While testing the VR version to verify morphing, I used a "Bombshell" preset which enlarges the breasts significantly beyond zero sliders (85%). This makes it quite clear that the hair clips through the breast since I also built all the SMP hair wigs as zero slider. I have not tested it with non SMP hair parts so maybe it is limited to SMP.

This will likely require fixing racemenu so that it also morphs the hair parts. I do not think racemenu is open sourced so this may have to be identified as a known issue.

RocketBun-OG commented 2 years ago

I believe the issue here is that racemenu morphs don't actually correlate with (or update) collision. You'll observe the same issue with bodies that have hand collision - hands will either clip through or float several inches away, depending on the built collisions.

I'm not sure what can be done about this on my end; the morph keys CBBE/3BBB exposes aren't designed to play nice with HDT-SMP or CBPC by default. An optimal solution would be to morph the collision areas in parallel with the modifications made to the mesh, but I'm not sure how feasible that is.

RocketBun-OG commented 2 years ago

I'm also running into some issues with getting the morph interface to work in general. Sometimes it will just lock up and refuse to update morphs at all. It seems like a somewhat unstable bit of software.

alandtse commented 2 years ago

I've found that some morphs don't apply until after the clothing is swapped too. I'm not sure if that's in your code to delay applying the morph or just inherent in the engine.

RocketBun-OG commented 2 years ago

You can try changing the ApplyBodyMorphs function's deferred update parameter to see if that makes them update, but when I tried that it didn't seem to make a difference. I haven't written anything in here to explicitly delay morphing -- just seems like clothing equips/unequips are the only thing that makes skee64 force an update.

EDIT: by the way, skee64 is actually open source, and it's what RM and this mod rely on to work with morphs. You can poke around here if you want to try to dissect what's going wrong. It's a bit above my pay grade.

hex0id commented 2 years ago

just seems like clothing equips/unequips are the only thing that makes skee64 force an update.

NiOverride.UpdateModelWeight() function could do the trick (in my mini mod for body tinkering, I always call this when I do any changes in morphs, otherwise body update will not happen).