- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Ways to move the upper body on LookAtManager
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Ways to move the upper body on LookAtManager
Replies: 3 (Who?), Viewed: 166 times.
#1
Yesterday at 3:50 PM
Posts: 3,880
Thanks: 9028 in 69 Posts
Ways to move the upper body on LookAtManager
Hey everyone!This is probably going to be a far stretch, but i've run into a little annoyance (not necessarily an issue, but just annoying).
I'm currently working on maintaining Virtual Artisan's Pose Addon and fixing some bugs (and adding some of my own features! ) but i've come across an issue when looking at the "look at" code.
Right now I got this:
Code:
Actor.LookAtManager.EnableLookAts(); Actor.LookAtManager.SetInteractionLookAt(gameObject, 20000, LookAtJointFilter.EyeBones); Actor.OverlayComponent.UpdateInteractionFreeParts(AwarenessLevel.OverlayUpperbody); Actor.LookAtManager.DisableLookAts(); PoseManager.SetCurrentPose(Actor, currentPose); Target.PlaySoloAnimation(Actor.SimDescription.IsHuman, Actor, currentPose, true, ProductVersion.BaseGame); Actor.ResetAllAnimation(); Actor.WaitForExitReason(float.MaxValue, ExitReason.UserCanceled); Actor.LookAtManager.EnableLookAts(); return true;
It works! But, here's the catch: When a sim is posed, and there is an object right next to them, they only ever so slightly move their head, rather than rotating it like, well, we humans would!
Example:
Here, Morgana is posed normally. No looking at anything.
Here she's "looking" at the bookcase.
As you can see... it's not really "looking".
Now what I've tried so far:
1. Changing the LookAtJointFilter from eyes to HeadBone or even TorsoBone, but none have any effect.
2. Joinging them through bit assignment (like so: LookAtJointFilter.EyeBone & LookAtJointFilter.TorsoBone), but nothing works.
3. Made my own Look At task! (Yep I went this far into the rabbit hole lol), changing the Torso Percentage and threshold, but nothing changes it. In fact, I'm convinced this code is pretty much abandoned by EA at some point and is mostly calculated internally now.
4. Changed the "UpdateInteractionFreeParts"param to have AwarenessLevel.OverlayBothArms, since eventually that seems to tell the game to use the torso fully.
5. Also tried "bit assigning" the awarenesslevel like 2.
6. Changed the LookAtManager tuning for human sims, and that got me to the conclusion that EA must've replaced most of the code and doing stuff internally, because I set the values to pretty insane numbers (High and super low) and it still had the same effect.
But it just keeps being so subtle! :/
My question is: Is there a way for the sim to ACTUALLY move their torso towards the item they're looking at, or at least a more extreme version of a head turn?
Currently I'm getting so desperate that I wonder if a better approach would be using "sliders" here. Similar to how the Growth mod by Consort does it.
Thanks in advanced!
Advertisement
#2
Yesterday at 7:49 PM
The poses/animations themselves do have some influence on how much the sim's head turn, which in this case since she's looking to her left in the pose, so it probably will limit how much she can look to her right. Have you also tried removing the disable look ats line or waiting a couple sim minutes before calling it? It could be interrupting the look at function too early so the sim doesn't get enough time to look at something, but this is just speculation based on what I've seen with animations. And about the torso turning, I don't think I've ever seen sims actually turn their body towards something to look at it like in sims 2 and 4, so it might not even be a thing in the game itself, but I might be wrong (hopefully).
- When one gets inspired by the other, the one inspires another - Anything is Possible.
You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
- When one gets inspired by the other, the one inspires another - Anything is Possible.
You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
#3
Today at 12:10 PM
Posts: 3,880
Thanks: 9028 in 69 Posts
Quote: Originally posted by TheSweetSimmer
The poses/animations themselves do have some influence on how much the sim's head turn, which in this case since she's looking to her left in the pose, so it probably will limit how much she can look to her right. Have you also tried removing the disable look ats line or waiting a couple sim minutes before calling it? It could be interrupting the look at function too early so the sim doesn't get enough time to look at something, but this is just speculation based on what I've seen with animations. And about the torso turning, I don't think I've ever seen sims actually turn their body towards something to look at it like in sims 2 and 4, so it might not even be a thing in the game itself, but I might be wrong (hopefully). |
I was wondering if I should reach out to you about this issue, lol. (Since you're pretty much TS3's queen of animations :p) but thanks for the quick reply!
I think you're right in regard to the way certain poses can be the bottleneck. Though, the reason I thought this may work, is due to the fact that when I've been working on the "OverlayComponent" parts of things (such as changing the facial expressions), and tell it to use, say, the torso bones, it will actually, well, use it as requested.
Though, I think the mistake I made, is that the lookAtManager in some degree uses the overlay component, but is actually its own thing. Meaning that the handling is simply not done the same way as the overlayComponent does.
So, I ran some tests to figure out how much of the API actually triggers the engine's function internally when triggering lookatmanager. I made 2 quick dialogues, where one I grab the OverlayLevels/AwarenessLevel to free the parts that I want having to check the item out, and then another one where I tell it to simply grab the JointFilter i want to use.
And to explain my reasoning of why I think EA has completely abandoned this code and instead doing stuff internally, here are some examples:
1. Variation used: OverlayLevel = All (head, spine and face should move), LookAtJointFilter = Torso
Expected result: Torso rotates somewhat towards the bookcase.
Actual result:
2. Variation used: OverlayLevel = Face, LookAtJointFilter = Eyes.
Expected Result: Eyes try looking at the bookcase, but doesn't move head/torso.
Actual result:
And before you ask, nope! Those are both seperate images Initially I thought I spotted at least the neck not being moved, but that's actually just wishful thinking.
I've also gone ahead and see if your suggestion disableLookAt() was the issue, but that actually still gave the same result, assuming I added only one like of EnableLookAt() of course.
I tried some other results too, but all gave the same result. Meaning... that all the Look At stuff was once probably pretty versitile, but then EA decided to make the system better by calculating the rotation of the bones internally. That's my guess anyways.
So... I think I will either just accept things right now as they are, or try to see if I can somehow make a similar system myself, with the actual OverlayComponent. In the end, I just want to make sure that poses can pose the way we want to.
So I might turn this into a research thread if I get closer to an answer! In case other people need it... for science!
#4
Today at 9:58 PM
Quote: Originally posted by Lyralei
I was wondering if I should reach out to you about this issue, lol. (Since you're pretty much TS3's queen of animations :p) but thanks for the quick reply! I think you're right in regard to the way certain poses can be the bottleneck. Though, the reason I thought this may work, is due to the fact that when I've been working on the "OverlayComponent" parts of things (such as changing the facial expressions), and tell it to use, say, the torso bones, it will actually, well, use it as requested. Though, I think the mistake I made, is that the lookAtManager in some degree uses the overlay component, but is actually its own thing. Meaning that the handling is simply not done the same way as the overlayComponent does. So, I ran some tests to figure out how much of the API actually triggers the engine's function internally when triggering lookatmanager. I made 2 quick dialogues, where one I grab the OverlayLevels/AwarenessLevel to free the parts that I want having to check the item out, and then another one where I tell it to simply grab the JointFilter i want to use. And to explain my reasoning of why I think EA has completely abandoned this code and instead doing stuff internally, here are some examples: 1. Variation used: OverlayLevel = All (head, spine and face should move), LookAtJointFilter = Torso Expected result: Torso rotates somewhat towards the bookcase. Actual result: 2. Variation used: OverlayLevel = Face, LookAtJointFilter = Eyes. Expected Result: Eyes try looking at the bookcase, but doesn't move head/torso. Actual result: And before you ask, nope! Those are both seperate images Initially I thought I spotted at least the neck not being moved, but that's actually just wishful thinking. I've also gone ahead and see if your suggestion disableLookAt() was the issue, but that actually still gave the same result, assuming I added only one like of EnableLookAt() of course. I tried some other results too, but all gave the same result. Meaning... that all the Look At stuff was once probably pretty versitile, but then EA decided to make the system better by calculating the rotation of the bones internally. That's my guess anyways. So... I think I will either just accept things right now as they are, or try to see if I can somehow make a similar system myself, with the actual OverlayComponent. In the end, I just want to make sure that poses can pose the way we want to. So I might turn this into a research thread if I get closer to an answer! In case other people need it... for science! |
Hehe it's just a result of loving this game so much plus loving animation so much
I did some tests in my game and it does seem like there's no way to force the sim to look at something completely, or like ignore any offset from the pose. But, I did try a workaround to get a sim who is posed looking to their right to be able to look to their left with the help of a friend, track masks! In the picture below all of the sims are posed to look to their right (all using the same one too), but with a custom track mask I made a pose of the sim looking to their left and used it for the track mask, then made 2 sims look at the lamp to their left, which resulted in this:
(They're using the EA loading screen y sim pose, looks a little silly I know) The first sim has no track mask and isn't looking at anything, so basically exactly how the pose is supposed to look like. The second sim doesn't have a track mask, but is trying to look at the lamp. The third sim does have a track mask and is trying to look at the lamp, which she succeeds in.
Another example with a very simple pose of my own (but for some reason the second sim can't offset her head at all even though she's still trying to look at the lamp)
So it is possible to get them to look at stuff that normally they wouldn't be able to because of the pose. The same can be applied to the torso too (I could show an example later for it).
I don't know if you know about track masks, but a quick explanation if you don't: They're basically pose overlays that stay on the sim until they're reset or stopped with a jazz script (or overridden by another pose). You can make custom ones, which I did for this test and set the head and neck bones to be used, but at 0.5 influence instead of 1. Because it's not fully influenced, it blends the two poses together so the second sim's head is not completely turned to the left:
^ The first sim is not looking at anything, and using a custom pose where they're looking up. Second one isn't looking at anything either and is using the same pose, but has a track mask combined with another pose of looking to the left.
So you could create 4 poses of the sim looking to their left, right, up and down and use them when you add a track mask to the head and neck (or torso as well) using a jazz script, like this:
Then you could make them into interactions! But make sure to add one to remove the track mask too. I can explain more and give more examples if you want since I feel like my explanations were pretty sloppy, but I'll be on vacay starting tomorrow for my birthday on Friday so I won't be very active again until the weekend
- When one gets inspired by the other, the one inspires another - Anything is Possible.
You can view some of my WIPs and other stuff for TS3 on my Twitter here ---> https://twitter.com/SweetSavanita
Who Posted
|