Jump to content

How to handle animation caching delay?


Qie Niangao
 Share

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

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

Recommended Posts

I've seen it before but never really worried about it, but now I'm trying to do something where it really matters: The first time an animation plays in a viewer, there's download delay, after which it's cached and plays immediately. A script can't know whether a chosen animation is already cached in some or all viewers of the scene. That adds up to a problem if some other effect (e.g., a sound) needs to coincide precisely with some point in the animation.

If there were a function for animations analogous to llPreloadSound it might be a place to start. I thought about starting the animation then stopping it, waiting a beat, and starting it again. That might work, but seems pretty ugly depending on the animation.

There were rumblings of a future "sync" across content-caching functions (animations and sounds especially IIRC; right now I also have particles and other scripted phenomena that want to be synchronized), but I have no idea if that's anywhere on the roadmap.

In the meantime, what's the common practice? What do other scripters do about this?

 

  • Like 2
Link to comment
Share on other sites

2 hours ago, Qie Niangao said:

That adds up to a problem if some other effect (e.g., a sound) needs to coincide precisely with some point in the animation.

For sounds+animations, have you tested the efficacy of gestures rather than controlling the effect via a script?

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Quistess Alpha said:

For sounds+animations, have you tested the efficacy of gestures rather than controlling the effect via a script?

Well, the current project is to augment a sat-upon device and I don't know how a gesture would fit into that scenario, but I'm interested in the theory behind the suggestion. Is the idea that a gesture would pre-load its animation(s) and sound(s) before playing them? and to other local viewers besides that of the gesture-equipped avatar?

(In case I made it unnecessarily obscure: After the first time playing the animations, the current script quite precisely synchronizes the effects—better than I'd expected to be honest—but it's surprising how long it takes to load each of the animations the first time. Hence the particle and sound are both emitted a half second or more before the anim is positioned for it, only that first time for each viewer observing the scene.)

Link to comment
Share on other sites

34 minutes ago, Qie Niangao said:

Is the idea that a gesture would pre-load its animation(s) and sound(s) before playing them? and to other local viewers besides that of the gesture-equipped avatar?

I thought something like that might be plausible to mention it, but I don't know enough about how those are actually handled to say one way or the other.

 another thing to try might be to play the animation on an invisible animesh to "preload" it, but those eat up a fair amount of Li.

  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, Quistess Alpha said:

 another thing to try might be to play the animation on an invisible animesh to "preload" it, but those eat up a fair amount of Li.

If it were only my location, that would be cool, but the hope was to offer this to others mostly on Bellisseria where LI is hard to come by. It does suggest a subversive kludge-around: silently pushing an animesh AVsitter Experience attachment on the sitter just to do the pre-caching, if they're in that Experience and happen to have a spare animesh slot available. I'm not sure I can bring myself to do that, but I bet it would often work.

Link to comment
Share on other sites

6 hours ago, Qie Niangao said:

silently pushing an animesh AVsitter Experience attachment on the sitter just to do the pre-caching, if they're in that Experience and happen to have a spare animesh slot available.

Since you need to (very briefly) rez anything that is temp-attached, I don't think attaching it to someone gives much benefit over just having it rezzed in-world while the seat is in-use: the land needs the extra LI 'float' in either case.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I thought I might be able to rez a full perm rigged mesh with the "Animated Mesh" un-set (to skirt the massive Land Impact penalty), attach it, and then set the new-ish PRIM_SCULPT_FLAG_ANIMESH flag. Unfortunately, attached or unattached, that flag seems to be read-only. (Of course the viewer checkbox works fine, regardless.)

Why must animesh be so crippled?

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 212 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...