• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: VWR-2242
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Unassigned
Reporter: Ryozu Kojima
Votes: 16
Watchers: 13
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

Specially formatted .BVH file can cause avatar distortion

Created: 26/Aug/07 10:55 AM   Updated: 14/Jun/09 12:19 PM
Return to search
Component/s: Avatar/Character
Affects Version/s: 1.18.2.0
Fix Version/s: None

File Attachments: 1. File DeformHead.bvh (4 kB)
2. File DeformHeadSelfFix.bvh (4 kB)
3. File UndeformBase.bvh (4 kB)
4. File unDeformHead.bvh (4 kB)
5. Zip Archive VariousDeformAndUndeformBVH.zip (43 kB)

Image Attachments:

1. before and after un-deform.jpg
(148 kB)
Issue Links:
Duplicate
 
Relates
 

Last Triaged: 15/Jan/09 06:04 PM
Linden Lab Issue ID: DEV-26188


 Description  « Hide
Due to the way the SL viewer handles the BVH format upon upload, a specially formatted BVH animation can be uploaded that will deform an avatar until the user either Relogs, or plays a second specially formatted animation to snap the joint back into place.

Repro: (Example in attached bvh file)
01: Create a standard BVH file with 2 frames. No posing is necessary. I used Avimator to produce mine.
01: Open BVH file in a standard text editor, I used Notepad.exe
02: On the second line of the file, you'll see the text "ROOT hip" Change "hip" to the name of the joint you wish to displace. Example: head
03: On line 121 of the BVH file you'll find the 2nd frame's Motion Data. The first 3 numbers are the Offset. By default, it will show the standard offset for the hip joint, to deform the avatar, this will do fine.
04: Save the bvh file.
05: Upload the BVH file to second life as an animation, any animation settings will do.
06: Play animation.
Observed: Avatar's joint will become displaced until a relog or use of a second animation to restore joint position.

Cause: in llbvhloader.cpp, on line 918, it comments that it loads positional data from the motion data for only the root joint. The BVH translation then occurs, translating that positional data into LL's animation format. No check of the name of the root joint is performed.

Expected:
This is where I'd like to start a discussion. The ability to offset joint position, while unintended, has potentially good uses for avatar creation. Everything from more complex tiny avatars to better giant avatars could be achieved. This the joint displacement only becomes a problem since once the animation is stopped, the joint displacement is not also stopped.

The three attached files demonstrate offsetting the avatars head.
DeformHead.bvh will cause the avatar's head to offset until a further animation is used to fix it.
unDeformHead.bvh will fix the avatar's head.
DeformHeadSelfFix.bvh when, if uploaded as a loop with start and end set to 50, will deform the avatar's head until the looping animation is stopped.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Ryozu Kojima added a comment - 26/Aug/07 10:57 AM
I personally think this should be embraced. BVH file parsing could be re-written to include use of 6 channels per joint, and fully allow joint repositioning through the motion data, in addition, the animation system should be fixed so that all animation affects are undone once the animation stops.

A short term fix would be to, at the very least, test the name of the root joint before conversion.

In the meantime, a full set of copy/trans animations that will "Fix" your avatar is available on SLExchange for free, just look up unDeform kit.


WarKirby Magojiro added a comment - 26/Aug/07 01:00 PM
I have an avatar idea that I've been trying in vain to do for a while. With this capability, I can accomplish it. But there's no point starting if things are uncertain. We need a linden opinion on this.

I am really STRONGLY against this capability being removed, but.

1. When an animation distorts shape, the distortion should be undone by resetting the bone position, if that animation is stoppped
2. Stop all Animations should reset bone position

What you should NOT do, is remove the capability to do this in the first place. Please. Consider it like megaprims. Those have thousands of excellent uses, even though they were never intended functionality. To remove those would be a bad thing for creativity, and so with this.

Think of the possibilities.

Tiny avatars without invisiprims
Extendablle limbs. Think for a moment, on the thought of a stretching tentacle arm. You can't say that wouldn't be cool.
Larger avatars wityh actual body parts.The stretched parts of the avatar mesh can be covered over with prims.

PLEASE do not remove this capability.


WarKirby Magojiro added a comment - 26/Aug/07 01:26 PM
The fact that this distortion can exist, is proof that SL can technically support positional data in animations.

Beezle Warburton added a comment - 26/Aug/07 02:08 PM
I see this as actually being useful for makers for various kinds of avatars – mechs, for example. Rather that remove this "feature," I'd rather see the functionality of the menu-based "stop-all-animations" improved.

Lex Neva added a comment - 27/Aug/07 10:23 AM
We should be very careful with this. While it's true that this bug can open up some new functionality, don't forget that it IS a bug, and that the new functionality is only partially workable and has its own problems (the fact that the repositioning of joints "sticks"). Repositioning of joints is also likely to interact badly with the shape system... using this, you can potentially distort an avatar's shape in a way that nontechnical end-users can't fix simply by messing with their avatar's appearance. This could be confusing. Also, if I understand this correctly, it also seems that you'll need to run one animation per joint to deform the entire avatar... not so wonderful. CAN you even deform multiple joints simultaneously?

I'm advising caution in calling this a "feature", because of the history of getting "stuck" with legacy bugs like this. Examples: invisiprims, WarpPos.

With invisiprims, we have functionality that really doesn't work too well, but it DOES at least partially allow people to make portions of their avatar invisible, and so LL seems to feel no need to actually provide us with a decent, robust, fully-supported alternative. The only way to do it is with the invisiprim hack, which results in nasty rendering artifacts such as alpha and shiny rendering incorrectly behind the invisiprim.

With WarpPos, there's a piece of functionality that was widely used, but LL didn't really realize this. They fixed this bug in the process of providing new functionality, and that broke a lot of content that relied on it. Again, not a good situation.

I'd advise against relying on this buggy functionality or developing it into a "feature" that a lot of people rely on. I think it should be fixed ASAP to avoid situations like the above. If you still want joint repositioning, please enter it as a Feature Suggestion, which will allow the community and LL the chance to suggest a much more robust, featureful, and reliable way to reposition joints.

It'd really suck to force LL's hand to make them keep legacy buggy behavior around, at the expense of implementing something like this the Right Way.


WarKirby Magojiro added a comment - 27/Aug/07 12:07 PM
While I agree with you on that matter, Lex. You're forgetting to take into account ll's history of not doing things. How long have we been waiting for

scripted avatar rotation
scripted control of skins/clothing
object returning functions
more attach points
the ability to texture the head with clothing
havok 4 (cough)

Ideally, yes. A fully supported solution would be best. But History has shown that's really not going to happen anytime soon. In the meantime, and until that is made, (ie, NOT now) I'd definitely prefer a quick improvement to stop all animations. and/or resetting bone position when editing appearance, over removing this until the indeterminate point when we get a better alternative, which could be months, or years away.

LL is struggling enough with fixing stability issues, scaling the grid, etc. They don't seem to ahve the resources to spend on implementing such functionality at the moment. While this deformation is far from perfect, it's infinitely better than nothing, which is what we'll be left with if it's "fixed".

My plans for it don't involve deforrming the entire avatar. I only want to stretch the torso. 2-3 animations, at most.


Ryozu Kojima added a comment - 27/Aug/07 04:20 PM
Ignore "UnDeformBase.bvh"
Uploaded the wrong file >_<

Strife Onizuka added a comment - 27/Aug/07 05:40 PM
If this is to be considered a bug, the bug isn't just in the bvh-to-LLKeyframeMotion it's an issue in LLKeyframeMotion. I'm looking into the specific mechanics of this, but what I've seen so far suggests that this was intentional.

Feynt Mistral added a comment - 30/Aug/07 05:58 AM
I can definitely see the implications of this bug. We can make oddly proportioned avatars, like properly contorted animations for feral avatars, or macros, mecha, tinies (if you can scale up the bone set to make really stretched out avatars, why not scale down for a really small avatar?), lots of possibilities.

Now if only we could add on to the existing animation set, we could have tails and tentacles too. >D


Lex Neva added a comment - 09/Sep/07 08:52 AM
I feel that if something is worth doing, it's worth doing right. I think that this current buggy behavior should definitely not be considered anywhere near the "right" way of implementing what you folks want.

I can't stress this enough: please don't force LL NOT to fix this bizarre behavior by filling the world with content that relies on it.


WarKirby Magojiro added a comment - 10/Sep/07 08:18 AM
The right way takes time. There are a million issues in the works. Tons of bugs needing fixed, new features to be implemented.

The right way, surely. Would be to implement position support for all joints. If we made content relying on this now,. please explain how adding the function for positional data for all joints, would break that ? Seems like it would be an addition to this functionality.

I'm all for doing things the right eay whenever possible, but sometimes compromises have to be made. Thee are a lot of proposals for invisible vatar skin color, for example.And it will likely be implemented eventually. Once that comes, invisiprims will fall out of general use, most likely.

Positional data in animations is not a bug. It's a part of the BVH format. This is merely an LL oversight( or possibly intentional) that failed to close a loophole. I don't see how this is particularly buggy.

And there really is no "right" way for some things when it comes to content creation. Although the general consensus is for better shape controls, I have an idea for this, that will ONLY work with this. Better shape controls are mostly what's wanted, but positional data in animations has unique applications too.


Dale Innis added a comment - 15/Sep/07 08:18 AM
Would just fixing the fact that the deformation persists after the animation stops playing be a workable compromise? That would get rid of the "you have to relog or use a magic undeformer to fix yourself" problem. Would it still allow the nicest use-cases of benign use of the bug/feature? Or do those benign use-cases also require the persistence.

Ryozu Kojima added a comment - 16/Sep/07 11:39 AM
I just tried an experiment with this. I created a deformer with 3 frames that looped at 50%/50% and uploaded with priority 0. All animations rotated joints as expected on the deformed joint while it was deformed. (The 3rd frame was just the correction frame.)

So as long as the ones using this used it correctly (IE: Looped low priority) then yes, simply correcting the deformation on stopping the deform animation would fix the problem more or less, while allowing creative types to use it.

The looping would be required anyways for any kind of legit use of these anims, as joint offsets aren't actually seen by anyone who wasn't in visual range when the animations played on the avatar. The only way to garantee that is by using the deform anims in a loop.

One word of mention. The original deformation anims by Blue Backbite or whatever his name was. Some of them were looped, so the user would have to use Tools->Stop all anims to stop them anyways.


Ryozu Kojima added a comment - 24/Sep/07 04:00 PM
Uploaded a zip full of all the undeform anims, and various deforming animation experiments and attempts.

WarKirby Watanabe added a comment - 24/Sep/07 04:11 PM
Yes, Dale. The ability to stop it through normal means is all that's needed. Benign uses could simply have it play constantly at priority 4.

It should also be noted, that positional data in animations, is a standard thing, used in many 3d programs. Though it was not intended to be in SL, it's existence is not a bug. It is a standard feature of animations. The current situation is proof that SL is capoable of suppporting it. It has good uses for content creators. All we need is a simple way to stop such animations if need be.

I really think it would be a wrong choice to remove this feature.


eren padar added a comment - 02/Oct/07 07:09 PM
There are actually freebie packs out now that fix this. While it's not the best fix, since we really can't count on this issue being resolved any time soon in-game, the freebie pack is simply an AO device that pops every joint back in place to where it's supposed to be.

Think about it: if you can write an animation to create this effect... it's possible to write one to reverse it.


WarKirby Magojiro added a comment - 07/Oct/07 01:04 AM
Ryozu invented and distributed those freebie packs.

Eadoin Welles added a comment - 25/Nov/07 01:37 PM
Well, deformed avatar can be very useful for creating special avatars. I like it, but how to obtain a specific effect? That is, if you wish for instance to have avery long neck but all the other pieces of body normal, how can you do that?

Bloodsong Termagant added a comment - 28/Oct/08 05:52 AM
so guys.... anybody gonna vote on the positional data in the bvh being read???

http://jira.secondlife.com/browse/VWR-2374


Lares Carter added a comment - 27/Apr/09 10:29 AM
I am not sure if anyone noticed before, but the positional data in the .bvh file depends on the shape the avatar is wearing. I noticed while un-deforming my avatar, that the shape afterwards was not the same anymore.
The attached picture "before and after un-deform.jpg" shows the difference. I used a complete blue and complete red skin. The blue avatar shows my shape before using the un-defrom animations and the red one shows my shape after using them. The camera was at the exact same position.
This also means using the un-deform animations while wearing a tiny shape and then switching to a normal shape gives a different result than using the un-deform animations while wearing the normal shape.

You can reproduce, and starting any of the free un-deform animations.
(available here: https://www.xstreetsl.com/modules.php?name=Marketplace&file=item&ItemID=338968)
Its nicely visible for the joints lCollar and rCollar. You will see that the joint moves, even as it should be already at the normal position. The effect is very strong, if you set your shoulder width to 0 for your shape and after deforming setting it back to 50.


Shakeno Tomsen added a comment - 27/Apr/09 11:53 AM
I have also noticed that the macro avatars I am creating relying on the deformations have an issue of themselves sinking a little on the ground if you are out of the initial viewable area and you see the avatar later, or you teleport away and come back. The workaround I have found for this is changing to another shape and inmediatly changing back to the original one, then the avatar returns to their correct position.

Stickman Ingmann added a comment - 12/May/09 05:56 PM
Linking this bug to the feature request that would obsolete it. The feature request has been heavily updated, and any input is welcome.

TigroSpottystripes Katsu added a comment - 19/May/09 08:53 PM
hm, I thought I was already watching this entry, anyway, I'll keep my vote on this on hold till the proper replacement hits the main viewer

Stickman Ingmann added a comment - 12/Jun/09 01:47 PM
Oi. I've been meaning to post about the bugs that come with deformations, but it keeps slipping my mind. A lot of them have been mentioned. But each one has cures and preventive medicine.

This is all based on my own experiments, observation, and testing. It may not be completely accurate, and I welcome anyone who has more information to throw their lot in as well.

Undeformers Aren't Exact - The hierarchy data in the BVH files provided by Linden Lab were used as the base when I created my undeformers. Unfortunately, these BVH files don't exactly reflect what the avatar looks like inworld. I haven't had time to make an exact undeformer, since existing ones work so well most people don't notice.

My method for fixing this will be to get two people with the same shape, put them both on posing stands in the same coordinates, and then work out an undeformer that overlays them exactly. When done, changing their shapes to something wildly different should show whether or not a true undeformer is possible. Once one is created, it should be announced as "The One True Undeformer" and propagated as widely as possible.

If anyone wants to take the torch up before me, go ahead, for my plate runneth over. I don't want the glory, I just want the tool.

Deformed Avatars Sink - There are two sides to this bug. 1) The easily reproducible one is this: deform the avatar, and apply a new shape. Instant height offset. 2) As mentioned above, when a deformed avatar enters your range of vision, they sometimes sink. This is because you're loading them, and what did you load first? Their shape, or their deformations? If the shape is loaded first, they don't sink. If the shape is loaded second, they do.

I believe (but an not certain) that the difference between the two is thus. The first method updates the avatar's hip offset on the server. The second method updates the avatar's hip offset only on the client – client meaning it can be different for everyone looking at them. By "deruthing" (leaving someone's visual range and returning) you should be able to fix the second – as it'll cause the race condition again with another chance of the shape winning. However, for the first it requires undeforming and then changing shape to fix.

As a note. The 1.23 clients seem to carrying around the avatar's information for longer, or not drop it properly if they're nearby, but out of the cone of vision. Deruths may need to keep avatars out of sight for longer to actually work.

Surefire Undeforming - Because deformations are an animation, and because the client doesn't play animations on people not in your field of vision, if someone isn't WATCHING you when you undeform, you may still be deformed on their screen. In 1.22, "deruthing," even if off the person's screen, seems to undeform on everyone's screen. But not so much in 1.23. More testing is required.

This same thing applies for deformers, by the way. Which is why playing them in an infinite loop (on a low priority, and with zero ease out) is probably a good idea.

Aaaand... that's everything that immediately comes to mind. Let me know if I missed anything.


Lares Carter added a comment - 14/Jun/09 12:19 PM
Re to Stickman "Undeformers Aren't Exact"
I already did a couple of uploads on the beta grid about undeforming. Using the default values which are in the normal bvh files undeforms for a certain shape only. Using the same deformation on an avatar with a small shape will give a different result, than for an avatar with a big shape. My comment earlier pretty much says the same. So one could make an undeform-animation, but it always only undo the deformation for one certain, different settings for shoulders, etc. will give a different result. The only way to do a true back to default is a logoff and then login again. In short, two avatars with a complete different shape will never be able to undeform to the exact default with the same animation files.