Jump to content

Having a hard time getting 30 - 45 sec animations into sl because of the 250kb upload limit


Novel Popinjay
 Share

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

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

Recommended Posts

Ugh. fiine. A worked example.

This is a hexdump of an animation with 2 specified frames:

Quote

00000000  01 00 00 00 04 00 00 00  00 00 00 40 00 00 00 00  |...........@....|
00000010  00 00 00 00 40 01 00 00  00 9a 99 99 3e 9a 99 99  |....@.......>...|
00000020  3e 01 00 00 00 01 00 00  00 6d 50 65 6c 76 69 73  |>........mPelvis|
00000030  00 04 00 00 00 00 00 00  00 02 00 00 00 00 00 00  |................|
00000040  80 00 80 00 80 00 80 00  80 00 80 99 99 00 00 00  |................|
00000050  00                                                |.|

Or in a more human-readable format:

Quote

version: 1
subversion: 0
base_priority: 4
duration: 2.000000
emote_name:
loop_in_point: 0.000000
loop_out_point: 2.000000
loop?: 1
ease_in_duration: 0.300000
ease_out_duration: 0.300000
hand_pose: 1
num_joints: 1
        joint_name: mPelvis
        joint_priority: 4
        num_rot_keys: 0
        num_pos_keys: 2
                time: 0.000000
                pos_x: 0.000000
                pos_y: 0.000000
                pos_z: 0.000000
                time: 1.0000
                pos_x: 0.000000
                pos_y: 0.000000
                pos_z: 1.000000
num_contraints: 0

Notice firstly that this animation has only 2 "frames" one where mPelvis is at position <0,0,0>, and another where mPelvis is translated to <0,0,1>.

Here's how it looks in-world:

Note how the transition from the first frame to the second is interpolated (linearly) but it snaps back to the first position from the second.

  • Like 2
Link to comment
Share on other sites

11 minutes ago, Jenna Huntsman said:

Aside from I know for a fact that the internal .anim file has only 2 keyframes, as I use AnimHacker (a tool to manipulate animations in SL's internal format), which has no interpolation functions built into it. Only the ability to set keyframe time, and translations.

The viewer is interpolating. Linearly. https://en.wikipedia.org/wiki/Linear_interpolation

The new data in my example is the rotation data. With the viewer's interpolation, it knows the start and end point of the translation, and the current time. That's all linear interpolation needs, as, if my start point is 0 degrees, my end point is 90 degrees, and my time is 0.5 (2 seconds), then my elbow should be at 45 degrees. That information is not contained within the .anim file, but was constructed as above.

(Also, Quistess knows what she is saying on the matter, as she made a tool to convert .bvh to .anim files.)

It's ok, I understand that you need to support your friend.  I don't need to explain anything further and I think the general population, at least reading this thread, has gotten the correct information, finally.

I'll continue to respond to posts in other areas, as I see this misinformation being disseminated and, hopefully it will cease at some point.

I would very much like to see more tools out there that perform as well as mine, but I haven't found them.  I wouldn't mind hanging up my hat and moving onto other projects completely.

When I see someone building a tool for SL, especially with regard to animations, I do approach them but, as yet, they don't seem to be willing to cooperate and learn, so I dismiss it and move on.

If anyone out there is developing some SL animation tools, and wants to pick my brain, you are welcome to contact me in-world.

Have a great day people, and thanks for playing \o

- Frawggie

 

Edited by BinBash
  • Like 1
Link to comment
Share on other sites

The nine most common traits for Narcissistic Personality Disorder include:

  • Having an inflated sense of self-importance and entitlement.
  • Needing constant admiration.
  • Expecting special treatment.
  • Exaggerating achievements and talents.
  • Reacting negatively to criticism.
  • Being preoccupied with fantasies about power, success, and beauty.
  • Taking advantage of others.
  • Having an inability or unwillingness to recognize the needs and feelings of others.
  • Behaving in an arrogant manner.
  • Like 1
Link to comment
Share on other sites

I'll try to clarify a few points if possible

Perhaps, interpolation here was taken as a "bezier curve with tangent" like shown in a animation graph editor. Let's scrap the word interpolation altogether then...

Also I made an animation tool, for Maya, that exports anim files. It also provides animation custom setup tools and all that, but let's focus on the export side.

After the header data that we aren't that much interested in, comes the joint data. Each entry is a joint

The entry then is followed by priority, number of keys and finally the actual data,rotation and position. Let's pretend we don't have position data. So for each SAMPLE it takes, it writes the rotation followed by the timestamp it refers to from the time line start-end, encoding it.

Now the keyword here is SAMPLE. in my plug in, I chose to sample every frame, but I optionally allow a resampling procedure, so to take a sample every N number of frames. This reduces the file size as the sampled frames are actually less than the raw animation number of frames and, obviously, it reduces the "resolution" of the motion. It still works because from sample X to the next, we have a time specification, so in our example with only rotations, it will rotate the joint from an orientation value to the next in the delta time specified by the difference of the two timestamps. This job is done viewerside, and it is linear, meaning at constant speed from start to end of motion.

The sampling is what makes Avastar output an average filesize, because it performs a sort of downsampling in order to get a somewhat more optimized file in terms of size, but you may also notice a substantial linearization of otherwise really smoothly designed motion, exactly because it doesn't sample every single frame, unless the user sets a marker on each frame they want to be not skipped. In my plug in I did the reverse, output raw data and let the user decide whether they want to resample.

So that is how it works. The animation defines how long it takes from a sample to the next. Call it interpolation or not, that's what happens.

Link to comment
Share on other sites

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