Jump to content

SexLab Framework Development


Recommended Posts

Posted

 

Im going to state my experiences here with facial animations, lip sync, and jittery mouth problems so that maybe someone else that knows more than me can make something of it and lead to better development.

 

i recently updated to 1.59, before that i was using 1.39b.  When using 1.39b i never noticed much of a problem with facial animations, lip sync, or jittery mouth like others were complaining of.  Either i didnt have that problem or it wasnt bad enough to be noticable.  I had tried some different facial animation mods and mouth and teeth and stuff, i dont know if some files from those could possibly be fixing or masking the problems.

 

After updating to 1.59, there are options for facial animations and lip sync.  Lips dont sync during sex at all now for me wether face animations are on or off.  And the face animations are wierd when turned on, with the mouth always wide open.  i also noticed after and while using gags from zaz on npcs, extremely noticable jittery mouth was going on while npc spoke.

 

I tried to think what had changed, so i installed female facial animations and the old mfg console.  lips still dont sync during sex and the face animations still have the mouth wide open, but when zaz gags are equipped on npc, the mouth jitteryness is almost gone.  Its probably how it was when i had 1.39b and i just didnt notice it.  The mouth is more blurry than jittery, like there is 2 mouths. (I guess it was like 2 mouths before too, just more jitter) I can remove the gag on npc and then select the npc and type mfg reset, and the blurry/jittery mouth stops when npc is talking.  Possibly zaz tried to add mfg expressions to gags in his latest update. o.0

 

I was thinking im not sure what the problem was with animations before FNIS, but maybe, if its the same, that approach could be taken with mfg and lip sync.  Im not much of a modder so i dont understand why you can have facial expressions and lip sync when npc is talking to u, but not when having sex. lol.  but theres bound to be a way.

 

I hope this helps somebody figure something out, because personally i was happier with 1.39b facial animations and lip sync.  Im going to put the files from 1.59 back in since i dont know what problems it will cause.

Amazing, you actually got Lip Syncs to work? I had very much the same problems with Facial expressions when I updated to 1.58b, till I unnistalled Sexlab, disabled all Sexlab mods, loaded up sexless Skyrim, did a Manual Save then exited. Used a Save game script cleaner

Save game script cleaner at Skyrim Nexus - mods and community, this one, to clean my "sexless Save". Installed the new Sexlab, ran FNIS, Fired up Skyrim, waited for MCM to update then did a clean & rebuild. Lost my stats in Sex journal but got my "Normal" expressions back. I can only guess that some orphan scripts were causing my expressions to go Wacko. That was with a 1.57 to 1.58b upgrade, with 1.59 using a script cleaner isn't just recomended, but crucial.

 

You said 1.39 ? Version 1.39 only needed FNIS 5.02, Sexleb 1.58 & later requires FNIS 5.11 & SKSE 1.71 .

 

 

lip sync worked for me in 1.39b, it doesnt now.  Its not a dirty save issue for me since i started a new game and i have updated fnis, skse.

 

Posted

Ashal, I think msysgit and tortoisegit have been updated since you posted your instructions. I'm not getting the download following your steps. In the initial gitclone pop-up there are a lot of empty tick boxes and one checked called Load Putty Key.

I'm getting the following in the results box:

 

 git.exe clone --progress -v "http://git.loverslab.com/sexlab/framework" "F:\Games\Bethesda Softworks\Skyrim\Mods\sexlab\framework"

Cloning into 'F:\Games\Bethesda Softworks\Skyrim\Mods\sexlab\framework'...
fatal: repository 'http://git.loverslab.com/sexlab/framework/' not found

git did not exit cleanly (exit code 128) (499 ms @ 8/30/2014 11:47:48 AM)

 



Am I missing something obvious?

Posted

Ashal, I think msysgit and tortoisegit have been updated since you posted your instructions. I'm not getting the download following your steps. In the initial gitclone pop-up there are a lot of empty tick boxes and one checked called Load Putty Key.

 

I'm getting the following in the results box:

 

 git.exe clone --progress -v "http://git.loverslab.com/sexlab/framework" "F:\Games\Bethesda Softworks\Skyrim\Mods\sexlab\framework"

 

Cloning into 'F:\Games\Bethesda Softworks\Skyrim\Mods\sexlab\framework'...

fatal: repository 'http://git.loverslab.com/sexlab/framework/' not found

 

git did not exit cleanly (exit code 128) (499 ms @ 8/30/2014 11:47:48 AM)

 

 

Am I missing something obvious?

 

 

Still works fine for me.

 

Are you putting in "http://git.loverslab.com/sexlab/framework.git" or "http://git.loverslab.com/sexlab/framework" like your error messsage suggests? You need the .git

Posted

I cut and pasted directly from your post.  I must have posted the error from one of my many stab-in-the-dark trials.  I get a little farther when I check boxes at the bottom of the popup window, but it still errors out.  Could there be something you set a long time ago that maybe isn't the default?  I'm going with all the default settings, because I've never used git in any way shape or form before.

 

 

EDIT: I did it again and got the same error as before, then while I was typing this post, I did it again and now it's working.  Maybe a glitch in my connection?!?  Okay, as I said, I'm new to this.  Is there anywhere you have posted what you're looking for from your testers?

Posted

I cut and pasted directly from your post.  I must have posted the error from one of my many stab-in-the-dark trials.  I get a little farther when I check boxes at the bottom of the popup window, but it still errors out.  Could there be something you set a long time ago that maybe isn't the default?  I'm going with all the default settings, because I've never used git in any way shape or form before.

 

Here's a screenshot of the settings I just tried and it worked with. Basically everything is left at the default, just right click the folder, select "Git Clone..." paste in the git url. I also deleted the extra "framework" folder it tries to put it in so it installs directly to the folder I selected, that way it works nicely with  ModOrganizer.

 

gitclone.png

 

EDIT:

 

EDIT: I did it again and got the same error as before, then while I was typing this post, I did it again and now it's working.  Maybe a glitch in my connection?!?  Okay, as I said, I'm new to this.  Is there anywhere you have posted what you're looking for from your testers?

 

Just make sure you switch to the development branch after cloning, master branch is the latest official release, development branch keeps a rolling release of any changes I upload as I implement them. Sometimes it may be broken, but I try to only ever upload new commits to the development branch after I tested them in game enough to be confident nothing to obvious is busted. Sometimes things I haven't tested for do slip through the cracks though.

 

It should be fairly safe to use in a main save though, so long as you don't get upset about stats or settings occasionally resetting. I use it in my main save, along with the many in between/busted versions I work on before uploading new development builds, and have never had an issue with the development build that's forced me to entirely scrap a playthrough.

 

Not really looking for anything in particular to be tested right now, just give it a play and report anything you find strange. Although I did JUST upload a new development build that does some majorish tweaks to the scene ending process to help prevent actors not fully resetting afterwards and such, a problem only a few people seem to have.

 

 

Posted

So far, the only issue I'm having is with the "automatic" free camera.  When the scene starts (I'm using Enhanced Camera) I am forced back into 3rd person and can move the camera normally as if I'm holding the "F" key, but the auto free cam isn't working at all for me.

 

My only complaint with the end scene is it replays several times if you have the timer set longer than the animation.  For example, in the forced threesome, the one in the middle gets kicked over three times and gets back to her knees.  I'd rather have the ending timer dependent on the end sequence of the given animation, rather than trying to force the animation to continue until the player-set timer runs out.

 

Anyway, I'm going to change my load order around a bit and check my mod .ini files to make sure I haven't screwed up the free cam, myself.

Posted

Hi Ashal, I have a request:

I know maybe it's not strictly 'sex' related but it would be nice to have in the framework a key that strip and redress the player without an animation.

That would be for immersion purpose, as I would like to have a quick option to strip the player before entering in waters or pools but only when I want,

so the keybinding. (to not freezing to death with frostfall :P )

As I look at your code I assume that all the stuff  needed is already there, and it wouldn't be much hard to implement.

I tried to do it myself as some exercise but I'm having hard time compiling scripts as I run CK with MO and I know It's a PITA and I still have to figure out

why scripts needed for compilation are not detected by the compiler  while they are surely there, but that's another story...

 

some way to extend to followers too would be great , later...

what do you think?

 

Thanks for your amazing work, truly fantastic 

Posted

Hi Ashal, I have a request:

I know maybe it's not strictly 'sex' related but it would be nice to have in the framework a key that strip and redress the player without an animation.

That would be for immersion purpose, as I would like to have a quick option to strip the player before entering in waters or pools but only when I want,

so the keybinding. (to not freezing to death with frostfall :P )

As I look at your code I assume that all the stuff  needed is already there, and it wouldn't be much hard to implement.

I tried to do it myself as some exercise but I'm having hard time compiling scripts as I run CK with MO and I know It's a PITA and I still have to figure out

why scripts needed for compilation are not detected by the compiler  while they are surely there, but that's another story...

 

some way to extend to followers too would be great , later...

what do you think?

 

Thanks for your amazing work, truly fantastic 

 

http://git.loverslab.com/sexlab/framework/wikis/actor-functions Check the StripActor() and/or StripSlots() functions. They have a DoAnimate argument you can set to false.
Posted

 

Hi Ashal, I have a request:

I know maybe it's not strictly 'sex' related but it would be nice to have in the framework a key that strip and redress the player without an animation.

That would be for immersion purpose, as I would like to have a quick option to strip the player before entering in waters or pools but only when I want,

so the keybinding. (to not freezing to death with frostfall :P )

As I look at your code I assume that all the stuff  needed is already there, and it wouldn't be much hard to implement.

I tried to do it myself as some exercise but I'm having hard time compiling scripts as I run CK with MO and I know It's a PITA and I still have to figure out

why scripts needed for compilation are not detected by the compiler  while they are surely there, but that's another story...

 

some way to extend to followers too would be great , later...

what do you think?

 

Thanks for your amazing work, truly fantastic 

 

http://git.loverslab.com/sexlab/framework/wikis/actor-functions Check the StripActor() and/or StripSlots() functions. They have a DoAnimate argument you can set to false.

 

 

Yeah, I saw that, that's why I come with the idea to utilize your framework without reinventing the wheel...

I just been able to compile my script (basically I have to put the needed sources in the clean data dir, I'm using MO...) and maybe slowly I will get there, with a configurable MCM keybinding and a toggle on/off of the key.. that's my simple idea

In the meantime I learn some of your API

thanks

Posted

Noticed something else.  The transition between first and third person is slower and smoother, rather than an instant change, but I think this should be optional.  It's one of those things that seems logical, but may become annoying over time.

 

EDIT: Still no auto free cam, but I did get the toggle free cam to work by remapping the key.  For me, the "home" key is glitched for remapping.  I don't know why, maybe it's bound to something else and I don't know it.  I remapped the toggle free cam to a number pad key and it's working just fine.

Posted

The option to resize actors temporarily to an average height works really well, but is there a way to make it so that it only happens when you have multiple humanoid characters involved? Some creatures have varying sizes but look tuned to assume that they're scaled larger or such, and the automatic resizing seems to happen to them too, which throws things off a bit as well.

Posted

So baring real life what is the status on the up and coming version of Sexlab? Any new updates or features? Or have things been too busy and real life needed to take priority?

 

Either way keep it up! :D

Posted

Ashal, I've been testing daily, with a plethora of mods, both adult and otherwisw.  I've experienced no more frequent CTDs or incompatibilities.  I'm getting used to the slow third-to-first person transition and I'm starting to like it.

 

One feature request though: Is there a way to establish a "safe zone"?  A safe house or, ideally, a safe area.  I ask here because it would be easier to have a master command in SL than to ask each individual modder to put one in. 

 

The reason I ask is this: I'm running Sexlab Aroused, Creatures Aroused, Spouses Enhanced, Lover's Comfort, and Random Sex, as well as Sanguine's Debauchery.  Well, I have Lakeview Manor extended and a total of six children running around the property.  With all the above mods, and undoubtedly others, running, the PC can't have pets in the house or step outside without someone or something demanding sex from her . . . right in front of her children.  The property is gated, and although there are still issues with spawn points, everyone inside the gate is either an employee, a follower, or a family member.  While I can pretend the master bed has a curtain around it so the kids can't watch and with the "cloak" effect, they don't wander up and greet Ma while she and Dad are going at it, I just can't see the PC and the family dog screwing on the dining room floor while everyone else is sitting there eating.  It is also a bit weird to have the one who claims to be her "Sword and her shield" forcing the Dragonborn into a pillory against her will.

 

Ideally, I'd like to be able to declare all of my homes and grounds "rape-free" zones (not consensual sex-free, obviously); I would be content with simply being able to cast a spell on one single interior so that my poor PC can have a little cool down time.

 

I do know I can use the MCM to turn off most mods, but it's a little inconvenient to do that every time I go home. Sometimes I don't even know which mod is responsible for which act.

Posted

A curious epiphany I just had for a new major feature. I'm unsure as to it's feasibility, but I think it'd be doable. 

 

Basically, an "Auto-Align" hotkey for animations that would attempt to  auto-adjust an animations current alignment to the actors - completely independent of the body mod or skeletons a user might be using.

 

Technically, I see I imagine it functioning as a sort of ball + socket relationship using skeleton nodes. So for example, given a blowjob animation; a skeleton node on the male's groin would be the ball, and a skeleton node around the females mouth the socket. So say the male's groin was +30 up on the Z-axis, and the females mouth was +35 on the Z-axis, then lower the female's positioning by 5 units on the Z-axis and they should line up better, followed by a similar process for how much it should push the actors closer/further apart.

 

That's a relatively simplified version of the idea, as far as I can think out the idea at the moment I think everything needed is there to make it happen. There is functions to get the world coordinates of skeleton nodes, the tricky part I think will be having to decide on which nodes should be used as the ball+socket individually on animations, how then to automatically decide on what it needs to adjust, and what sort of tolerances it would need to make them line up best such as this node should be within 3 units distance of this node for optimal alignment.

 

Going to try prototyping it out in a bit. If it looks promising I'll probably end up pushing the release of 1.59b out another week or two so I can finish it.

Posted

Completed a very basic prototype using my previous example of a blowjob animation as the basis and had mixed-good results.

 

Here's random assortment of notes and/or thoughts related to the testing. I'm more typing it all out here for my own benefit, but I may as well share them as well incase anybody else has some thoughts or suggestions related to it.

 

Notes: 

  • Tested using AP Kneeling Blowjob as the animation to auto align, I set it's default alignment to be very out of alignment so the effect would be noticeable.
  • For the female actor I aligned off of the "NPC Head [Head]" node
  • For the male actor I aligned off of the "Schlong" node - an actual release version should probably consider using a non SOS related bone instead, I'm thinking either "Skirt" or "Tails" ?
  • Actors move while animating (surprise!) so naturally so does the position of their nodes. This makes determining the optimal distance between the nodes a bit problematic.
  • I went with AP Kneeling Blowjob because it seemed the most basic to develop a proof of concept around. During prototyping I noticed the above problem with actor movements due to the females looped movement where the head would move slightly up and down the Z-Axis within a range of ~3.0
  • The 4th stage of AP Kneeling Blowjob however, made it a good test case since this stage has relatively few up/down movements of the head. 
  • Using the stationary 4th stage as starting base, I aligned the female and male actor as best I could using traditional means, once aligned the difference in Z-Axis between the female and male's chosen nodes was roughly -1.6 to -2.0.
  • Plugging this number into a simple formula of
    • move female actor Z amount = 0.5 * ((male_schlong_z - female_head_z) + -1.6) 
    • move male actor Z amount = -0.5 * ((male_schlong_z - female_head_z) + -1.6)
    • this split the difference of the distance between the two actors, with one going up half the needed amount and the other going down half the needed amount; thus the effect of moving 1 actor a great distance is less noticeable since the other compensates.
  • Automatically adjusting the actors exactly by the resulting amounts results in nearly the exact expected alignment.
  • Fine tuning the -1.6 to -2.0 number would likely result in improved alignments.
  • Would this number apply to all animations that should align off head->groin? Presumably the height distance between head and schlong would be the same for all upright oral animations?

 

Problems/Solutions:

  • The moving actors when pulling coordinates of the nodes is a big one. It makes one off readings of the node unreliable as reading the coords off one actors node can result in wildly different output depending on how far they have progressed in the animation loop's frames.
  • As a possible solution I tried having it take an average difference in 10 over the course of 3 seconds. Using the average difference as the base number when getting the adjustment numbers resulted in decent alignment on the more head moving stages of the animation, but not exactly perfect either. With some fine tuning it may be better, but I'm having trouble thinking of any other solutions at the moment.
  • Someway to pause the animations on the first frame of animation for both actors would be the absolute ideal way of getting the node coordinates.
Posted

 

SNIP

 

It sounded like a miracle breakthrough in aligning animations, while it is a step forward it's not without it's issues.

It was a very good lead however.

Posted

 

 

SNIP

 

It sounded like a miracle breakthrough in aligning animations, while it is a step forward it's not without it's issues.

It was a very good lead however.

 

 

With my current testing results I'm confident that if decent tolerance numbers + nodes can be decided on for each animation/stage it could absolutely provide a "good enough" result for most people with at the worst requiring only small adjustments after the auto alignment. Further testing and development of it may improve that or at the very least make the implementation easier without having to fiddle with literally every single animation stage to figure out the ideal tolerance to set for each. 

 

If I can figure out a decent implementation of the system however, I'm leaning towards adding an automatic alignment system that runs the system at the start of every stage so all animations just automatically use it, and then can be fine tuned further with hotkeys only if needed. 

 

The only thing I'm REALLY unsure about at this point though is sideways adjustments. If an animation is out of alignment from the side I don't think there will be much I can feasibly do to correct that. At Least not without greatly complicating the system as is. Automatic alignment of just up/down and forward/back adjustments however I think will resolve 95% of alignment issues.

 

Though frankly I've never had any major alignment issues that a few quick taps of the adjustment hotkeys don't fix already.

 

On the other hand anybody expecting perfect alignment in either current SexLab or with this feature are nothing short of insane and clearly have no clue how troublesome Skyrim is with these issues.

 
Posted

 

 

 

SNIP

 

It sounded like a miracle breakthrough in aligning animations, while it is a step forward it's not without it's issues.

It was a very good lead however.

 

 

 

The only thing I'm REALLY unsure about at this point though is sideways adjustments. If an animation is out of alignment from the side I don't think there will be much I can feasibly do to correct that. At Least not without greatly complicating the system as is. Automatic alignment of just up/down and forward/back adjustments however I think will resolve 95% of alignment issues.

 

.

 

 

Since you are measuring distances from nodes, can't you do the same with sideways? Although, you will have to take the measurements of perhaps a spinal node and make sure they are in the same X or Y plane depending one the alignment. But that would only work on animations like from behind sex animations where sideways is easy to do. But a sideways animation would be more tricky since the nodes would be diagonal from each other. So only a parallel plane would work from a certain distance, however, you can't really configure that since bodies, skeletons, and scales vary from person to person.

The only instance to make sure that sideways adjustments would work would in where they are aligned on the same plane, lets call it X for easiness. So a doggystyle animation would benefit from this method. to make sure that the head / spinal / penis node (I guess?), assuming skeletons don't' have scoliosis, are in the same plane. But then we would have to take orientation into account and that would be a gawd awful lot of math. to calculate angles from respective planes in accordance to an already.

 

Good god with this, I'm taking a physics and linear algebra class together and I don't really want to think about third dimension mathematics anymore. I'm an applied mathematics major.

 

I think I was just rambling with no meaning.... :D scratch everything I said lolz

 

If I get a epiphany I'll post again :D

Posted

The problem with sideways adjustments is that calculating their distance is the exact same as calculating the the distance for forward/backward. The only difference is you flip the cosine and sine of the center's z rotation. So as far as my completely untested and bad at math guess on the matter tells me - this would make calculating both unreliable, as adjusting one would completely alter the other. So you would have to calculate both in one go, which may in turn negate the effect of any sideways adjustment to begin with, making it essentially no different than telling it to ignore any sideways adjustment.

 

It's also just entirely possible I've been doing sideways adjustments wrong for the entirety of SexLab. I've noticed on more than a few occasions that using the adjust sideways hotkey can sometimes be really unpredictable and instead adjust more diagonally than it is sideways.

 

Disclaimer: I flunked math and never made it past a C in geometry class, my basis of any knowledge for aligning characters in skyrim is entirely based off what I learned either reading semi related stuff on Google, or what I copied out of SexiS when originally developing SexLab. Math-wizards should at all cost avoid looking at my atrocious attempts at writing a leveling-curve "formula" in the sexlab skills scripts...

Posted

 

 

 

SNIP

 

It sounded like a miracle breakthrough in aligning animations, while it is a step forward it's not without it's issues.

It was a very good lead however.

 

 

With my current testing results I'm confident that if decent tolerance numbers + nodes can be decided on for each animation/stage it could absolutely provide a "good enough" result for most people with at the worst requiring only small adjustments after the auto alignment. Further testing and development of it may improve that or at the very least make the implementation easier without having to fiddle with literally every single animation stage to figure out the ideal tolerance to set for each. 

 

If I can figure out a decent implementation of the system however, I'm leaning towards adding an automatic alignment system that runs the system at the start of every stage so all animations just automatically use it, and then can be fine tuned further with hotkeys only if needed. 

Have you thought of doing this to a smaller degree over several animations? The first time run rough set up to get the alignment up and running then each animation afterward when used can do more and more fine tuning? The persistent storage of the results can in time create a near perfect alignment of the bodies, correct? Then even less tweaking of the animation would be needed.

 

Also, if the issue is harder to resolve with *any* skeleton. Perhaps you can do this with just one skeleton. Then the results would be more predictable and reliable. Would still work with others but only one would be supported. Easier to work with and more dependable.

 

 

The problem with sideways adjustments is that calculating their distance is the exact same as calculating the the distance for forward/backward. The only difference is you flip the cosine and sine of the center's z rotation. So as far as my completely untested and bad at math guess on the matter tells me - this would make calculating both unreliable, as adjusting one would completely alter the other. So you would have to calculate both in one go, which may in turn negate the effect of any sideways adjustment to begin with.

If you did the above where all animations are tweaked in real time during run. The Odd times used could be forward/back and up/down with the even ( second time) being sideways but at a decreased %. ( added math line). Say adjustment during that alignment process at 10% of the movement allowed during the first ( odd) time. Seems less issues with side to side.

 

One= forward/backward and UP down

two= side to side ( smaller)

three= more forward/backward etc

four= side to side

 

Two processes run at alternate times. Give an animation about 4 times to run and 90% or more of the adjustments would be done. Oh I would also think a toggle in MCM would be best to turn this function on or off . for those that want to do the adjustments themselves or after they get great results to lock it in.

 

Of course I might be under/over thinking it.

Posted

Maybe starting scenes between two actors with with a check that places both actors in the same coordinates standing upright, and than recording the distance between various nodes such as mouth -> groin, groin -> groin, breast -> groin, and so forth. Thus building up a sort of profile for the differences between the two actors and then feeding those numbers in some way into the normal alignment calculations.

 

Getting those numbers would be relatively easy, figuring out how to then apply them in any meaningful way in the alignments however is completely and utterly beyond me.

Posted

The problem with sideways adjustments is that calculating their distance is the exact same as calculating the the distance for forward/backward. The only difference is you flip the cosine and sine of the center's z rotation. So as far as my completely untested and bad at math guess on the matter tells me - this would make calculating both unreliable, as adjusting one would completely alter the other. So you would have to calculate both in one go, which may in turn negate the effect of any sideways adjustment to begin with, making it essentially no different than telling it to ignore any sideways adjustment.

 

It's also just entirely possible I've been doing sideways adjustments wrong for the entirety of SexLab. I've noticed on more than a few occasions that using the adjust sideways hotkey can sometimes be really unpredictable and instead adjust more diagonally than it is sideways.

 

Disclaimer: I flunked math and never made it past a C in geometry class, my basis of any knowledge for aligning characters in skyrim is entirely based off what I learned either reading semi related stuff on Google, or what I copied out of SexiS when originally developing SexLab. Math-wizards should at all cost avoid looking at my atrocious attempts at writing a leveling-curve "formula" in the sexlab skills scripts...

 

You flunked mathematics and yet you're making this amazing framework, I'm astounded.

Ironically I understand math very well, yet am terrible at any attempt at any computer wizardry.

Yes, I've tried.

 

I'm trying to think of ways for orientation on Skyrim's X Y Z coordinate system, but I keep running into the issue of how to calculate planes to make sure they are lined up, and I keep getting the issue of the infinite many solutions because of free variables that could be any number. But I think I'm just brain farting right now (currently on break from my physics homework lurking on the forums)

 

Maybe a picture :D what I'm thinking instead of typing :D

post-48180-0-87550200-1409807459_thumb.jpg

 

Infinite solutions sets funnnn

 

Maybe a check to make sure that either X or Y is equal to another X or Y of another Node and from there adjust?

 

If X1 = X2, then set Y1 - Y2 = distance you want, if not move to next one

if Y1 = Y2, then set X1 - X2 = distance you want, if not move to next

Whichever set of values has the least distance between them, move them to the same plane

X1 - X2 or Y1 - Y2 (determine which is smaller) and make that one the same value to align them sideways. from there adjust accordingly?

Posted

if it helps in understanding any, here is the function that calculates an actors alignment:

	void OffsetCoords(StaticFunctionTag* base, VMArray<float> Coords, VMArray<float> CenterLoc, VMArray<float> OffsetBy){
		float x, y, z, r, sinZ, cosZ, var;
		OffsetBy.Get(&x, 0);
		OffsetBy.Get(&y, 1);
		OffsetBy.Get(&z, 2);
		OffsetBy.Get(&r, 3);
		// Cos / Sin of center Rot Z
		CenterLoc.Get(&var, 5);
		sinZ = std::sin((var * M_PI / 180));
		cosZ = std::cos((var * M_PI / 180));
		// X
		CenterLoc.Get(&var, 0);
		var += (sinZ * x) + (cosZ * y);
		Coords.Set(&var, 0);
		// Y
		CenterLoc.Get(&var, 1);
		var += (cosZ * x) + (sinZ * y);
		Coords.Set(&var, 1);
		// Z
		CenterLoc.Get(&var, 2);
		var += z;
		Coords.Set(&var, 2);
		// Rot X,Y (copy center)
		CenterLoc.Get(&var, 3);
		Coords.Set(&var, 3);
		CenterLoc.Get(&var, 4);
		Coords.Set(&var, 4);
		// Rot Z
		CenterLoc.Get(&var, 5);
		var += r;
		if (var >= 360)
			var -= 360;
		else if (var < 0)
			var += 360;
		Coords.Set(&var, 5);
	}

It may be hard to read some assuming you aren't familiar with SKSE's API or basic C++ in general. But to break it down it's basically this:

 

  • Every scene of SexLab starts with marking a location as it's center, it records this centers x,y,z for both translation and for rotation; actors use these coordinates as their basis for alignment.
    • These center coords are sent to this SKSE function as the "CenterLoc" array argument.
  • Most skyrim sex animations are made with the actors technically offset from each other so they aren't really occupying the same place while animating with another actor which would cause them to push away from each other.
    • Most of the time these are set as making one of the two actors offset by 45-110 units forward/backwards in the animation, and occasionally (especially with AP animations) a 180 degree rotation of one of the actors as well.
    • These offsets are sent to this SKSE function as "OffsetBy" array, which holds these values from start to finish:
      • x = forward adjustment
      • y = sideways adjustment
      • z = upward adjustment
      • r = Z-axis rotation
    • The default offsets SexLab ships with has the users customized adjustments placed on top of these values. Pressing the forward hotkey twice for example adds 0.75 x 2 on top of the the value normally sent for x / forward here.
  • The "Coords" array sent to this SKSE function, is an empty float array that by the end of the function contains the CenterLoc coordinates altered by the given values of the OffsetBy array.
  • Rotation x and y are entirely unimportant and simply copied into the Coords array here, since changing them would alter the actors on a diagonal basis completely unnecessarily, and are ultimately ignored by the Skyrim engine anyways. Actors apparently can't be crooked, at least not without also making their root skeletons crooked.
  • (sinZ * x) and (cosZ * x) are the forward adjustment to the coordinates.
  • (cosZ * y) and (sinZ * y) are the sideways adjustments to the coordinates.
Posted

Hm, hit a snag with trying to figure it out for forward adjustments. I have it accurately working with Up/down adjustments on the Z-axis. However with forward adjustments, they are on a 3d plane. After playing with it some I'm left completely clueless on how to best calculate how much the actor needs to be moved forward or backward.

 

I have a calculation for getting the distance between the two skeleton nodes, however after some testing I realized a major flaw in that; if the two actors nodes have a distance between them of 10 units, that does nothing to tell me if that is 10 units back or 10 unites forward, since it's just distance it could be either way and I haven't a clue how to determine if I should be subtracting or adding 10 units to the actors forward alignment.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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