RiverIntheSky / elliptical_hair

MIT License
0 stars 2 forks source link

Difference between rough_hair and elliptical_hair #1

Closed ib00 closed 1 year ago

ib00 commented 1 year ago

What's the difference between this repository and your 'rough_hair' repository with EGSR paper implementation?

RiverIntheSky commented 1 year ago

hey ib00! There is no difference between this repository and rough_hair repository's ellipse branch, the other repository just have a main branch with pdf implementation. I originally intended to use this repo to improve the hair intersection, but it turns out to be much more difficult than I thought, so in the end I didn't change it.

ib00 commented 1 year ago

What's the defficiency of current hair intersection?

RiverIntheSky commented 1 year ago

Currently one hair strand is approximated by many cylinder segments, which is the usual way to simplify the ray-curve intersection (cf. https://www.pbr-book.org/3ed-2018/Shapes/Curves). A preciser way would be to directly compute the intersection with the curve instead of to subdivide the curve. However, I am not aware of any such algorithm for intersecting curves with elliptical cross-sections. There are some algorithms for circular cross-sections (this one for example http://www.cemyuksel.com/research/polynomials/polynomial_roots_hpg2022.pdf). It might also be unnecessary for far-field models.

ib00 commented 1 year ago

Interesting and hard problem.

Reshetov had a paper some time ago on direct intersection, but haven't seen anybody implementing it: https://research.nvidia.com/publication/2018-08_phantom-ray-hair-intersector