Skip to content

Jhonve/HairStrandsRendering

Repository files navigation

HairStrandsRendering

This is a simple cross-platform hair rendering tool based on OpenGL and Dear ImGui. We provide an easy-to-use interface for visualizing strand-based 3D hair models. This project can be useful for hair modeling research.

Logo

Installation

Clone with --recursive flag so that some additional third-party libraries can be downloaded.

git clone --recursive https://github.com/Jhonve/HairStrandsRendering

Third-Party Libraries

Windows

On Windows, we use Visual Studio for development. You can open HairStrandsRendering.sln with Visual Studio. For configuration, you need to set the include path and library path of the 3rdparty libraries in the project properties. You can also use vcpkg to install the 3rdparty libraries instead of compiling from their source code.

We suggest editing the HairStrandsRendering/HairStrandsRendering.vcxproj for a quick configuration. For example:

83 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
84   <LinkIncremental>false</LinkIncremental>
85   <IncludePath>$(YOUR_INCLUDE_PATHS)$(IncludePath)</IncludePath>
86 </PropertyGroup>

Linux

Take Ubuntu as an example:

apt-get install libglfw-dev
apt-get install libassimp-dev

Modify the HairStrandsRendering/Makefile to set the include path of two header-only libraries glm and Eigen.

17 EIGEN_DIR = $YOUR_EIGEN_DIR
18 GLM_DIR = $YOUR_GLM_DIR

Compile the project:

cd HairStrandsRendering
make -j
# Run the project
./HairStrandsRendering

MacOS

Please install Homebrew first.

brew install glfw
brew install assimp

Modify the HairStrandsRendering/Makefile to set the include path of two header-only libraries glm and Eigen.

17 EIGEN_DIR = $YOUR_EIGEN_DIR
18 GLM_DIR = $YOUR_GLM_DIR

Compile the project:

cd HairStrandsRendering
make -j
# Run the project
./HairStrandsRendering

Usage

Several kinds of data are allowed including USC-HairSalon and Cem Yuksel's hair models. Please refer to their pages for more cases. I think our interface is already easy-to-use now. The only thing I need to mention is that, in the scene widget, I use the right mouse button to control the view.

Development

Please feel free to open an issue or pull requests if you have any questions or suggestions.

License

MIT License

Acknowledgments

We are using USC-HairSalon and Cem Yuksel's hair models as our demo data. Thanks to the authors for providing the data. Part of the hair shaders and rendering parameters are based on Menglei Chai's earlier works. Thanks for his excellent work.

About

A hair strand rendering tool using the Dear ImGui.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages