Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Cem Yuksel's HAIR Format #1

Closed
CaffeineViking opened this issue Oct 17, 2018 · 0 comments
Closed

Support Cem Yuksel's HAIR Format #1

CaffeineViking opened this issue Oct 17, 2018 · 0 comments
Assignees
Labels
Project: Renderer Issues relating to the core hair renderer itself. Type: Feature Something new and shiny is being requested.

Comments

@CaffeineViking
Copy link
Owner

CaffeineViking commented Oct 17, 2018

Most research papers on hair rendering use Cem Yuksel's HAIR file format for the geometry, since there is a large repository of existing hair styles provided in: http://www.cemyuksel.com/research/hairmodels. Write a basic HAIR file loader, more-or-less like cyHair, but optimize the file IO (uses C-style freads), and interface.

Usage:

vkhr::HairStyle curly_hair { "share/style/wCurly.hair" };

if (!curly_hair) {
    std::cerr << "Failed to load hair style!" << std::endl;
    return -1;
}

for (auto vertex : curly_hair.vertices) {
    // Do some processing on the vertices.
}

curly_hair.save("share/style/wCurly.hair.pre-processed");

if (!curly_hair) {
    std::cerr << "Failed to save hair style!" << std::endl;
    return -2;
}
@CaffeineViking CaffeineViking added Type: Feature Something new and shiny is being requested. Project: Renderer Issues relating to the core hair renderer itself. labels Oct 17, 2018
@CaffeineViking CaffeineViking self-assigned this Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project: Renderer Issues relating to the core hair renderer itself. Type: Feature Something new and shiny is being requested.
Projects
None yet
Development

No branches or pull requests

1 participant