Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-225792] llSetTextureAnim freezes and displays incorrectly at moments while during movement; llMoveToTarget() or llSetKeyFramedMotion(). #4504

Open
1 task
sl-service-account opened this issue Nov 10, 2018 · 2 comments

Comments

@sl-service-account
Copy link

sl-service-account commented Nov 10, 2018

What just happened?

Created a Mesh object to animate using llSetTextureAnim ( ANIM_ON | LOOP, ALL_SIDES, 2, 2, 0.0, 4.0, 5.0 ); with 4 frames to simulate a 'jumping' action. When object is stationary, TextureAnimation runs fine and no issues occur.

When adding a script to make object wander about, there are instances when the TextureAnimation freezes up as it moves from Point A to Point B and is displayed incorrectly (not any of the four frame cells). More specifically, the same appearance as having a non-animated texture with Horizontal scale: 0.25, Vertical scale: 0.25, Horizontal Offset: 0.375, Vertical Offset: 0.375.

Note: I'm using Firestorm 5.0.11 (53634) but issue occurs on SL viewer as well (refer to below for SL viewer details)

Methods of movement tried

llMoveToTarget
llSetKeyFramedMotion 

Both result in the same issue occurring

What were you expecting to happen instead?

The object to animate smoothly (simulating a jumping motion, up and down) and being able to move forward with llLookAt() to simulate the illusion of jumping forward.

Issue Reproduction

1. Rez a cube
2. Insert the script below.
[Note: I used a timer () in this recreation but using a at_target will replicate it as well] [Any texture can be used]
3. Set Object to be Physical and Phantom (optional)
4. There will be moments where the Texture animations just freezes up and the texture is displayed incorrectly (unlike any of the four cells)
[More specifically, the same appearance as having a non-animated texture with Horizontal scale: 0.25, Vertical scale: 0.25, Horizontal Offset: 0.375, Vertical Offset: 0.375.]

 

vector oriPosdefault
{
    state_entry()
    {
        llSetLinkPrimitiveParams (LINK_THIS, [PRIM_TEXTURE, ALL_SIDES, "c3187dbc-fbad-0544-f137-7568530451a9", <1.0, 1.0, 0>, ZERO_VECTOR, 0] );
        llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 2, 2, 0.0, 4.0, 5.0 );

        oriPos = llGetPos();
        llSetTimerEvent (4.0);
    }
    
    timer ()
    {
        llMoveToTarget ( 
        (<oriPos.x + llFrand(3.0), 
        oriPos.y + llFrand(3.0), 
        oriPos.z>), 4.0 );
        
        llSetTimerEvent (8.0);
    }
}

Additonal Details

The issue seem to occur although at random, but if you have various number of the objects (at varying TextureAnimation speeds even), the TextureAnimation freezing occurs at the same time (visually) as long as said objects are in motion. The TextureAnimation also resumes at the same time. 

Issue Reproduction (Multiple Cubes)

1. Rez multiple cubes [I used three] 
2. Insert the same script above and change the values of the TextureAnimation speed
[Note: I used a timer () in this recreation but using a at_target will replicate it as well] [Any texture can be used]
3. Set Object to be Physical and Phantom (optional)
4. There will be moments where the Texture animations just freezes up and the texture is displayed incorrectly (unlike any of the four cells) for all cubes at (almost) the same time as long as said objects are in motion.**
[More specifically, the same appearance as having a non-animated texture with Horizontal scale: 0.25, Vertical scale: 0.25, Horizontal Offset: 0.375, Vertical Offset: 0.375.]

Links

Related

Original Jira Fields
Field Value
Issue BUG-225792
Summary llSetTextureAnim freezes and displays incorrectly at moments while during movement; llMoveToTarget() or llSetKeyFramedMotion().
Type Bug
Priority Unset
Status Accepted
Resolution Accepted
Created at 2018-11-10T19:30:39Z
Updated at 2018-11-12T19:00:53Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2018-11-10T15:00:52.354-0600',
  "Is there anything you'd like to add?": 'Issue Reproduction\r\n\r\n1. Rez a cube \r\n2. Insert the script below. \r\n[Note: I used a timer () in this recreation but using a at_target will replicate it as well] [Any texture can be used]\r\n3. Set Object to be Physical and Phantom (optional)\r\n4. There will be moments where the Texture animations just freezes up and the texture is displayed incorrectly (unlike any of the four cells)\r\n(more specifically, the same appearance as having a non-animated texture with Horizontal scale: 0.25, Vertical scale: 0.25, Horizontal Offset: 0.375, Vertical Offset: 0.375.)\r\n\r\nvector oriPos; \r\n\r\ndefault\r\n{\r\n    state_entry()\r\n    {\r\n        llSetLinkPrimitiveParams (LINK_THIS, [PRIM_TEXTURE, ALL_SIDES, "c3187dbc-fbad-0544-f137-7568530451a9", <1.0, 1.0, 0>, ZERO_VECTOR, 0] );\r\n        llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 2, 2, 0.0, 4.0, 5.0 );\r\n\r\n        oriPos = llGetPos();\r\n        llSetTimerEvent (4.0);\r\n    }\r\n    \r\n    timer ()\r\n    {\r\n        llMoveToTarget ( \r\n        (<oriPos.x + llFrand(3.0), \r\n        oriPos.y + llFrand(3.0), \r\n        oriPos.z>), 4.0 );\r\n        \r\n        llSetTimerEvent (8.0);\r\n    }\r\n}',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': "Created a Mesh object to animate using llSetTextureAnim ( ANIM_ON | LOOP, ALL_SIDES, 2, 2, 0.0, 4.0, 5.0 ); with 4 frames to simulate a 'jumping' action. When object is stationary, TextureAnimation runs fine and no issues occur. \r\n\r\nWhen adding a script to make object wander about, there are instances when the TextureAnimation freezes up as it moves from Point A to Point B and is displayed incorrectly (not any of the four frame cells). More specifically, the same appearance as having a non-animated texture with Horizontal scale: 0.25, Vertical scale: 0.25, Horizontal Offset: 0.375, Vertical Offset: 0.375.\r\n\r\nNote: I'm using Firestorm 5.0.11 (53634) but issue occurs on SL viewer as well (refer to below for SL viewer details)",
  'What were you doing when it happened?': 'Standing still (with AO on) observing the object to see if any issues (unfortunately there was).',
  'What were you expecting to happen instead?': 'The object to animate smoothly (simulating an jumping motion, up and down) and be able to move forward with llLookAt() to simulate the illusion of jumping forward.',
}
@sl-service-account
Copy link
Author

Whirly Fizzle commented at 2018-11-10T21:00:52Z, updated at 2018-11-10T21:03:40Z

Further discussion on this forum post: https://community.secondlife.com/forums/topic/429676-textureanimation-on-object-funky-during-movement/

I'm unsure if this is a viewer bug or server bug.
Bug repros on default LL viewer & Firestorm.
When the texture animation freezes, I have observed that right clicking on the cube starts the texture animation up again & sometimes zooming camera out & back will start the texture animation up again.

I suspect this bug may be related to BUG-4455, in that the problem is to do with object updates.

@sl-service-account
Copy link
Author

lucidiaersatz commented at 2018-11-11T06:20:40Z, updated at 2018-11-11T06:22:57Z

Ah thanks for pointing me to JIRA. :)

I added a crude workaround and after reading the comment in [BUG 4455], am unsure if the TextureAnimations resume because the object is stationary or due to a full object update. Either reasons, it does cause it to resume which reduces the times the issue occurs, but doesn't solve it. :(

Unsure if I should add this here but...

For documentation (if any), below is how to recreate, with a script using a listen() event to trigger the state switches (without contact with said object).

1. Rez a cube 
2. Insert the script below. [Note: I used a timer () in this recreation but using a at_target will replicate it as well] [Any texture can be used]
3. Set Object to be Physical and Phantom (optional)
4. There will be moments where the Texture animations just freezes up and the texture is displayed incorrectly (unlike any of the four cells)
(more specifically, the same appearance as having a non-animated texture with Horizontal scale: 0.25, Vertical scale: 0.25, Horizontal Offset: 0.375, Vertical Offset: 0.375.)
5. When said object's TextureAnimation freezes up, triggering SET_STATUS | PHYSICS, FALSE enables TextureAnimation to function 

vector oriPos; default
{
    state_entry()
    {
        llSetLinkPrimitiveParams (LINK_THIS, [PRIM_TEXTURE, ALL_SIDES, "c3187dbc-fbad-0544-f137-7568530451a9", <1.0, 1.0, 0>, ZERO_VECTOR, 0] );
        llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 2, 2, 0.0, 4.0, 5.0 );        llListen (88, "", llGetOwner(), "");        oriPos = llGetPos();
        llSetTimerEvent (4.0);
    }
    
    timer ()
    {
        llMoveToTarget ( 
        (<oriPos.x + llFrand(3.0), 
        oriPos.y + llFrand(3.0), 
        oriPos.z>), 4.0 );
        
        llSetTimerEvent (8.0);
    }
    
    listen (integer channel, string name, key id, string msg)
    {
        if (channel == 88 && msg == "on")
        {
            llSetStatus 
            (STATUS_PHYSICS , TRUE);
        }
        
        else if (channel == 88 && msg =="off")
        {
            llSetStatus 
            (STATUS_PHYSICS, FALSE);
        }
        
        else {}
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant