Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

animating objects

Evil Zwiers
Registered User
Join date: 5 Feb 2007
Posts: 6
02-22-2007 07:46
Hi everyone,

I have recently started trying to animate some objects and have begun developing a tool to make this process easier, and more re-usable... I understand that several people have made some great advances in this field, most notably Jeffrey Gomez and Qarl Linden (formerly Fizz). I am looking for advice really, or any tips that people can throw my way, as well as some answers to specific questions.

I want the following out of my system:

1. Be able to capture and playback simple keyframe animation of linked prims relative to a root prim.

2. Tweening between the keyframes to make smooth motion.

3. Be able to set and change pivot points for rotation. The idea here is that we can begin by animating, say, a hand clenching a fist, then attatch that hand to an arm then animate the arm movement, then play both back simultaniously. I have some ideas about how to implement this but I am pretty ignorant when it comes to the maths involved so anyone with experience in building a similar system please get in touch!!

I also have some more specfic questions if you've made it this far!

1. I have tried two methods of acheiving simple keyframe animation playback, using llSleep and using a timer. Neither seems to be able to give me a frame rate much above 2fps, should I be able to achieve a higher frame rate using some other method?

2. Does anyone have any experience of using Qarl Fizz's tween script for interpolating between keyframes? I don't really understand why he has C style includes in his lsl scripts to be honest, can anyone shed some light on this please?

Thanks in advance, hope someone can help me,

John
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
02-22-2007 08:11
From: Evil Zwiers
Hi everyone,


2. Does anyone have any experience of using Qarl Fizz's tween script for interpolating between keyframes? I don't really understand why he has C style includes in his lsl scripts to be honest, can anyone shed some light on this please?

Thanks in advance, hope someone can help me,

John



Qarl was probably using Scite-Ez as his editor. Scite_Ez supports using a C preprocessor to allow #include functionality as .esl (extended LSL)
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
02-22-2007 14:22
From: Evil Zwiers
1. I have tried two methods of acheiving simple keyframe animation playback, using llSleep and using a timer. Neither seems to be able to give me a frame rate much above 2fps, should I be able to achieve a higher frame rate using some other method?

John

Both timers and llSleep() can be very inaccurate. You cannot really rely on them to drive real-time effects.

Another point about tweening is that it seems to be built in to some degree. For example, if an object moves via llSetPos(), it doesn't appear to move in the blink of an eye. it appears to quickly glide from one place to the next. Maybe this is just my brain on SL, but that's how it looks.

In the "lab", that is, on a really fast network sitting right next to the server, I think you can get the effects you want. But right now, in the real world I live in, it will be hard.
Gaius Goodliffe
Dreamsmith
Join date: 15 Jan 2006
Posts: 116
02-22-2007 19:59
timers and llSleep are indeed not perfectly reliable, but they're usually not too far off the mark unless things are laggy. llSleep tends to be a bit more accurate, usually waking up within a few hundredths of a second of when you ask for it. It's about good enough to use for timing of 20 FPS movement if you're willing to tolerate the occasional stutter.

The only reason I can think of why you wouldn't get better than 2 FPS is that you're ignoring the delays certain functions have (like llSetPos or llSetLocalRot, each of which put the script to sleep for 0.2 sec). To work around that, you need to use multiple scripts. A single script trying to move things will naturally be limited to under 5 FPS due to the delays, but that's not llSleep's fault, that's llSetPrimitiveParams fault (or whichever functions you're using).
Evil Zwiers
Registered User
Join date: 5 Feb 2007
Posts: 6
02-28-2007 01:57
Thanks guys,

You've given me some stuff to think about, this part of our project has been shelved for the moment but I really want to do some more development on it soon.

Cheers,
John
Stukas Zephaniah
Registered User
Join date: 13 Oct 2006
Posts: 40
04-03-2007 23:42
I have a product which does exactly that!
My AniMaker, an in-world animation recording system for everything (creature or mechanism) created with prims.
Hope I saved you some time! :)

- Stukas Zephaniah