ousnius / BodySlide-and-Outfit-Studio

BodySlide and Outfit Studio, a tool to convert, create, and customize outfits and bodies for Bethesda games.
GNU General Public License v3.0
286 stars 63 forks source link

When Exporting to Nif BSEffectShaderPropertyFloat does not link it's target correctly when using merge geometry #465

Closed CyborgArmGun closed 1 year ago

CyborgArmGun commented 1 year ago

Description If you take two BSEffectShaderProperty of the same type and merge, then save. Exporting to nif and running bodyslide produces the same result.

How to reproduce

  1. Click on 'merge geometry'
  2. Set either as the base
  3. Save
  4. View in NifSkope and the BSEffectShaderPropertyFloat will not list it's BSEffectShaderProperty as it's target.

Image Example:

Ground object ctd

vometia commented 1 year ago

Just run into this one myself (and with exactly the same piece of armour too!) Fortunately it's easy enough to fix, it's remembering to do it before the game reminds me by crashing that's the difficult bit...

ousnius commented 1 year ago

@CyborgArmGun @vometia The issue comes from duplicating the shape (or separating vertices), where it's not updating the block index in the BSEffectShaderPropertyFloat to point to the duplicated BSEffectShaderProperty.

Deleting the original shape when merging together, it will update the wrong index of the now deleted shape to be empty. I fixed the issue, but there is currently no new release of Outfit Studio in the pipeline at the time of writing.

vometia commented 1 year ago

Not sure if it's important, but I run into the same thing without doing a merge: loading, doing some minor faffing about (just minor sculpting, no vertex separation I don't think), conform, save still has the BSEffectShaderPropertyFloatController with an empty target. Or perhaps more worryingly a random one. Though judging by your explanation I guess it's probably covered by the fix anyway.

CyborgArmGun commented 1 year ago

One can hope, just glad this is being addressed.

ousnius commented 1 year ago

Not sure if it's important, but I run into the same thing without doing a merge: loading, doing some minor faffing about (just minor sculpting, no vertex separation I don't think), conform, save still has the BSEffectShaderPropertyFloatController with an empty target. Or perhaps more worryingly a random one. Though judging by your explanation I guess it's probably covered by the fix anyway.

I couldn't get the target to become empty or random when I was messing around with adding, deleting, reordering or editing shapes. So the issue might also arrise from something else I didn't try to do.

The fix I just did is definitely only related to copying or duplicating shapes or shaders, though.

vometia commented 1 year ago

I should run through it again to work out what it is I'm doing. I won't be entirely surprised if it turns out to be something really obscure, my approach to working on things is, erm... well, "idiosyncratic" to put it politely. And I seem to have a habit of making work for myself.

Edit: lack-of-concentration induced typo.