[LUA] BVH exporter
Here is the script I wrote that converts Toribash-4.95 replay .rpl file to the Biovision Hierarchy .bvh format.
It is based on NutHug's Replay Recorder script
http://forum.toribash.com/showthread.php?t=439010
Usage is basically the same.
First remove space symbols from the replay you want to export.
Download script to data/script, load it ingame "/loadscript rpl2bvh.rpl", run "/tobvh playerid input output startframe endframe"
playerid: "0" or "tori", "1" or "uke".
input: "myreplay", "/myfolder/myreplay"
output: "bvhfile", "/folderforbvh/bvhfile"
startframe: frame you want start recording from. If empty or zero last frame is taken.
endframe: frame you want end recording. If empty its zero frame.
Examples:
/tobvh 0 large large
/tobvh uke /myreplays/awesome /bvhs/fyeah 1000 400
/tobvh 1 bar bar1 0 500
Additional setup:
By default it writes every second frame to bvh. To change this open the script file and in the very top change the "sampling" value.
To change the size of exported figure use the "scale" value. By default I've put it to 10 so that it displays better in bvh_player. In Blender you can easily adjust it.
Now you can view your replay in any bvh players like
http://www.oshita-lab.org/software/bvh/index.html or
http://bvhacker.com/. Note however it's 90 degrees rotated than expected, because of difference in TB and bvh. Might change it in future.
But more importantly you can open it in any major 3d software and use to animate a character! Also you can make a better render using this awesome tori models
http://forum.toribash.com/showthread.php?t=188623.
There is a drawback however, bvh format have no support of stretching, therefore you'll have to edit a bit the animation to look better, and it takes time.
Here is the video I've made using the script:
https://www.youtube.com/watch?v=fLlUYQTGwwg
Last edited by barbarbar; Mar 22, 2016 at 10:30 PM.