Jump to content

Bone Weighting


Recommended Posts

Posted

Is there a bone I can weight to that will maintain the item's position relative to the torso, but without distorting it? Everything I've tried so far seems to either sstretch my mesh in ways I don't want, or else it drops the item to the floor.

 

I'm trying to make some restraints as object mods. In theory we could have a set of cuffs that automatically spawned the right connectors for any given restraint, but they need to stay more or less the same shape.

 

By way of an example:

 

image.png

 

I've been trying to deploy that between the victim's legs But either I weight things to the legs, in which case every thing deforms into triangle shapes following the spread of the legs,or else I weight it to something central like head, spine or vag, in which case it doesn't deform, but it ends up on the ground.

 

Any idea?

Posted

@DocClox You should be able to set up the base with an attach point, and have the subsequent attachments 'connect' via that point, in much the same way vanilla weapons are assembled and altered.
Should work via script too, I know Crazy's Rug version or something, had a Rack which mostly worked (the attaching and moving certainly worked fine).

If you're spawning attachments intended to stay attached to the NPC, then it'd probably need an intermediate 'hidden'/dummy object/item to base it's coords off, and/or weighting it to something central, like the Spine.
I had issues when converting Niero's Handmaiden/MilitiaWoman to FG, 'cause the damn thing used Custom Bones to keep the coats and such attached to the body, or they'd do precisely what you ran into, and wind up on the floor, so you might also be able to create and use a custom bone, instead.

Posted
2 hours ago, Nebuchadnezzer2 said:

@DocClox You should be able to set up the base with an attach point, and have the subsequent attachments 'connect' via that point, in much the same way vanilla weapons are assembled and altered.

That was the plan. It's just I looked at some of the vanilla armor mods and the add-on parts all seem to be weighted

 

2 hours ago, Nebuchadnezzer2 said:

Should work via script too, I know Crazy's Rug version or something, had a Rack which mostly worked (the attaching and moving certainly worked fine).

Yeah. The pregnancy sensitive tank tops I made use omods to change the message on the tops. I can do that part :)

 

2 hours ago, Nebuchadnezzer2 said:

I had issues when converting Niero's Handmaiden/MilitiaWoman to FG, 'cause the damn thing used Custom Bones to keep the coats and such attached to the body, or they'd do precisely what you ran into, and wind up on the floor, so you might also be able to create and use a custom bone, instead.

Interesting. I had no idea that was an option. I shall have to take a look at the Handmaiden nifs.

 

2 hours ago, Nebuchadnezzer2 said:

If you're spawning attachments intended to stay attached to the NPC, then it'd probably need an intermediate 'hidden'/dummy object/item to base it's coords off, and/or weighting it to something central, like the Spine.

 

I did try attaching them to the restraint, but that has its own issues. I couldn't find a way to programmatically snap something onto a connect point for a piece of furniture, the F4SE GetConnectPoints call returns 0,0,0 for CP co-ordinates, and PlaceAtNode didn't seem to do anything.

 

Attaching to the armor is a better option anyway, if I can just make it work.

 

Posted
1 hour ago, DocClox said:

Interesting. I had no idea that was an option. I shall have to take a look at the Handmaiden nifs.

If it ain't in those, it'll be the MilitiaWoman ones.

1 hour ago, DocClox said:

did try attaching them to the restraint, but that has its own issues. I couldn't find a way to programmatically snap something onto a connect point for a piece of furniture, the F4SE GetConnectPoints call returns 0,0,0 for CP co-ordinates, and PlaceAtNode didn't seem to do anything.

As I mentioned, Crazy did something that way, but I dunno how exactly he did it. Workshop Object builds a 'rack', and on using it, it attaches and starts moving, a dildo attached to it once activated. ?‍♀️

Either way, good luck :classic_smile:

Posted

OK! Progress!

 

image.png

 

The brain is still weighted to the head, so it swivels when the slave looks at something. But the shelf is weighted to a custom "head_helper" bone and that stays stuck to the wall now.

 

Currently the whole shelf/brain/jar grouping is part of the armor mesh, but if I can weight it like that, then the whole thing can be an omod, and zapping her head depends on how the outfit is modded.

 

Now if I could just get that glass jar to appear... but that's a separate issue :)

Posted
25 minutes ago, Nebuchadnezzer2 said:

As I mentioned, Crazy did something that way, but I dunno how exactly he did it. Workshop Object builds a 'rack', and on using it, it attaches and starts moving, a dildo attached to it once activated. ?‍♀️

Ah, OK. That's worth looking at, then.

25 minutes ago, Nebuchadnezzer2 said:


Either way, good luck :classic_smile:

Thanks again. I'm starting to think I might get there.

Posted

OK. This is going to work. Here's the mounting block and support bars, correctly positioned.

 

image.png

 

From the front. it's looking pretty good, too.  I need to move the spreader bar down and forward a little, since it's supposed to match up with the sockets on the inside of the StumpZ, and the white plastic part of the prongs seems to have weighted it self against her thighs and has spread out into a triangle, but I can fix that.

 

image.png

 

In case anyone's curious about the process, I made six floating cubes in blender and added them to the base outfit. I gave them names like "head_dummy", "r_hip_dummy", etc.

 

image.png

 

I weighted the cubes normally, checking with nifscope to make sure they were in the right place and not deformed. It took a little trial and error. Then I added a custom bone to each of them, named for the helper. So "head_helper",  "r_hip_helper" etc. And then I painted the helper with that bone, since unassigned bones seem to disappear. I also set up a zap to hide the helpers.

 

I saved that and opened the spreader project in studio. Then I used "Add Project" to include the base outfit project, deleted everything from the base outfit apart from the vag_helper cube, then set that as a reference and weighted everything apart from the dildos to the cube. Then I deleted the cube and saved, making sure I was saving as the spreader and not the base outfit.

 

Then I checked it in nifskope again, and found the mounting assembly way under ground. I had to move the vag_helper bone way above the model's head to get the mount into position. I'm sure that's not the way to do it, but I'm pretty much at the stage of "whatever works" right now.

 

Now I just need to make the rest of the snap-on restraint bars. It may take a little time :)

 

image.png

 

Posted

Not getting very far with that approach, so I thought I'd look into the Crazy Gun approach.

 

Crazy made two nifs. The "main nodes" file looked like this::

 

image.png

 

So that's four nodes (front, back, etc) at an offset from the root, each with a child node further offset by the same amount.

 

The temp nodes nif is just one node. No flags, offset, rotation... nothing special about it that I can see.

 

This is how he used them:

 

        ObjectReference MyMainNodes = target.PlaceAtMe(CrazyMainNodes, 1)
        utility.wait(0.8)
        ObjectReference MyDummyNode01 = MyMainNodes.PlaceAtNode("Front01", CrazyDummyNode)
        utility.wait(0.8)
        caster.MoveTo(MyDummyNode01, 0.0, 0.0, 0.0, true)
        target.SetRestrained()
        caster.ChangeAnimFaceArchetype(AnimFaceArchetypeHappy)
        target.ChangeAnimFaceArchetype(AnimFaceArchetypeHappy)
        MyMainNodes.Delete()
        MyDummyNode01.Delete()

So he puts down the main nodes structure at the gun target, then he puts the single-node dummy on the front01 node of the main,  moves the caster to the dummy node, and then deletes both sets of nodes. So far as I can see, that's all he does with them. I can see it guaranteeing a certain separation and orientation from the target, but apart from that, I have no idea why he did it that way.

 

I shall have a play around and see if I can make it work

Posted

OK. That worked.

 

image.png  image.png

 

 

It came in a little higher off the ground than I was expecting, and I'd love to know why since I took the co-ords from the poster cross mesh in nifscope.

 

I wonder how high off the ground the basic nodes structure spawns...

Posted

Well, that was the right question to ask.

 

image.png

 

Placeatme apparently placed the "nodes" structure about half way up it's height. Which seems really really odd.

 

I suppose I can probably move it down to so they both match z-coords...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...