SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Custom Fabric Shader
for Unreal Engine 4
Gregory Dongseok Kim
2016-04-11
■ Two types of Fabric
⚬ Non-Metal: Cotton, denim, flax and common fabrics
⚬ Metal: Silk, satin, velvet, nylon and polyester
■ The Order approach
■ Limitations of Unreal Engine shader
■ My approach
⚬ Oren-nayar diffuse shading
⚬ Specular Term
⚬ Fiber Scatter Term
■ Result
Overview
2
Two types of Fabric: Non-Metal
■ Cotton, Denim, Flax and Common fabrics
⚬ Tiny furs on each fibers
⬝ Roughness value of those fabrics is always 1.0 unless they
wet
⬝ Reflect lights to random directions
⬝ It induces not only front scattering but also back scattering
Fuzz on rim part
⚬ Specular lobe is widely spread on view direction surface
⬝ Specular color is white but it is looked like desaturated color
of base one because of front scattering
3
Two types of Fabric: Metal (1)
■ Silk, Satin, Velvet, Nylon and Polyester
⚬ Silk has round triangular cross section and smooth surface
⬝ It induces simiral reflection with metal
⬝ Smooth surface: Reflects lights as perfect as metal surface
⬝ Triangular cross section: Reflects specific light wave
⚬ Silk can have Roughness value around 0.3 - 0.7
⬝ Thickness of each fibers is 5 - 10 μm
⬝ Thin to make smooth surface as metal
4
Two types of Fabric: Metal (2)
■ Special properties of Silk and Satin
⚬ They have much less fuzz on rim part then
cotton or common fabrics
⬝ Their intensive structure makes similar
specluar with metal’s one
⚬ They can have various specular colors
⬝ If they are woven by different colors
strings
⬝ Specular color can be changed by view
direction
⚬ They have anistropic specular shape
5
Two types of Fabric: Metal (3)
■ Special properties of Velvet
⚬ Tiny fibers are attached on the surface
⬝ Its Roughness value has to be 1.0
⬝ If the light is behind, those fibers give foward scattering
and it gives rim light effect on edge part
⚬ Diffuse shading is simiral with metal’s diffusion
⬝ Its surface color is darker than original color of fibers
6
The Order approach1
■ Custom microfiber model
⚬ Ashikhmin’s Distribution based BRDF for fresnel term
⚬ Inverse Gausian for specular term
⚬ No geometry term to improve rim light effect
⚬ Smoother specular than GGX
■ Future works
⚬ Ambient specular
⚬ Modify fresnel term to match with direct light
7
Goal of my approach
■ Shading model for every types of fabrics
⚬ From cotton to velvet
⚬ Easy to use for artists
■ Technical perspective
⚬ Oren-nayar diffusion
⚬ Specular term for fabrics
⚬ 2 colors specular
⚬ Fresnel term which is toward to light direction
8
Limitations of Unreal Engine shader
■ Hard to implement custom shading model
⚬ Diffuse shading: Lambert
⚬ No way to change specular model
■ Base Color slot can be only available slot to input custom shading code, but
⚬ The value is clamped as 0.0 - 1.0
⚬ Range of value is too narrow to use specular light
Fortunately, fabrics do not need strong specular, so its specular can be
implemented to Base Color
9
My approach - Diffuse term (1)
■ Oren-nayar diffuse shading
⚬ Based on Pope Kim’s approximation
⚬ It is not matched with real Oren-nayar shading, but its quality is great, cheap and easy to
implement
■ Removing (n∙l) from the original code
10
1
My approach - Diffuse term (2)
■ Replace (n∙l) to 1.0
■ Output value multiplys Base Color
■ If surface is smooth(Roughness = 0.0), than uses Unreal default diffuse
shading
11
My approach - Specular (1)
(Fresnel Term × Specular) + Fiber Scatter
■ Fresnel Term
⚬ Fuzz on rim part
■ Specular Term
⚬ Customized inverse gausian specular
⚬ For describing back scattering
⚬ Secondary specular lobe
■ Fiber Scatter Term
⚬ For describing front scattering
⚬ Primary specular lobe
12
My approach - Specular (2)
■ Fresnel term
⚬ Based on Schlick Fresnel approximation1
⬝
⚬ Modified 5th power of 1 - cosθd
to 4th power for increasing rim lighting effect
13
My approach - Specular (3)
■ Specular Term
⚬ Based on The Order’s approach
⬝ iverse gausian specular
⚬ Not related with Roughness value, but much simpler equation
⬝ Result is simiral with The Order’s approach when Roughness value is 1.0
⬝ I premise every non-metal fabrics’s roughness value is 1.0
If fabric surface has lower roughness than 1.0, using Unreal default specular term
Primary specular is implemented in Fiber scatter term
⚬ Masking fresnel term and it induces light direction toward rim lighting
14
My approach - Specular (3)
■ Roughness value
⚬ GGX: 0.65
⚬ The Order: 1.0
⚬ My approach: 1.0
15
My approach - Fiber Scatter Term (1)
■ Fiber Scatter Term
⚬ Wrap lighting for front scattering
⬝ Week transmission effect for the eye facing surface
⬝ Can be used as a secondary specular color for metal fabrics such as Silk or stain
⚬ Linear interpolation between two types of fresnel
⬝ First one is wider
⬝ Second one is narrwer
⬝ Blend them by fabric scatter amount value
Can describe from fuzzy cotton to smooth denim
⬝ Fabric scattering color is multiplied to this value
16
My approach - Fiber Scatter Term (2)
■ Wrap lighting
17
My approach - Fiber Scatter Term (3)
■ Linear interpolation between two types of fresnel
18
My approach - Final
19
Result - Fabric scatter amount compare
■ Define which part will use fabric scatter color
⚬ If the value is 0, than rim part will use fabric scatter color
⚬ If the value is getting increased, area of fabric scatter color is getting wider
⚬ If the value is 1.0, most of surface is fabric scatter color and rim part is base color
20
Result - Fabric examples (1)
21
Cotton
Velvet
Result - Fabric examples (2)
■ Hint to make good look fabric material with my approach
⚬ Set Metalic value for ratio of silk fibers in the fabric
⚬ Only Metal fabrics can have lower Roughness value than 1.0
⚬ Do not use Normal map to describe patterns on silk surface
⬝ Using different values of Roughness for pattern and non-pattern part
22
Satin
Recomend values for fabrics
23
Fabric Types Metalic Roughness Fabric Scatter amount
Cotton or ordinary
fabrics
0 1 0.5
Velvat 1 1 0
Silk, Satin 0.8 - 0.9 0.35 - 0.7 1
Bibliography
■ Page 3
⚬ image 1: http://www.apparelsearch.com/fibers.htm
⚬ image 2: http://www.trimfabric.com/nv-97.html
■ Page 4
⚬ image 1: https://www.asahi-kasei.co.jp/fibers/en/cupro/what/function1.html
⚬ image 2: https://quizlet.com/92490419/intro-2-textiles-test-1-flash-cards/
⚬ image 3: https://quizlet.com/92490419/intro-2-textiles-test-1-flash-cards/
■ Page 5
⚬ image 2: https://wallpaperscraft.com/download/silk_material_soft_light_50576/3840x2160
■ Page 6
⚬ image 1: http://www.bloomsburgcarpet.com/resources/weave-structures
⚬ image 2: http://www.textilestock.in/productdetail/47/Fabrics-HomeFurnishingFabrics-Velvet-Velvet-Stock.html
24
Bibliography
■ Page 7
⚬ citation 1: Neubelt, David, Matt Pettineo, and Ready At Dawn Studios. "Crafting a Next-Gen
Material Pipeline for The Order: 1886." part of “Physically Based Shading in Theory and
Practice,” SIGGRAPH (2013).
■ Page 10
⚬ citation 1: http://www.slideshare.net/blindrenderer/rendering-tech-of-space-marinekgc-2011
■ Page 13
⚬ citation 1: Schlick, Christophe. “An inexpensive BRDF Model for Physically-based Rendering.”
Computer graphics forum 1 Aug. 1994: 233-246
25

Weitere ähnliche Inhalte

Was ist angesagt?

김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
devCAT Studio, NEXON
 
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
henjeon
 

Was ist angesagt? (20)

Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리
 
Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
 
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
스크린 스페이스 데칼에 대해 자세히 알아보자(워햄머 40,000: 스페이스 마린)
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space Marine
 
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
 
High dynamic range
High dynamic rangeHigh dynamic range
High dynamic range
 
Taking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next GenerationTaking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next Generation
 
언리얼 엔진 4용 커스텀 천 재질
언리얼 엔진 4용 커스텀 천 재질언리얼 엔진 4용 커스텀 천 재질
언리얼 엔진 4용 커스텀 천 재질
 
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현제노블레이도 2 ray marching을사용한 구름 표현
제노블레이도 2 ray marching을사용한 구름 표현
 
Weighted Blended Order Independent Transparency
Weighted Blended Order Independent TransparencyWeighted Blended Order Independent Transparency
Weighted Blended Order Independent Transparency
 
如何客製化URP渲染流程.pptx
如何客製化URP渲染流程.pptx如何客製化URP渲染流程.pptx
如何客製化URP渲染流程.pptx
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Hair in Tomb Raider
Hair in Tomb RaiderHair in Tomb Raider
Hair in Tomb Raider
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2
 
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다 공개용
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다  공개용물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다  공개용
물리 기반 셰이더의 허와 실:물리기반 셰이더를 가르쳐 봤습니다 공개용
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
 

Andere mochten auch

김병관 성공캠프 SNS팀 자원봉사 후기
김병관 성공캠프 SNS팀 자원봉사 후기김병관 성공캠프 SNS팀 자원봉사 후기
김병관 성공캠프 SNS팀 자원봉사 후기
Harns (Nak-Hyoung) Kim
 
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
Esun Kim
 

Andere mochten auch (20)

[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기
[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기
[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기
 
Behavior Tree in Unreal engine 4
Behavior Tree in Unreal engine 4Behavior Tree in Unreal engine 4
Behavior Tree in Unreal engine 4
 
Re:Zero부터 시작하지 않는 오픈소스 개발
Re:Zero부터 시작하지 않는 오픈소스 개발Re:Zero부터 시작하지 않는 오픈소스 개발
Re:Zero부터 시작하지 않는 오픈소스 개발
 
Developing Success in Mobile with Unreal Engine 4 | David Stelzer
Developing Success in Mobile with Unreal Engine 4 | David StelzerDeveloping Success in Mobile with Unreal Engine 4 | David Stelzer
Developing Success in Mobile with Unreal Engine 4 | David Stelzer
 
PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]
PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]
PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]
 
NDC16 스매싱더배틀 1년간의 개발일지
NDC16 스매싱더배틀 1년간의 개발일지NDC16 스매싱더배틀 1년간의 개발일지
NDC16 스매싱더배틀 1년간의 개발일지
 
레퍼런스만 알면 언리얼 엔진이 제대로 보인다
레퍼런스만 알면 언리얼 엔진이 제대로 보인다레퍼런스만 알면 언리얼 엔진이 제대로 보인다
레퍼런스만 알면 언리얼 엔진이 제대로 보인다
 
Online game server on Akka.NET (NDC2016)
Online game server on Akka.NET (NDC2016)Online game server on Akka.NET (NDC2016)
Online game server on Akka.NET (NDC2016)
 
NDC17 게임 디자이너 커리어 포스트모템: 8년, 3개의 회사, 4개의 게임
NDC17 게임 디자이너 커리어 포스트모템: 8년, 3개의 회사, 4개의 게임NDC17 게임 디자이너 커리어 포스트모템: 8년, 3개의 회사, 4개의 게임
NDC17 게임 디자이너 커리어 포스트모템: 8년, 3개의 회사, 4개의 게임
 
Docker
DockerDocker
Docker
 
8년동안 테라에서 배운 8가지 교훈
8년동안 테라에서 배운 8가지 교훈8년동안 테라에서 배운 8가지 교훈
8년동안 테라에서 배운 8가지 교훈
 
김병관 성공캠프 SNS팀 자원봉사 후기
김병관 성공캠프 SNS팀 자원봉사 후기김병관 성공캠프 SNS팀 자원봉사 후기
김병관 성공캠프 SNS팀 자원봉사 후기
 
Deep learning as_WaveExtractor
Deep learning as_WaveExtractorDeep learning as_WaveExtractor
Deep learning as_WaveExtractor
 
Luigi presentation NYC Data Science
Luigi presentation NYC Data ScienceLuigi presentation NYC Data Science
Luigi presentation NYC Data Science
 
게임회사 취업을 위한 현실적인 전략 3가지
게임회사 취업을 위한 현실적인 전략 3가지게임회사 취업을 위한 현실적인 전략 3가지
게임회사 취업을 위한 현실적인 전략 3가지
 
Profiling - 실시간 대화식 프로파일러
Profiling - 실시간 대화식 프로파일러Profiling - 실시간 대화식 프로파일러
Profiling - 실시간 대화식 프로파일러
 
Approximate nearest neighbor methods and vector models – NYC ML meetup
Approximate nearest neighbor methods and vector models – NYC ML meetupApproximate nearest neighbor methods and vector models – NYC ML meetup
Approximate nearest neighbor methods and vector models – NYC ML meetup
 
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
 
영상 데이터의 처리와 정보의 추출
영상 데이터의 처리와 정보의 추출영상 데이터의 처리와 정보의 추출
영상 데이터의 처리와 정보의 추출
 
버텍스 셰이더로 하는 머리카락 애니메이션
버텍스 셰이더로 하는 머리카락 애니메이션버텍스 셰이더로 하는 머리카락 애니메이션
버텍스 셰이더로 하는 머리카락 애니메이션
 

Ähnlich wie Custom fabric shader for unreal engine 4

Tihomir Dovramadjiev PhD. Blender Tutorial. Various 3D Objects. Mirror Reflec...
Tihomir Dovramadjiev PhD. Blender Tutorial. Various 3D Objects. Mirror Reflec...Tihomir Dovramadjiev PhD. Blender Tutorial. Various 3D Objects. Mirror Reflec...
Tihomir Dovramadjiev PhD. Blender Tutorial. Various 3D Objects. Mirror Reflec...
FIDE Master Tihomir Dovramadjiev PhD
 
Lasers basics mechanism and principles
Lasers basics mechanism and principlesLasers basics mechanism and principles
Lasers basics mechanism and principles
Chaitanya Areti
 

Ähnlich wie Custom fabric shader for unreal engine 4 (7)

A general lens design method, with a photographic lens example
A general lens design method, with a photographic lens exampleA general lens design method, with a photographic lens example
A general lens design method, with a photographic lens example
 
Tihomir Dovramadjiev PhD. Blender Tutorial. Various 3D Objects. Mirror Reflec...
Tihomir Dovramadjiev PhD. Blender Tutorial. Various 3D Objects. Mirror Reflec...Tihomir Dovramadjiev PhD. Blender Tutorial. Various 3D Objects. Mirror Reflec...
Tihomir Dovramadjiev PhD. Blender Tutorial. Various 3D Objects. Mirror Reflec...
 
Shaders & Standard Shader In Unity
Shaders & Standard Shader In UnityShaders & Standard Shader In Unity
Shaders & Standard Shader In Unity
 
Portable Glossmeter Full Technical details and working Principle.
Portable Glossmeter Full Technical details and working Principle.Portable Glossmeter Full Technical details and working Principle.
Portable Glossmeter Full Technical details and working Principle.
 
3 D texturing
 3 D texturing 3 D texturing
3 D texturing
 
Ep notes
Ep notesEp notes
Ep notes
 
Lasers basics mechanism and principles
Lasers basics mechanism and principlesLasers basics mechanism and principles
Lasers basics mechanism and principles
 

Kürzlich hochgeladen

%+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 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
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Kürzlich hochgeladen (20)

WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
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...
 
%+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...
 
%+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...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
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
 
%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
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
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
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
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?
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 

Custom fabric shader for unreal engine 4

  • 1. Custom Fabric Shader for Unreal Engine 4 Gregory Dongseok Kim 2016-04-11
  • 2. ■ Two types of Fabric ⚬ Non-Metal: Cotton, denim, flax and common fabrics ⚬ Metal: Silk, satin, velvet, nylon and polyester ■ The Order approach ■ Limitations of Unreal Engine shader ■ My approach ⚬ Oren-nayar diffuse shading ⚬ Specular Term ⚬ Fiber Scatter Term ■ Result Overview 2
  • 3. Two types of Fabric: Non-Metal ■ Cotton, Denim, Flax and Common fabrics ⚬ Tiny furs on each fibers ⬝ Roughness value of those fabrics is always 1.0 unless they wet ⬝ Reflect lights to random directions ⬝ It induces not only front scattering but also back scattering Fuzz on rim part ⚬ Specular lobe is widely spread on view direction surface ⬝ Specular color is white but it is looked like desaturated color of base one because of front scattering 3
  • 4. Two types of Fabric: Metal (1) ■ Silk, Satin, Velvet, Nylon and Polyester ⚬ Silk has round triangular cross section and smooth surface ⬝ It induces simiral reflection with metal ⬝ Smooth surface: Reflects lights as perfect as metal surface ⬝ Triangular cross section: Reflects specific light wave ⚬ Silk can have Roughness value around 0.3 - 0.7 ⬝ Thickness of each fibers is 5 - 10 μm ⬝ Thin to make smooth surface as metal 4
  • 5. Two types of Fabric: Metal (2) ■ Special properties of Silk and Satin ⚬ They have much less fuzz on rim part then cotton or common fabrics ⬝ Their intensive structure makes similar specluar with metal’s one ⚬ They can have various specular colors ⬝ If they are woven by different colors strings ⬝ Specular color can be changed by view direction ⚬ They have anistropic specular shape 5
  • 6. Two types of Fabric: Metal (3) ■ Special properties of Velvet ⚬ Tiny fibers are attached on the surface ⬝ Its Roughness value has to be 1.0 ⬝ If the light is behind, those fibers give foward scattering and it gives rim light effect on edge part ⚬ Diffuse shading is simiral with metal’s diffusion ⬝ Its surface color is darker than original color of fibers 6
  • 7. The Order approach1 ■ Custom microfiber model ⚬ Ashikhmin’s Distribution based BRDF for fresnel term ⚬ Inverse Gausian for specular term ⚬ No geometry term to improve rim light effect ⚬ Smoother specular than GGX ■ Future works ⚬ Ambient specular ⚬ Modify fresnel term to match with direct light 7
  • 8. Goal of my approach ■ Shading model for every types of fabrics ⚬ From cotton to velvet ⚬ Easy to use for artists ■ Technical perspective ⚬ Oren-nayar diffusion ⚬ Specular term for fabrics ⚬ 2 colors specular ⚬ Fresnel term which is toward to light direction 8
  • 9. Limitations of Unreal Engine shader ■ Hard to implement custom shading model ⚬ Diffuse shading: Lambert ⚬ No way to change specular model ■ Base Color slot can be only available slot to input custom shading code, but ⚬ The value is clamped as 0.0 - 1.0 ⚬ Range of value is too narrow to use specular light Fortunately, fabrics do not need strong specular, so its specular can be implemented to Base Color 9
  • 10. My approach - Diffuse term (1) ■ Oren-nayar diffuse shading ⚬ Based on Pope Kim’s approximation ⚬ It is not matched with real Oren-nayar shading, but its quality is great, cheap and easy to implement ■ Removing (n∙l) from the original code 10 1
  • 11. My approach - Diffuse term (2) ■ Replace (n∙l) to 1.0 ■ Output value multiplys Base Color ■ If surface is smooth(Roughness = 0.0), than uses Unreal default diffuse shading 11
  • 12. My approach - Specular (1) (Fresnel Term × Specular) + Fiber Scatter ■ Fresnel Term ⚬ Fuzz on rim part ■ Specular Term ⚬ Customized inverse gausian specular ⚬ For describing back scattering ⚬ Secondary specular lobe ■ Fiber Scatter Term ⚬ For describing front scattering ⚬ Primary specular lobe 12
  • 13. My approach - Specular (2) ■ Fresnel term ⚬ Based on Schlick Fresnel approximation1 ⬝ ⚬ Modified 5th power of 1 - cosθd to 4th power for increasing rim lighting effect 13
  • 14. My approach - Specular (3) ■ Specular Term ⚬ Based on The Order’s approach ⬝ iverse gausian specular ⚬ Not related with Roughness value, but much simpler equation ⬝ Result is simiral with The Order’s approach when Roughness value is 1.0 ⬝ I premise every non-metal fabrics’s roughness value is 1.0 If fabric surface has lower roughness than 1.0, using Unreal default specular term Primary specular is implemented in Fiber scatter term ⚬ Masking fresnel term and it induces light direction toward rim lighting 14
  • 15. My approach - Specular (3) ■ Roughness value ⚬ GGX: 0.65 ⚬ The Order: 1.0 ⚬ My approach: 1.0 15
  • 16. My approach - Fiber Scatter Term (1) ■ Fiber Scatter Term ⚬ Wrap lighting for front scattering ⬝ Week transmission effect for the eye facing surface ⬝ Can be used as a secondary specular color for metal fabrics such as Silk or stain ⚬ Linear interpolation between two types of fresnel ⬝ First one is wider ⬝ Second one is narrwer ⬝ Blend them by fabric scatter amount value Can describe from fuzzy cotton to smooth denim ⬝ Fabric scattering color is multiplied to this value 16
  • 17. My approach - Fiber Scatter Term (2) ■ Wrap lighting 17
  • 18. My approach - Fiber Scatter Term (3) ■ Linear interpolation between two types of fresnel 18
  • 19. My approach - Final 19
  • 20. Result - Fabric scatter amount compare ■ Define which part will use fabric scatter color ⚬ If the value is 0, than rim part will use fabric scatter color ⚬ If the value is getting increased, area of fabric scatter color is getting wider ⚬ If the value is 1.0, most of surface is fabric scatter color and rim part is base color 20
  • 21. Result - Fabric examples (1) 21 Cotton Velvet
  • 22. Result - Fabric examples (2) ■ Hint to make good look fabric material with my approach ⚬ Set Metalic value for ratio of silk fibers in the fabric ⚬ Only Metal fabrics can have lower Roughness value than 1.0 ⚬ Do not use Normal map to describe patterns on silk surface ⬝ Using different values of Roughness for pattern and non-pattern part 22 Satin
  • 23. Recomend values for fabrics 23 Fabric Types Metalic Roughness Fabric Scatter amount Cotton or ordinary fabrics 0 1 0.5 Velvat 1 1 0 Silk, Satin 0.8 - 0.9 0.35 - 0.7 1
  • 24. Bibliography ■ Page 3 ⚬ image 1: http://www.apparelsearch.com/fibers.htm ⚬ image 2: http://www.trimfabric.com/nv-97.html ■ Page 4 ⚬ image 1: https://www.asahi-kasei.co.jp/fibers/en/cupro/what/function1.html ⚬ image 2: https://quizlet.com/92490419/intro-2-textiles-test-1-flash-cards/ ⚬ image 3: https://quizlet.com/92490419/intro-2-textiles-test-1-flash-cards/ ■ Page 5 ⚬ image 2: https://wallpaperscraft.com/download/silk_material_soft_light_50576/3840x2160 ■ Page 6 ⚬ image 1: http://www.bloomsburgcarpet.com/resources/weave-structures ⚬ image 2: http://www.textilestock.in/productdetail/47/Fabrics-HomeFurnishingFabrics-Velvet-Velvet-Stock.html 24
  • 25. Bibliography ■ Page 7 ⚬ citation 1: Neubelt, David, Matt Pettineo, and Ready At Dawn Studios. "Crafting a Next-Gen Material Pipeline for The Order: 1886." part of “Physically Based Shading in Theory and Practice,” SIGGRAPH (2013). ■ Page 10 ⚬ citation 1: http://www.slideshare.net/blindrenderer/rendering-tech-of-space-marinekgc-2011 ■ Page 13 ⚬ citation 1: Schlick, Christophe. “An inexpensive BRDF Model for Physically-based Rendering.” Computer graphics forum 1 Aug. 1994: 233-246 25