Barbü is a prototyping framework for real-time 3D graphics aimed at simulating hairy creatures.
It is written in C++ 17 and OpenGL 4.6 (Core Profile).
Check the gallery here, or take a sneak peek.
- Entity-Components based system with live scene edit.
- Hot-reload of external assets (textures, models, shaders).
- PBR pipeline with Image Based Lighting.
- Postprocessing with tonemapping and horizontal based SSAO.
- Marschner's hair reflectance model GPU implementation.
- Dynamic GPU particles & hair simulation.
- GPU skinning animation via Dual Quaternion blending.
- GLTF 2.0 & OBJ drag-n-drop model import.
- Features rich camera controls.
- Colourful console logger with context tracking !
We will use the command-line on Unix and Git Bash on Windows.
First be sure to have Git LFS installed on your system to retrieve the assets, then clone the repo with its submodules :
git clone --recurse-submodules https://github.com/tcoppex/barbu.git
The following third parties are used :
- GLFW (3.3.4) : window management,
- GLM (0.9.9.8) : linear algebra.
- imgui (1.82) : user interface.
- im3d (1.16) : gizmo controller.
- stb_image (2.26) : image loader.
- cgltf (1.10) : gltf 2.0 loader.
- MikkTSpace : tangent space computation.
Some are shipped directly while others are retrieved as submodules. If you need to retrieved them separately, use this command in the project directory :
git submodule update --init --recursive
We will first create a build directory then generate the CMake cache depending on your system.
cd barbu
mkdir BUILD && cd BUILD
On Unix, using Makefile :
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . -- -j `nproc`
On Windows, using MSVC 15 for x64:
cmake .. -G "Visual Studio 15 2017 Win64"
cmake --build . --target ALL_BUILD --config Release
Notes : Using CMake, the build configuration type (ie. Debug, Release) is set at Build Time with MSVC and at Cache Generation Time with Makefile.
- When using a HDPI screen, you can specify the UI scaling with
HDPI_SCALING
(eg.-DHDPI_SCALING=1.5
). - OpenGL extensions are generated automatically by a custom Python script. Alternatively GLEW can be used by specifying the option
-DOPT_USE_GLEW=ON
to CMake. If something does not compile due to OpenGL functions, try to use GLEW instead. - By default some third parties are compiled as shared libraries. You can switch them to static by using the option
-DOPT_BUILD_SHARED_LIBS=OFF
.
The binary can be found in the project ./bin/
directory:
../bin/barbu
This project will not run on integrated GPUs with a "Compatibility Profile"-only driver.
-
"An Efficient Representation for Irradiance Environment Maps", Ramamoorthi, Ravi, and Pat Hanrahan. Proceedings of the 28th annual conference on Computer graphics and interactive techniques. 2001.
-
"Fast Simulation of Inextensible Hair and Fur". M. Müller, T.J. Kim, N. Chentanez. Virtual Reality Interactions and Physical Simulations (VRIPhys 2012).
-
"Geometric Skinning with Approximate Dual Quaternion Blending.", Kavan, Ladislav, et al. ACM Transactions on Graphics (TOG) 27.4 (2008): 1-23.
-
"Hair Animation and Rendering in the Nalu Demo". Hubert Nguyen, William Donnelly, GPU Gems 2, Chap 23
-
"Light Scattering from Human Hair Fibers". Marschner, S.R., Jensen, H.W., Cammarano, M., Worley, S. and Hanrahan, P., 2003. ACM Transactions on Graphics (TOG), 22(3), pp.780-791.
-
"Practical Applications of Compute for Simulation in Agni's Philosophy", Napaporn Metaaphanon, GPU Compute for Graphics, ACM SIGGRAPH ASIA 2014 Courses.
-
"Real time hair simulation and rendering on the GPU". Sarah Tariq, Louis Bavoil. ACM SIGGRAPH 2008 talks.
-
"The Importance of Being Linear". Larry Gritz, Eugene d'Eon, GPU Gems 3, Chap 24.
-
"Uncharted 2: HDR Lighting". John Hable, GDC 2012.
-
"Real Shading in Unreal Engine 4". Brian Karis, Epic Games. 2013.
Barbü is released under the MIT license.