Jump to content

Split mesh with llSetLinkTextureAnim question


You are about to reply to a thread that has been inactive for 794 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

If I have a mesh thats split in half (cough lower LI cough), both sides use the same texture (left and right side is different but UV space is the same and both sides look like 1 texture) and I use a function

 

 llSetLinkTextureAnim(LINK_SET, ANIM_ON | SMOOTH | ROTATE | LOOP, ALL_SIDES,1,1,0, TWO_PI, -0.01);
 

is there a chance the animation will break at some point if the sim experiences lag? 

What I mean, if a sim experiences lag or a user experiences lag is there a chance that the textures on both left and right side will go out of sync? That there will be a visible tear in the middle where left and right mesh touch?

Or if the sim lags will both sides lag at the same time and wont tear since its 1 script?

Thanks!

 

Edited by arisaie
Link to comment
Share on other sites

Texture animation is a viewer effect, so sim performance will have zero bearing on it.

Once the animation property has been set, it's all down to the viewer to handle it and it's possible, but I don't know how likely, that they will eventually go out of sync depending on viewer performance. If things were reportedly going out of sync either for you or someone else, you could try to circumvent the issue to some extent by restarting the texture animation once every few minutes, so any build-up of missed precision should be nullified. I've tried that approach with multi-prim constructions and despite having like 32 prims displaying an animated "pixel grid effect" I haven't noticed serious staggering of the animations despite using them in crowded low-fps situations.

Edited by Frionil Fang
  • Like 2
Link to comment
Share on other sites

On 5/18/2022 at 9:33 PM, Frionil Fang said:

Texture animation is a viewer effect, so sim performance will have zero bearing on it.

Once the animation property has been set, it's all down to the viewer to handle it and it's possible, but I don't know how likely, that they will eventually go out of sync depending on viewer performance. If things were reportedly going out of sync either for you or someone else, you could try to circumvent the issue to some extent by restarting the texture animation once every few minutes, so any build-up of missed precision should be nullified. I've tried that approach with multi-prim constructions and despite having like 32 prims displaying an animated "pixel grid effect" I haven't noticed serious staggering of the animations despite using them in crowded low-fps situations.

Hmm..didn't think of automating it by restarting the animation. I wanted to make a button in llDialog that would reset the animation to default state and then start the animation again.

 

I Assume the restart every few minutes you mentioned uses llSetTimerEvent and timer? Will have to look into it.

 

my noob script self would solve this by setting a llSleep and after sleep ends - LlResetScript followed by

 llSetLinkTextureAnim(LINK_THIS, FALSE, ALL_SIDES, 0, 0, 0.0, 0.0, 1.0);  

and the line that starts the animation again in state entry.

Does the repeating with llsettimerevent has any impact on the SIM it's on?

Edited by arisaie
Link to comment
Share on other sites

8 minutes ago, arisaie said:

I Assume the restart every few minutes you mentioned uses llSetTimerEvent and timer? Will have to look into it.

That's how I did it, granted not really sure how necessary it even is overall, but it has so little bearing on resource use that might as well.

Note that trying to set the texture animation that isn't sufficiently different may have no effect, though: if you're doing frame based animation, it's enough to change the frame rate like this:

llSetLinkTextureAnim(LINK_SET, ANIM_ON|LOOP, ALL_SIDES, 4, 4, 0, 16, 1); // just to make the animation reset
llSetLinkTextureAnim(LINK_SET, ANIM_ON|LOOP, ALL_SIDES, 4, 4, 0, 16, 4); // desired framerate

but if you were doing a smooth slide/rotate/scale, you might have to stop the animation for a moment entirely to get it to reset... haven't really tested that further.

Edited by Frionil Fang
  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 794 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...