Quinn Elara Posted April 20, 2022 Share Posted April 20, 2022 (edited) Hey all, I'm tinkering around with the SL animation system, and I've got some animations which I want to try out mixed priorities on - I've heard / seen that SL's .anim format can facilitate this, but I seem to be drawing a blank as to how to convert my .bvh files to .anim files. (Or at least, any solutions that don't point to Avastar - I don't want to spend money on an idea which could go nowhere!) I've found a couple different tools, but none will allow me to import a bvh and save out a .anim Extrude Ragu's AnimHacker - I'd like to play around with this, but it can only handle .anim files, no support for .bvh AnimMaker - Oooold tool for creating and manipulating .anim files. Still seems to work with Bento, which is cool. Uses different Coordinate space than AnimHacker. Again, no .bvh support though. Anim2BVH - Conversion goes the wrong way. No bento support. I've seen it mentioned on the forum that the viewer creates a .anim from a .bvh before upload, but it doesn't seem like you can export the .anim :( Anyone got any recommendations (aside, of course, Avastar) of any other tools which may help in this endeavour? Edited April 20, 2022 by Jenna Huntsman Link to comment Share on other sites More sharing options...
Aglaia Posted April 22, 2022 Share Posted April 22, 2022 (edited) You could also use Bento Buddy. Not free neither, but cheaper than Avastar. You could import the bvh then export to anim. I haven't tried, but it should work, i think. Edited April 22, 2022 by Aglaia Link to comment Share on other sites More sharing options...
Anaiya Ahren Posted April 28, 2022 Share Posted April 28, 2022 Can't you just use Blender ( Addons tab --> enable Import-Export: BioVision Motion Capture (BVH) format), or has that changed since the version I have? Link to comment Share on other sites More sharing options...
Quinn Elara Posted April 29, 2022 Author Share Posted April 29, 2022 3 hours ago, Anaiya Ahren said: Can't you just use Blender ( Addons tab --> enable Import-Export: BioVision Motion Capture (BVH) format), or has that changed since the version I have? You can, but unfortunately that's not the answer to the question I was asking - that would just re-export a .bvh, when I want the resulting file in the SL-specific .anim format which allows for some more advanced configuration. The Avastar plugin for Blender can do this, but unfortunately I'm not in the position to invest in a tool like that right now for an idea which is just a concept right now. Link to comment Share on other sites More sharing options...
Quistess Alpha Posted April 29, 2022 Share Posted April 29, 2022 On 4/20/2022 at 1:26 PM, Jenna Huntsman said: I've seen it mentioned on the forum that the viewer creates a .anim from a .bvh before upload It does, and I've been meaning to rework some of the linden source into a simple converter that would also read/write a human-readable analogue of .Anim. . . but other things keep coming up and it would probably take me a week or so of dedicated effort. . . maybe in a few months I'll get around to it. If you want to give it a go . . . https://bitbucket.org/lindenlab/viewer/src/master/indra/llcharacter/llbvhloader.cpp should give you a good lead. 1 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted May 19, 2022 Share Posted May 19, 2022 @Jenna Huntsman I got around to it! My converter works on the few test cases I tried (mostly bvh animations from open-collar) although it's not 1:1 with the viewer's conversion (it doesn't cull minute changes or 0-data, and I'm not sure why the bvh examples I have explicitly tell the avatar to go 46 inches upwards.) It turns out the math for the conversion is pretty straight-forward, but file-IO is a bit of a nightmare. If you're comfortable compiling from source, feel free to send me a message. There's still a bit of cleanup to do before I release it publicly* though. *if I release it publicly.. . on the one hand, was a decent amount of work, on the other, I'm not really interested in trying to add usability features like a file selection interface, and I don't really want to be obliged to explain to people how to use a command-line or compile from source. . . Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted May 20, 2022 Share Posted May 20, 2022 13 hours ago, Quistess Alpha said: if I release it publicly.. . on the one hand, was a decent amount of work, on the other, I'm not really interested in trying to add usability features like a file selection interface, and I don't really want to be obliged to explain to people how to use a command-line or compile from source. . . Just link it here if/when you've cleaned it up enough, there's a small chance someone can improve on it. ♥️ 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted May 20, 2022 Share Posted May 20, 2022 6 hours ago, Wulfie Reanimator said: Just link it here if/when you've cleaned it up enough, there's a small chance someone can improve on it. ♥️ Just remembering all the minor issues left to sort out (see todo.txt), and fixing one or two of them took a bit, but here it is: https://gitlab.com/Quillia/anim-converter Maybe c isn't the friendliest language for this sort of task, but I think the general structure is simple enough to be redone in whatever language/framework someone might want to convert it to. 4 Link to comment Share on other sites More sharing options...
Quinn Elara Posted May 21, 2022 Author Share Posted May 21, 2022 21 hours ago, Quistess Alpha said: Just remembering all the minor issues left to sort out (see todo.txt), and fixing one or two of them took a bit, but here it is: https://gitlab.com/Quillia/anim-converter Maybe c isn't the friendliest language for this sort of task, but I think the general structure is simple enough to be redone in whatever language/framework someone might want to convert it to. I've had a little play around with this, but I can't get it to successfully convert any of the animations I've got - I'll upload one of them and DM you a link, but this is the output that I see: ./bvh2anim bentoReferenceWtransforms.bvh out.anim Animation priority: 4 Does the animation loop? (y or n) n ease_in amount: 0.3 ease_out amount: 0.3 nFrames: 1 Frame time: 0.041667 Segmentation fault (core dumped) Link to comment Share on other sites More sharing options...
OptimoMaximo Posted May 21, 2022 Share Posted May 21, 2022 5 hours ago, Jenna Huntsman said: I've had a little play around with this, but I can't get it to successfully convert any of the animations I've got - I'll upload one of them and DM you a link, but this is the output that I see: ./bvh2anim bentoReferenceWtransforms.bvh out.anim Animation priority: 4 Does the animation loop? (y or n) n ease_in amount: 0.3 ease_out amount: 0.3 nFrames: 1 Frame time: 0.041667 Segmentation fault (core dumped) Most likely the error is given by the 1 frame specification. In a SL compatible bvh, first frame is reserved to TPose, then the animation begins. So in this case I suspect that specifying 1 frame causes an error. Link to comment Share on other sites More sharing options...
Recommended Posts
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