• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-1299
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Simon Linden
Reporter: Darien Caldwell
Votes: 10
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

Sit Targets created under Havok 1 are offset under Havok 4

Created: 28/Jan/08 01:03 AM   Updated: 25/Aug/08 06:37 AM
Return to search
Component/s: Scripts
Affects Version/s: Havok4 Beta
Fix Version/s: Havok4 Beta

File Attachments: None
Image Attachments:

1. H1 Default Sit.jpg
(38 kB)

2. H1 Sit part2.jpg
(92 kB)

3. H1 Sit.jpg
(108 kB)

4. H4 Adjusted Sit.jpg
(55 kB)

5. H4 Sit part2.jpg
(107 kB)

6. H4 Sit.jpg
(107 kB)
Issue Links:
Duplicate
 
Relates

Linden Lab Issue ID: DEV-10102


 Description  « Hide
Given identical furniture, Avatars seem to sit offset under Havok 4 as compared to Havok 1. See attached photos. The chair used is called Seagel's 1 Prim Sit Anim Stool(ver0.3). However this was observed on all furniture no matter the type or maker. In this particular furniture, the sit target is set to:

vector sit_pos = <-1, 0, -0.5>;
vector sit_rot = <0, -90, 0>;
llSitTarget(sit_pos, llEuler2Rot(sit_rot*DEG_TO_RAD));

As the pictures show, under Havok 4 the avatar sits higher than they do under Havok 1.

Both pictures were taken using the same stool along with the same backgroud and same avatar wearing no shoes. The only variable was the sim and server version (H1 sim was Narcolepy and H4 sim was Hypnos, if it matters).



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Darien Caldwell made changes - 28/Jan/08 01:06 AM
Field Original Value New Value
Description Given identical furniture, Avatars seem to sit offset under Havok 4 as compared to Havok 1. See attached photos. The chair used is called Seagel's 1 Prim Sit Anim Stool(ver0.3). However this was observed on *all* furniture no matter the type or maker. In this particular furniture, the sit target is set to:

vector sit_pos = <-1, 0, -0.5>;
vector sit_rot = <0, -90, 0>;
        llSitTarget(sit_pos, llEuler2Rot(sit_rot*DEG_TO_RAD));

As the pictures show, under Havok 4 the avatar sits higher than they do under Havok 1.
Given identical furniture, Avatars seem to sit offset under Havok 4 as compared to Havok 1. See attached photos. The chair used is called Seagel's 1 Prim Sit Anim Stool(ver0.3). However this was observed on *all* furniture no matter the type or maker. In this particular furniture, the sit target is set to:

vector sit_pos = <-1, 0, -0.5>;
vector sit_rot = <0, -90, 0>;
        llSitTarget(sit_pos, llEuler2Rot(sit_rot*DEG_TO_RAD));

As the pictures show, under Havok 4 the avatar sits higher than they do under Havok 1.

Both pictures were taken using the same stool along with the same backgroud and same avatar wearing no shoes. The only variable was the sim and server version (H1 sim was Narcolepy and H4 sim was Hypnos, if it matters).
Lex Neva added a comment - 28/Jan/08 08:37 AM
Uh oh. I wondered if this was going to happen. Lindens, the reason for this might be because the calculation of the position an avatar ends up at does not seem to be particularly logical in havok 1 sims. I found this out when I tried to write a script that allowed me to set sit targets easily. More information is in this forum thread:

http://forums.secondlife.com/showthread.php?t=153963

I wonder if maybe the sit target positioning code was rewritten, and whatever bug was in the old code was quietly fixed in the process. I'm all for making sit target positioning more logical, but this might break a lot of content.


Gordon Wendt added a comment - 28/Jan/08 01:43 PM
whatever the cause they're going to have a lot of pissed off content creators (myself included) if they don't fix this since it will (for lack of a better term) break a huge amount of content.

caete chevalier added a comment - 01/Feb/08 04:41 PM
I've seen the same differences testing this for repeatability at The Omega Concern and Fulda Gap sims. This could be a show stopper issue as it will affect a LOT of furniture.

Darien Caldwell made changes - 03/Feb/08 07:37 PM
Fix Version/s Havok4 Beta [ 10171 ]
Darien Caldwell made changes - 03/Feb/08 07:37 PM
Link This issue duplicates SVC-754 [ SVC-754 ]
Darien Caldwell made changes - 03/Feb/08 07:38 PM
Link This issue Relates to SVC-754 [ SVC-754 ]
Darien Caldwell made changes - 03/Feb/08 07:38 PM
Link This issue duplicates SVC-754 [ SVC-754 ]
Sidewinder Linden added a comment - 05/Feb/08 09:43 PM
I'll import this bug and we'll talk about this issue again internally... I had a few weeks ago noticed that sit targets seemed somewhat different in Havok4, but here's the thing I wonder about... In the cases that I tested, with animation overrides off, they seemed very close or identical, whereas with animation overrides on they seemed to vary. The bizarre part, which frankly I'm not sure what to do with, is that depending on the furniture I've seen sit locations be higher or lower with Havok4.

Now before everyone gets completely cranked up about this, I suspect that if you wander around in Havok1-based regions with various AO"s on, and try various furniture, you'll find that sit locations seem to be pretty inconsistent. From what I have seen so far, Havok4 may be different in some cases, but I am not yet convinced that it diverges in a systemic way from Havok1 - in other words individual items might be different but in general it seems no more "generally mismatched" in sit location than Havok1 was (which wasn't very consistent to start with).

Please feel free to show me otherwise - I'm all ears, and what I'm writing here is initial observations. We have talked about this and this seemed to be the team consensus... Thanks, Sidewinder


lindenrobot made changes - 05/Feb/08 09:44 PM
Linden Lab Issue ID DEV-10102
Darien Caldwell added a comment - 05/Feb/08 11:28 PM - edited
Actually your observations would be in agreement with what I have seen. First I want to point out the pictures above were with AO off. AOs can and do cause all sorts of variations, I agree. But that variable is eliminated above. I suspect that rotation is playing a role here too, so depending on the rotation associated with the sit target, the offset can go any direction, up, down, or even to the side. As I see it will take more conclusive evidence to convice the team, I'll see what I can do to provide that evidence.

I have added two pictures, H1 Sit part2 and H4 sit part2. This is again the same setup, in an H1 sim and a H4 sim, this time with the sit target set to:

vector sit_pos = <-1.0, 0, -0.5>;
vector sit_rot = <0, 0, 0>;
llSitTarget(sit_pos, llEuler2Rot(sit_rot*DEG_TO_RAD));

As you can see, the avatar is now rotated 90 degrees to the chair. Note the distance between the knee and the top of the chair. In the H1 sim, the Avatar is farther away from the chair as compared to the H4 sim. This directly matches to what is seen with -90 degrees rotation, with H1 sit being lower down than the sit in H4. So I think this could account for the differences seen as mentioned. The offset always appears to be in one direction (the X direction as defined by the sit target), however the rotation can alter the apparent offset in world. Next question, how much of an offset is there? Doing a lot of jumping back and forth, I came up with a difference of 0.05 meters.
How? I first used the default setting in the H1 Sim as a guide (vector sit_pos = <-1.0, 0, -0.5>), and created a prim that filled the gap between the chair and my AV( this prim was 0.016m thick FYI). (see H1 Default Sit.jpg). I then took this setup to the H4 sim and adjusted the script until the AV was brought down into the correct position (see H4 Adusted Sit.jpg). to do that ihad to use a new vector for the sit target (vector sit_pos = <-0.95, 0, -0.5>),

(It was conicidentally during all this that I found a new bug http://jira.secondlife.com/browse/SVC-1449)

Let me reiterate, All conditions between H1 and H4 are the same, except for Server version. Same AV, no shoes, no AO, nothing else. I feel i've outlined the issue as best I can, and thus, I rest my case.


Darien Caldwell made changes - 06/Feb/08 12:44 AM
Attachment H1 Sit part2.jpg [ 14620 ]
Attachment H4 Sit part2.jpg [ 14621 ]
Darien Caldwell made changes - 06/Feb/08 01:07 AM
Attachment H1 Default Sit.jpg [ 14622 ]
Attachment H4 Adjusted Sit.jpg [ 14623 ]
Lex Neva added a comment - 06/Feb/08 10:19 AM
Sidewinder, I urge you to read the thread I linked to above. I don't remember clearly enough to be able to describe in perfect detail what's wrong with the old H1 llSitTarget(), but I know that it's not doing what one would expect it to do. There's a systematic offset built into llSitTarget() that seems to be based on the rotation of the prim setting the sit target, and I'm certain that I ruled out avatar animations as the culprit in this.

Here's how I ran into this weird behavior: I was attempting to make an "Easy sit target setter" tool. The idea is that you'd be able to easily set the sit target on any prim that's at any rotation, for example some random prim of a piece of furniture that's not at a "nice" rotation. You'd sit on a separate poseball prim, then move that prim so that your avatar was sitting correctly on the furniture, and then a script would calculate what llSitTarget() parameters would need to be set on the furniture prim in order to land your avatar in exactly the same place.

The calculations seemed like they should be fairly simple, but it turned out that they weren't. I checked my math over and over (and it was simple math), and I had Seifert Surface check it with me. Both of us are quite well versed in quaternion math. No matter what we did, if the rotations of the poseball prim and the target prim were different, then the theoretically mathematifcally "correct" sit-target on the target prim would "miss" by some amount less than a meter, every time.

I'm certain this means that there's some weird offsetting happening in llSitTarget() as it currently exists on the grid. I spent hours carefully plotting out what this offset was and finally managed to write some code that compensated for it, so that my Easy Sit Target Setter can always take a sit target on any one prim and translate it into a matching sit target on another prim that puts the avatar in the exact same spot.

The offsets we're seeing in havok 4 look to me like they might be simply caused by the fact that havok 4 doesn't include this bizarre offset. I'm all for fixing the bug, but in doing so, you're going to break a lot of content, so be careful!


Qie Niangao added a comment - 06/Feb/08 11:55 AM - edited
Not sure what this is, Lex, but I suspect it's something other than a change in the previous llSitTarget() glitch. You and I attacked that problem kinda backwards of each other in that thread, but the method I used for finding the glitch values is yielding the same results in Havoc 1 and Havoc 4 regions (assuming Caledon and Caledon SteamSkyCity are running Havoc 4, as I believe them to be). (The glitch explored in that thread was objectively measurable because the seated agent position-as from llDetectedPos() – is systematically offset from where it should be for the sit target and the position of the seat. As it turned out, that offset was a constant plus a function of rotation andin my solution-avatar size. But I'm seeing the same constants in Caledon as in a Havoc 1 sim.)

EDIT: crap! Des must have had Caledon rolled back to Havoc 1, at least while I was testing. I just retested on Strathnaver and indeed the glitches are different between the two Havoc versions. I'll try to calculate exactly what the new constants are and post back. So sorry I jumped to the wrong conclusion before.

EDIT 2: Indeed, I'm pretty confident it is exactly this glitch that differs. In Havoc 1, the avatar's position is offset from the sitTarget by a constant <0, 0, -0.4> in the prim's orientation, minus 1/37.9 of the avatar's height in the sitTarget's Z direction. In Havoc 4, this latter offset doesn't occur. So, llSitTargets set in Havoc 1 will correct for both of these factors, but in Havoc 4, where the sitTarget-oriented offset doesn't occur, the avatar is located upward from the sitTarget in the direction of the sitTarget by that 1/37.9 of the avatar's height for which correction was necessary in Havoc 1. (If all that is confusing, my code for setting a sit target to match the position of a poseball-seated avatar in http://forums.secondlife.com/showpost.php?p=1504321&postcount=82 works in Havoc 1; for Havoc 4 the variable "heightGlitch" would be a constant zero vector; I believe this would also apply to the 0.186 constant in Lex's code earlier in that thread.


Simon Linden made changes - 07/Feb/08 04:57 PM
Assignee Simon Linden [ Simon Linden ]
Lex Neva added a comment - 10/Feb/08 09:32 AM
Bingo... thanks for following up with the tough work on this, Qie. I still don't quite know why you found a variation based on the avatar's Z height, while my testing seemed to indicate no variation no matter what height I chose, but regardless, we both know that llSitTarget() in Havok 1 behaves oddly. Thanks for doing the work to find out that llSitTarget() in Havok4 behaves oddly in a different way.

Personally, I'd love to see that 0.4 AND the 1/37.9 or 0.186 go away in the form of llSitTargetCorrect(), and keep the old legacy behavior in llSitTarget().


Simon Linden made changes - 12/Feb/08 11:39 AM
Status Open [ 1 ] Fix Pending [ 10001 ]
McCabe Maxsted made changes - 12/Feb/08 04:54 PM
Link This issue is duplicated by VWR-4409 [ VWR-4409 ]
Harleen Gretzky made changes - 15/Feb/08 11:46 AM
Link This issue is duplicated by SVC-1553 [ SVC-1553 ]
Dylan Rickenbacker added a comment - 18/Feb/08 10:52 PM
I've noticed that hugger scripts aren't working very well in havok 4 regions. Avatar positions are off, and the avatars never seem happy with their positions as they continue trying to walk forward after colliding. Could this be related to this issue?

Boss Spectre added a comment - 25/Feb/08 01:41 PM
I believe with great certainty that this is a systematic change. I have created a tool to measure this offset, and I have found it to be exactly 0.0 in H4, where it's based on avatar geometry in H1 (not exactly proportional to height, it uses various aspects of avatar geometry in differing proportions, but close enough for jazz). This would break existing content, requiring the sit target vector to be changed in many many existing objects.

Dylan, I believe that the hugger problem is completely unrelated, that is a change in avatar collision physics, and this is only related to sit target calculation.

Sidewinder, you can use the script which I posted with http://jira.secondlife.com/browse/SVC-1553 to reproduce this bug.


Darien Caldwell added a comment - 07/Mar/08 06:01 PM
From my testing, it looks like the fix was a success. Thank you so much! SL is saved!

Darien Caldwell made changes - 16/Mar/08 08:29 PM
Resolution Fixed [ 1 ]
Status Fix Pending [ 10001 ] Resolved [ 5 ]
Darien Caldwell added a comment - 16/Mar/08 08:30 PM
Good work.

Darien Caldwell made changes - 16/Mar/08 08:30 PM
Status Resolved [ 5 ] Closed [ 6 ]
Arawn Spitteler made changes - 25/Aug/08 06:37 AM
Link This issue is related to by SVC-2901 [ SVC-2901 ]
Sue Linden made changes - 13/Nov/08 12:12 PM
Workflow jira-2007-12-22a [ 51512 ] jira-2008-11-14 [ 83041 ]
Sue Linden made changes - 13/Nov/08 04:54 PM
Workflow jira-2008-11-14 [ 83041 ] jira-2008-11-14a [ 94821 ]