This repo is a fork of BVHView developed by Daniel Holden. This BVHView version has been developed for the GENEA Leaderboard research project.
The features below target the command line usage of BVHView. If a feature is "checked", it does not guarantee that the feature will be properly implemented in the GUI.
- Add textured mesh load support (.gltf)
- Add GENEA avatar mesh
- Playback BVH animation onto target mesh
- Add scrubber-synchronized WAV audio
- Load BVH and WAV via command line args
- Add SMPL-X meshes for the BEAT dataset
- Add .mp4 video recording using FFMPEG
- Add audio recording to .mp4 videos
- Add support for multiple animated models in the same scene
Low-prio features:
- Model shadows
- Orthographic camera
(The list could change with time.)
Used to open a window, render GUI and graphics (OpenGL), and process user input.
- Prepare
raylib
(refer to the original BVHView instructions). - Uncomment
#define SUPPORT_FILEFORMAT_JPG
inraylib/raylib/src/config.h
- This allows loading
.jpg
textures for user meshes - Other formats have not been tested, but feel free to try
- This allows loading
- Build
raylib
by runningmake -B
inraylib/raylib/src
- Build
raygui
(refer to the original BVHView instructions)
Convenience library for manipulating file paths.
- Download
include/cwalk.h
andsrc/cwalk.c
from here. - Copy
cwalk.h
andcwalk.c
to thesrc/external
folder in this repository. - The
Makefile
will handle the rest when you start building.
Used to record videos by streaming the raylib framebuffer.
- Refer to the original FFmpeg instructions.
Refer to the original BVHView instructions.
It is recommended that you run the software via the command line interface (CLI), as some features (such as .wav
loading) are only supported via command line arguments.
CLI example:
cd "[...]/BVHView/"
./bvhview.exe --bvh="./assets/bvh/genea/trn_2023_v0_000_main-agent.bvh" --wav="./assets/wav/genea/trn_2023_v0_000_main-agent.wav"
(Remove.exe
on Linux)
You can find example files in assets
folder.
All arguments are optional. There are many undocumented arguments that Daniel already included in the source.
Data
--bvh
: Path to a.bvh
animation data file.--wav
: Path to a.wav
audio file.--mesh
: Path to a.gltf
mesh. If not specified, capsules will be drawn instead. If.bvh
is not specified, the mesh will be loaded with a default pose, otherwise it will be animated.
Recording
--record
: Toggle recording of the 3D scene (this hides the window and UI). Default is disabled.--recordFps
: Toggle the FPS at which to record. Default is 30.--recordDirectory
: Specify an absolute or relative path where recordings will be saved. Default isoutput/video
in the working directory.--recordName
: Specify the name of the recording. Default is the name of the.bvh
file.
Camera
--cameraTrack
(boolean) : Forces the camera to track a bone.--cameraTrackBone
(int) : Specifies which bone ID to track if--cameraTrack
is specified.
Ground
--groundGridX
(int) : The number of grid cells along the X axis. Default=11--groundGridZ
(int) : The number of grid cells along the Z axis. Default=11--groundCellWidth
(float) : The size of each grid cell. Default=2.0
Windows:
- For releases at
BVHView/bvhview.exe
- For your own builds at
build/BVHView/bvhview.exe
Linux:
- There are no releases currently
- For your own builds at
build/BVHView/bvhview
Loading your mesh in BVHView is trickier than other DCC and game engines which have been developed for a long time. For example, there is currently no .fbx
support to import a mesh (but we can use .gltf
instead).
The steps below guide you through the process of preparing your mesh for BVHView. Note that these steps may differ depending on your character -- you may need to play with the import/export settings, textures, bone orientation.
- Setup
- Install
Blender
(Official website, Steam) - Start
Blender
- Delete all scene objects (Camera, Cube, Light...)
- Install
- Import
File > Import > FBX (.fbx)
- Select your
.fbx
mesh - Import settings:
- Reset settings via
Restore Operator Defaults
- Disable
Animation
- Reset settings via
- Press
Import FBX
- Configure model
- In
Object Mode
select your armature and thenObject > Apply > All transforms
- In
Object Mode
select your mesh and thenObject > Apply > All transforms
- In
- Export
File > Export > glTF 2.0 (.glb/.gltf)
- Choose export directory
- Example:
[...]/BVHView/assets/models/<your_model_folder/>
- Example:
- Choose a file name
- Warning: you should update the contents of the exported
.gltf
file if you rename any files after the export
- Warning: you should update the contents of the exported
- Export settings:
- Reset settings via
Restore Operator Defaults
Format > glTF Separate (.gltf + .bin + textures)
- Disable
Animation
- (You may need to set
Textures
to export the textures as files.)
- Reset settings via
- Press
Export glTF 2.0
- Test export by running
./bvhview --mesh="<path_to_gltf>"
If your textures are not loaded correctly or visible, it could be due to:
- Texture file is not
.png
or.jpg
- Only
.png
and.jpg
are supported currently. For other formats, you should uncomment the corresponding lines in/raylib/raylib/src/config.h
, rebuildraylib
, then rebuildBVHView
.
- Only
If your mesh or animation looks broken, it is likely because the BVH animation and model are incompatible. While it is tricky to diagnose these issues, you can take some measures to reduce the risk of your animation breaking:
- Ensure your BVH and model have the same bone hierarchy. This includes making sure that your "root" bone is in in fact a bone, and not the model object itself.
- Use the same naming scheme between model and BVH, namespaces included. (This is unlikely to cause issues for now, but could be used for data validation in the future.)
BVHView is a simple .bvh animation file format viewer built using raylib.
bvhview_low.mp4
Download and install MinGW in some form. Perhaps w64devkit or MSYS2.
Download raylib into C:/raylib/raylib
.
Download raygui into C:/raylib/raygui
.
Build raylib by going to C:/raylib/raylib/src
and running make
.
Download this repo and run make
in the main directory to build bvhview.exe
.
To build a release version with optimizations enabled and no console window run make BUILD_MODE=RELEASE
in the main directory instead.
Download raylib into ~/raylib/raylib
.
Download raygui into ~/raylib/raygui
.
Follow this guide to install any dependencies.
Build raylib by going to ~/raylib/raylib/src
and running make
.
Download this repo and run make
in the main directory to build bvhview
.
To build a release version with optimizations enabled run make BUILD_MODE=RELEASE
in the main directory instead.
For other platforms you should be able to build BVHView by hacking the Makefile
a bit. Contributions here welcome.