Cycles: Multi-scale Principled Hair Huang Model #116094

Merged
Weizhen Huang merged 4 commits from weizhen/blender:hair-nearfield into main 2024-02-22 18:18:24 +01:00
Member

Modify Principled Hair Huang model so that it also works for nearfield.
This is done by computing the actual range of the hair width that the current pixel covers, and only integrate on that subset.
When the hair covers less than one pixel on the screen or when the ray is not a camera ray, the model works the same as before.

Compare with previous model (elliptical cross-section)

Before After
before after

Compare with Chiang (circular cross-section)

Chiang Huang
chiang huang
Modify Principled Hair Huang model so that it also works for nearfield. This is done by computing the actual range of the hair width that the current pixel covers, and only integrate on that subset. When the hair covers less than one pixel on the screen or when the ray is not a camera ray, the model works the same as before. ### Compare with previous model (elliptical cross-section) |Before|After| |--|--| |![before](attachments/f00ac81e-1cbd-4458-a8af-088e7a906be2)|![after](attachments/d587daa6-a5e7-43a5-8180-0a22136dc036)| ### Compare with Chiang (circular cross-section) |Chiang|Huang| |--|--| |![chiang](attachments/157b355c-9fa8-486c-901c-863d56495dc7)|![huang](attachments/4193a7ff-37de-44da-8e1e-9fe351db03cf)|
Weizhen Huang added this to the Render & Cycles project 2023-12-12 13:22:43 +01:00
Weizhen Huang force-pushed hair-nearfield from f4db5443d3 to de2a33f456 2024-02-08 12:23:27 +01:00 Compare
Weizhen Huang force-pushed hair-nearfield from 9e6d181223 to ee32d28422 2024-02-09 22:59:17 +01:00 Compare
Weizhen Huang force-pushed hair-nearfield from cd8450b2b2 to d21f817e7e 2024-02-12 17:59:55 +01:00 Compare
Weizhen Huang changed title from WIP: Cycles: Multi-scale Principled Hair Huang Model to Cycles: Multi-scale Principled Hair Huang Model 2024-02-12 18:35:48 +01:00
Author
Member

For review:

The first three commits are just improvements/simplifications to make the following change easier. The commit messages should be enough to explain what they do. They will be committed separately.

The last commit is the main implementation of the pull request. The algorithm is similar as in An Efficient and Practical Near and Far Field Fur Reflectance Model: In sum/closure.h/osl/closure_setup.h, one computes the projected width of a pixel at the shading point; in bsdf_principled_hair_huang.h, this pixel width is compared with the width of the hair; if the hair spans more than one pixel, one only integrates in the range that a pixel would cover at the shading point, instead of the whole hair width.

**For review:** The first three commits are just improvements/simplifications to make the following change easier. The commit messages should be enough to explain what they do. They will be committed separately. The last commit is the main implementation of the pull request. The algorithm is similar as in [An Efficient and Practical Near and Far Field Fur Reflectance Model](https://sites.cs.ucsb.edu/~lingqi/publications/paper_fur2.pdf): In `sum/closure.h`/`osl/closure_setup.h`, one computes the projected width of a pixel at the shading point; in `bsdf_principled_hair_huang.h`, this pixel width is compared with the width of the hair; if the hair spans more than one pixel, one only integrates in the range that a pixel would cover at the shading point, instead of the whole hair width.
Weizhen Huang force-pushed hair-nearfield from d21f817e7e to 54b431e76d 2024-02-12 20:34:55 +01:00 Compare
Weizhen Huang requested review from Brecht Van Lommel 2024-02-12 20:37:47 +01:00
Weizhen Huang requested review from Lukas Stockner 2024-02-12 20:37:57 +01:00
Brecht Van Lommel approved these changes 2024-02-20 18:44:35 +01:00
Weizhen Huang force-pushed hair-nearfield from 54b431e76d to e3abd15692 2024-02-22 17:37:45 +01:00 Compare
Author
Member

@blender-bot build

@blender-bot build
Weizhen Huang merged commit a3f0ff6184 into main 2024-02-22 18:18:24 +01:00
Weizhen Huang deleted branch hair-nearfield 2024-02-22 18:18:26 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#116094
No description provided.