SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
Hair Animation by
Vertex Shader
Gregory Dongseok Kim
2016-04-25
2
Overview
■ Good shading models for hair
■ Structure of hair
■ Approach
■ Shader
3
Good Shading models for Hair
■ Using Scheuermann's hair shading model1
4
Yes, it was a joke. But,
■ It is cheap and very effective solution to describe hair specular
in real-time.
■ Furthermore, one of speculars can be used to simulate front
scattering.
■ It means that you just need to add rim light and trnasmission
effects to improve quality.
5
Honestly,
just use Hair Shader in Unreal Engine 4
6
Structure of Hair
■ Hair can be devided into 4 parts
– Front parts
– Middle parts
– Back parts
– Additional parts
■ Each parts have its own flow
– You can presume movement of hair by flow.
○
Most important thing is the root of hairs
7
Wait, is that Front? Not Side?
8
Yes, in terms of movement perspective...
■ Obviously, it can be treated as side parts or additional parts.
■ But those parts are on the body, so they move forward rather
than sideway.
– In real world, they also can move sideway, but when they move like
that, their whole shapes are spread along the body.
– Unfortunately, my approach cannot simulate it.
– So, I treat the movement of those parts to constrain to move
forward. Because...
9
Concept of My approach
■ Incoding movement data of each vertices to each vertex color
channels
– R: Amount of movement
– G: Left / Right collision
– B: Clumping group
– A: Front / Back collision
■ It means that I divided hairs to like this...
10
11
How to set values for amount of movement
■ I premised that the tip of each hairs
move more than root.
■ So, I set value of each vertices like
this
– Root part: 0.0
– Tip part: 1.0
– Rest of them
○
Gradually changed their value by its
relative position on UV coordinate
– Based on V position
12
How to set values for classifying each sides (1)
■ Classifying of Left/Right
– Insert crietrion plane
– If the X position of the vertex is
more left side than Plane's X
position, than
○
Value is 1.0
○ Else are 0.0
13
How to set values for classifying each sides (2)
■ Classifying of Front / Back
– Using same way as the method
to divide Left/Right
– Insert criterion Plane
– If the Y position of the vertex is
more forward than Plane's Y
position, than
○
Value is 0.0
○
Else are 1.0
14
■ Of course, I didn't use that kind of simple way
– Rays cast to criterion Plane's each sides normal directions
– Check whether rays intersect with vertices or not
– Classify which vertices are located in which side
■ But main idea can be simplified above statements.
■ Anyway, thease values will be combined with collision data
15
How to set values for collision
■ Check hair vertices are collided with collision mesh
– If the vertex is collided, meassure the distance between the vertex
and the face of collision mesh.
– Store that value as collision value.
■ Combine this value with side classifying value
– If collision value does not exist: set value to 0.5
– If collsion value exists: add {0.5 * (Distance Value/Average
Distance)}
16
Result of collision data (1)
■ Final collision meshes
– Yellow: Collision mesh
– Planes: Classifying sides
17
Result of collision data (2)
18
How to use collision data (1)
■ Collision data means
– Adding amount for normalized acceleration vector of each vertices
19
How to use collision data (2)
■ Decode collision data from (0.0 ~ 1.0) to (-1.0 ~ 1.0)
■ Every calculation were done under Local space of hair
■ Transform World space Acceleration vector to Local space
– Acceleration = Wind + Head movement
– Use acceleration vector after normalization
■ Add collision value with Acceleration vector of each axis
– Add Left/Right value with X axis
– Add Front/Back value with Y axis
■ Clamp result value to (-1.0 ~ 1.0)
■ Multiply strength of Acceleration vector
20
Shader
21
Shader – detail (1)
Decoding Collision data
22
Shader – detail (2)
Adding Acceleration vector
23
Shader – detail (3)
Multiplying Acceleration strength
24
Shader – detail (4)
Multiplying
Movement amount
with the result
25
Limitation
■ Move only Left/Right and Forward/Backward
– It cannot move Up/Down
○
There is no more vertex color channel
■ Not for long hair style such as pony tail
– For waving movements which preserves initial hair style
■ Cannot move far from initial skining pose
– Gives some offset values by vertex color value
26
Conclusion
■ Save movement data to Vertex color
– R: Amount of movement
– G: Left / Right collision
– B: Clumping group
– A: Front / Back collision
■ Combine collision value with Acceleration Vector
– Normalized Acceleration Vector
– In Local space
– Multiply strength of Acceleration Vector
– Filter final movement by Movement amount
27
Bibliography
■ Page 3
– Citation 1: Scheuermann, Thorsten. "Practical real-time hair
rendering and shading." ACM SIGGRAPH 2004 Sketches. ACM,
2004.

Contenu connexe

Tendances

Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
Electronic Arts / DICE
 

Tendances (20)

Practical usage of Lightmass in Architectural Visualization (Kenichi Makaya...
Practical usage of Lightmass in  Architectural Visualization  (Kenichi Makaya...Practical usage of Lightmass in  Architectural Visualization  (Kenichi Makaya...
Practical usage of Lightmass in Architectural Visualization (Kenichi Makaya...
 
UE4でTranslucencyやUnlitに影を落としたい!
UE4でTranslucencyやUnlitに影を落としたい!UE4でTranslucencyやUnlitに影を落としたい!
UE4でTranslucencyやUnlitに影を落としたい!
 
UE4.14で入る新機能の一部を 駆け足でご紹介!
UE4.14で入る新機能の一部を 駆け足でご紹介!UE4.14で入る新機能の一部を 駆け足でご紹介!
UE4.14で入る新機能の一部を 駆け足でご紹介!
 
Mask Material only in Early Z-passの効果と仕組み
Mask Material only in Early Z-passの効果と仕組みMask Material only in Early Z-passの効果と仕組み
Mask Material only in Early Z-passの効果と仕組み
 
UE4における大規模背景制作事例 最適化ワークフロー編
UE4における大規模背景制作事例 最適化ワークフロー編UE4における大規模背景制作事例 最適化ワークフロー編
UE4における大規模背景制作事例 最適化ワークフロー編
 
もっとNiagaraを楽しもう!~UE4.25での作例と解説~ (UE4 VFX Art Dive)
もっとNiagaraを楽しもう!~UE4.25での作例と解説~ (UE4 VFX Art Dive)もっとNiagaraを楽しもう!~UE4.25での作例と解説~ (UE4 VFX Art Dive)
もっとNiagaraを楽しもう!~UE4.25での作例と解説~ (UE4 VFX Art Dive)
 
Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016
 
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER
 
[IGC 2017] 에픽게임즈 최용훈 - 밤낮으로 부수고 짓고 액션 빌딩 게임 만들기 - 포트나이트
[IGC 2017] 에픽게임즈 최용훈 - 밤낮으로 부수고 짓고 액션 빌딩 게임 만들기 - 포트나이트[IGC 2017] 에픽게임즈 최용훈 - 밤낮으로 부수고 짓고 액션 빌딩 게임 만들기 - 포트나이트
[IGC 2017] 에픽게임즈 최용훈 - 밤낮으로 부수고 짓고 액션 빌딩 게임 만들기 - 포트나이트
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
 
大規模ゲーム開発におけるHoudini活用事例
大規模ゲーム開発におけるHoudini活用事例大規模ゲーム開発におけるHoudini活用事例
大規模ゲーム開発におけるHoudini活用事例
 
Hable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr LightingHable John Uncharted2 Hdr Lighting
Hable John Uncharted2 Hdr Lighting
 
Masked Software Occlusion Culling
Masked Software Occlusion CullingMasked Software Occlusion Culling
Masked Software Occlusion Culling
 
HDR Theory and practicce (JP)
HDR Theory and practicce (JP)HDR Theory and practicce (JP)
HDR Theory and practicce (JP)
 
UE4におけるエフェクトの基本戦略事例 後半
UE4におけるエフェクトの基本戦略事例  後半UE4におけるエフェクトの基本戦略事例  後半
UE4におけるエフェクトの基本戦略事例 後半
 
UE4 コリジョン検証 -HitとOverlapイベントが発生する条件について-
UE4 コリジョン検証 -HitとOverlapイベントが発生する条件について-UE4 コリジョン検証 -HitとOverlapイベントが発生する条件について-
UE4 コリジョン検証 -HitとOverlapイベントが発生する条件について-
 
UE4におけるLoadingとGCのProfilingと最適化手法
UE4におけるLoadingとGCのProfilingと最適化手法UE4におけるLoadingとGCのProfilingと最適化手法
UE4におけるLoadingとGCのProfilingと最適化手法
 
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
 
UE4におけるエフェクトの基本戦略事例 前半
UE4におけるエフェクトの基本戦略事例  前半UE4におけるエフェクトの基本戦略事例  前半
UE4におけるエフェクトの基本戦略事例 前半
 
アーティストの為のプロファイル入門!~楽しいRenderDocの使い方~
アーティストの為のプロファイル入門!~楽しいRenderDocの使い方~アーティストの為のプロファイル入門!~楽しいRenderDocの使い方~
アーティストの為のプロファイル入門!~楽しいRenderDocの使い方~
 

En vedette

Brdf기반 사전정의 스킨 셰이더
Brdf기반 사전정의 스킨 셰이더Brdf기반 사전정의 스킨 셰이더
Brdf기반 사전정의 스킨 셰이더
동석 김
 
Design patterns
Design patternsDesign patterns
Design patterns
df
 
Schedule stcm55 q_5
Schedule stcm55 q_5Schedule stcm55 q_5
Schedule stcm55 q_5
Ouyauy Obt
 
Informática Básica
Informática BásicaInformática Básica
Informática Básica
jmatiaselim
 

En vedette (19)

Brdf기반 사전정의 스킨 셰이더
Brdf기반 사전정의 스킨 셰이더Brdf기반 사전정의 스킨 셰이더
Brdf기반 사전정의 스킨 셰이더
 
버텍스 셰이더로 하는 머리카락 애니메이션
버텍스 셰이더로 하는 머리카락 애니메이션버텍스 셰이더로 하는 머리카락 애니메이션
버텍스 셰이더로 하는 머리카락 애니메이션
 
[Ndc13]Ndc 2013 김동석:UDK로 물리기반 셰이더 만들기
[Ndc13]Ndc 2013 김동석:UDK로 물리기반 셰이더 만들기[Ndc13]Ndc 2013 김동석:UDK로 물리기반 셰이더 만들기
[Ndc13]Ndc 2013 김동석:UDK로 물리기반 셰이더 만들기
 
언리얼 엔진 4용 커스텀 천 재질
언리얼 엔진 4용 커스텀 천 재질언리얼 엔진 4용 커스텀 천 재질
언리얼 엔진 4용 커스텀 천 재질
 
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다 공개용
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다  공개용물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다  공개용
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다 공개용
 
Hair in Tomb Raider
Hair in Tomb RaiderHair in Tomb Raider
Hair in Tomb Raider
 
물리 기반 셰이더의 이해
물리 기반 셰이더의 이해물리 기반 셰이더의 이해
물리 기반 셰이더의 이해
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space Marine
 
[Unite2015 박민근] 유니티 최적화 테크닉 총정리
[Unite2015 박민근] 유니티 최적화 테크닉 총정리[Unite2015 박민근] 유니티 최적화 테크닉 총정리
[Unite2015 박민근] 유니티 최적화 테크닉 총정리
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Gdc2003 Will Wright
Gdc2003 Will WrightGdc2003 Will Wright
Gdc2003 Will Wright
 
Sopa de letras
Sopa de letrasSopa de letras
Sopa de letras
 
Los principios y valores
Los principios y valoresLos principios y valores
Los principios y valores
 
Schedule stcm55 q_5
Schedule stcm55 q_5Schedule stcm55 q_5
Schedule stcm55 q_5
 
1 ok
1 ok1 ok
1 ok
 
6ok
6ok6ok
6ok
 
Actionpay FINANCE: Innovations in online advertising for banks
Actionpay FINANCE: Innovations in online advertising for banksActionpay FINANCE: Innovations in online advertising for banks
Actionpay FINANCE: Innovations in online advertising for banks
 
6ok
6ok6ok
6ok
 
Informática Básica
Informática BásicaInformática Básica
Informática Básica
 

Similaire à Hair animation by vertex shader

Trigonometry functions of general angles reference angles
Trigonometry functions of general angles reference anglesTrigonometry functions of general angles reference angles
Trigonometry functions of general angles reference angles
Jessica Garcia
 
Trigonometry functions of general angles reference angles
Trigonometry functions of general angles reference anglesTrigonometry functions of general angles reference angles
Trigonometry functions of general angles reference angles
Jessica Garcia
 
vectorshonors in Physique Better titles and descriptions lead to more readers
vectorshonors in Physique Better titles and descriptions lead to more readersvectorshonors in Physique Better titles and descriptions lead to more readers
vectorshonors in Physique Better titles and descriptions lead to more readers
DianaRosePesimo
 

Similaire à Hair animation by vertex shader (17)

Unit 1 - Measurements & Vectors.pdf
Unit 1 - Measurements & Vectors.pdfUnit 1 - Measurements & Vectors.pdf
Unit 1 - Measurements & Vectors.pdf
 
Trigonometry functions of general angles reference angles
Trigonometry functions of general angles reference anglesTrigonometry functions of general angles reference angles
Trigonometry functions of general angles reference angles
 
Surface modelling
Surface modellingSurface modelling
Surface modelling
 
Lesson 2: Vectors
Lesson 2: VectorsLesson 2: Vectors
Lesson 2: Vectors
 
una01
una01una01
una01
 
Trigonometric Function of General Angles Lecture
Trigonometric Function of General Angles LectureTrigonometric Function of General Angles Lecture
Trigonometric Function of General Angles Lecture
 
3D transformation and viewing
3D transformation and viewing3D transformation and viewing
3D transformation and viewing
 
Physics details
Physics detailsPhysics details
Physics details
 
2 change
2 change2 change
2 change
 
SURFACE MODELLING .pptx
SURFACE MODELLING .pptxSURFACE MODELLING .pptx
SURFACE MODELLING .pptx
 
Trigonometry functions of general angles reference angles
Trigonometry functions of general angles reference anglesTrigonometry functions of general angles reference angles
Trigonometry functions of general angles reference angles
 
3.Lensometery.pptx
3.Lensometery.pptx3.Lensometery.pptx
3.Lensometery.pptx
 
6.3_AccelerationInclinedPlanes.pdf.com.ph
6.3_AccelerationInclinedPlanes.pdf.com.ph6.3_AccelerationInclinedPlanes.pdf.com.ph
6.3_AccelerationInclinedPlanes.pdf.com.ph
 
study of yaw and pitch control in quad copter
study  of yaw and pitch  control in quad copter study  of yaw and pitch  control in quad copter
study of yaw and pitch control in quad copter
 
vectorshonors.ppt
vectorshonors.pptvectorshonors.ppt
vectorshonors.ppt
 
vectorshonors in Physique Better titles and descriptions lead to more readers
vectorshonors in Physique Better titles and descriptions lead to more readersvectorshonors in Physique Better titles and descriptions lead to more readers
vectorshonors in Physique Better titles and descriptions lead to more readers
 
Vectors and scalars
Vectors and scalarsVectors and scalars
Vectors and scalars
 

Dernier

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Dernier (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 

Hair animation by vertex shader

  • 1. Hair Animation by Vertex Shader Gregory Dongseok Kim 2016-04-25
  • 2. 2 Overview ■ Good shading models for hair ■ Structure of hair ■ Approach ■ Shader
  • 3. 3 Good Shading models for Hair ■ Using Scheuermann's hair shading model1
  • 4. 4 Yes, it was a joke. But, ■ It is cheap and very effective solution to describe hair specular in real-time. ■ Furthermore, one of speculars can be used to simulate front scattering. ■ It means that you just need to add rim light and trnasmission effects to improve quality.
  • 5. 5 Honestly, just use Hair Shader in Unreal Engine 4
  • 6. 6 Structure of Hair ■ Hair can be devided into 4 parts – Front parts – Middle parts – Back parts – Additional parts ■ Each parts have its own flow – You can presume movement of hair by flow. ○ Most important thing is the root of hairs
  • 7. 7 Wait, is that Front? Not Side?
  • 8. 8 Yes, in terms of movement perspective... ■ Obviously, it can be treated as side parts or additional parts. ■ But those parts are on the body, so they move forward rather than sideway. – In real world, they also can move sideway, but when they move like that, their whole shapes are spread along the body. – Unfortunately, my approach cannot simulate it. – So, I treat the movement of those parts to constrain to move forward. Because...
  • 9. 9 Concept of My approach ■ Incoding movement data of each vertices to each vertex color channels – R: Amount of movement – G: Left / Right collision – B: Clumping group – A: Front / Back collision ■ It means that I divided hairs to like this...
  • 10. 10
  • 11. 11 How to set values for amount of movement ■ I premised that the tip of each hairs move more than root. ■ So, I set value of each vertices like this – Root part: 0.0 – Tip part: 1.0 – Rest of them ○ Gradually changed their value by its relative position on UV coordinate – Based on V position
  • 12. 12 How to set values for classifying each sides (1) ■ Classifying of Left/Right – Insert crietrion plane – If the X position of the vertex is more left side than Plane's X position, than ○ Value is 1.0 ○ Else are 0.0
  • 13. 13 How to set values for classifying each sides (2) ■ Classifying of Front / Back – Using same way as the method to divide Left/Right – Insert criterion Plane – If the Y position of the vertex is more forward than Plane's Y position, than ○ Value is 0.0 ○ Else are 1.0
  • 14. 14 ■ Of course, I didn't use that kind of simple way – Rays cast to criterion Plane's each sides normal directions – Check whether rays intersect with vertices or not – Classify which vertices are located in which side ■ But main idea can be simplified above statements. ■ Anyway, thease values will be combined with collision data
  • 15. 15 How to set values for collision ■ Check hair vertices are collided with collision mesh – If the vertex is collided, meassure the distance between the vertex and the face of collision mesh. – Store that value as collision value. ■ Combine this value with side classifying value – If collision value does not exist: set value to 0.5 – If collsion value exists: add {0.5 * (Distance Value/Average Distance)}
  • 16. 16 Result of collision data (1) ■ Final collision meshes – Yellow: Collision mesh – Planes: Classifying sides
  • 18. 18 How to use collision data (1) ■ Collision data means – Adding amount for normalized acceleration vector of each vertices
  • 19. 19 How to use collision data (2) ■ Decode collision data from (0.0 ~ 1.0) to (-1.0 ~ 1.0) ■ Every calculation were done under Local space of hair ■ Transform World space Acceleration vector to Local space – Acceleration = Wind + Head movement – Use acceleration vector after normalization ■ Add collision value with Acceleration vector of each axis – Add Left/Right value with X axis – Add Front/Back value with Y axis ■ Clamp result value to (-1.0 ~ 1.0) ■ Multiply strength of Acceleration vector
  • 21. 21 Shader – detail (1) Decoding Collision data
  • 22. 22 Shader – detail (2) Adding Acceleration vector
  • 23. 23 Shader – detail (3) Multiplying Acceleration strength
  • 24. 24 Shader – detail (4) Multiplying Movement amount with the result
  • 25. 25 Limitation ■ Move only Left/Right and Forward/Backward – It cannot move Up/Down ○ There is no more vertex color channel ■ Not for long hair style such as pony tail – For waving movements which preserves initial hair style ■ Cannot move far from initial skining pose – Gives some offset values by vertex color value
  • 26. 26 Conclusion ■ Save movement data to Vertex color – R: Amount of movement – G: Left / Right collision – B: Clumping group – A: Front / Back collision ■ Combine collision value with Acceleration Vector – Normalized Acceleration Vector – In Local space – Multiply strength of Acceleration Vector – Filter final movement by Movement amount
  • 27. 27 Bibliography ■ Page 3 – Citation 1: Scheuermann, Thorsten. "Practical real-time hair rendering and shading." ACM SIGGRAPH 2004 Sketches. ACM, 2004.