AcademySoftwareFoundation / OpenPBR

Specification and reference implementation for the OpenPBR Surface shading model
Apache License 2.0
497 stars 21 forks source link

Fuzz normal when layered on top of coat #107

Open brechtvl opened 1 year ago

brechtvl commented 1 year ago

Coat uses geometry_coat_normal, while other layers including fuzz use geometry_normal. Now that fuzz is on top of coat, this may no longer be correct.

Consider a material with a bumpy base layer, and a smooth coat layer on top that fills in the bumps. The fuzz should then have a smooth normal as well?

A solution could be to blend geometry_normal and geometry_coat_normal with coat_weight, and use that as the fuzz normal?

virtualzavie commented 1 year ago

Thank you for pointing this out.

We could describe that the fuzz uses the normal of the layer underneath. In the case of partial coverage, that would be a blend of two fuzz lobes using normal from the base and coat layers. It would be expensive to evaluate, but implementations could approximate by "blending" normals.

portsmouth commented 1 year ago

Pushed a PR for this: https://github.com/AcademySoftwareFoundation/OpenPBR/pull/117

portsmouth commented 8 months ago

Can be closed, addressed in https://github.com/AcademySoftwareFoundation/OpenPBR/pull/117