SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
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

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 RenderingElectronic Arts / DICE
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리changehee lee
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallGuerrilla
 
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意UnityTechnologiesJapan002
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbiteElectronic Arts / DICE
 
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 2016Graham Wihlidal
 
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1Ki Hyunwoo
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2Guerrilla
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonAMD Developer Central
 
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 GenerationGuerrilla
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3guest11b095
 
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunFive Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunElectronic Arts / DICE
 
[NDC19] 모바일에서 사용가능한 유니티 커스텀 섭스턴스 PBR 셰이더 만들기
[NDC19] 모바일에서 사용가능한 유니티 커스텀 섭스턴스 PBR 셰이더 만들기[NDC19] 모바일에서 사용가능한 유니티 커스텀 섭스턴스 PBR 셰이더 만들기
[NDC19] 모바일에서 사용가능한 유니티 커스텀 섭스턴스 PBR 셰이더 만들기Madumpa Park
 
GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsGDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsColin Barré-Brisebois
 
Decima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnDecima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnGuerrilla
 

Tendances (20)

Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow Fall
 
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in Frostbite
 
Hair in Tomb Raider
Hair in Tomb RaiderHair in Tomb Raider
Hair in Tomb Raider
 
Relic's FX System
Relic's FX SystemRelic's FX System
Relic's FX System
 
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
 
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
 
The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2The Rendering Technology of Killzone 2
The Rendering Technology of Killzone 2
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Ndc11 이창희_hdr
Ndc11 이창희_hdrNdc11 이창희_hdr
Ndc11 이창희_hdr
 
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
 
Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3Shiny PC Graphics in Battlefield 3
Shiny PC Graphics in Battlefield 3
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunFive Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
 
[NDC19] 모바일에서 사용가능한 유니티 커스텀 섭스턴스 PBR 셰이더 만들기
[NDC19] 모바일에서 사용가능한 유니티 커스텀 섭스턴스 PBR 셰이더 만들기[NDC19] 모바일에서 사용가능한 유니티 커스텀 섭스턴스 PBR 셰이더 만들기
[NDC19] 모바일에서 사용가능한 유니티 커스텀 섭스턴스 PBR 셰이더 만들기
 
GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham OriginsGDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
GDC 2014 - Deformable Snow Rendering in Batman: Arkham Origins
 
Decima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero DawnDecima Engine: Visibility in Horizon Zero Dawn
Decima Engine: Visibility in Horizon Zero Dawn
 

En vedette

[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기
[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기
[야생의 땅: 듀랑고] 지형 관리 완전 자동화 - 생생한 AWS와 Docker 체험기Sumin Byeon
 
Behavior Tree in Unreal engine 4
Behavior Tree in Unreal engine 4Behavior Tree in Unreal engine 4
Behavior Tree in Unreal engine 4Huey Park
 
Re:Zero부터 시작하지 않는 오픈소스 개발
Re:Zero부터 시작하지 않는 오픈소스 개발Re:Zero부터 시작하지 않는 오픈소스 개발
Re:Zero부터 시작하지 않는 오픈소스 개발Chris Ohk
 
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 StelzerJessica Tams
 
PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]
PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]
PyCon 2017 프로그래머가 이사하는 법 2 [천원경매]Sumin Byeon
 
NDC16 스매싱더배틀 1년간의 개발일지
NDC16 스매싱더배틀 1년간의 개발일지NDC16 스매싱더배틀 1년간의 개발일지
NDC16 스매싱더배틀 1년간의 개발일지Daehoon Han
 
레퍼런스만 알면 언리얼 엔진이 제대로 보인다
레퍼런스만 알면 언리얼 엔진이 제대로 보인다레퍼런스만 알면 언리얼 엔진이 제대로 보인다
레퍼런스만 알면 언리얼 엔진이 제대로 보인다Lee Dustin
 
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)Esun Kim
 
NDC17 게임 디자이너 커리어 포스트모템: 8년, 3개의 회사, 4개의 게임
NDC17 게임 디자이너 커리어 포스트모템: 8년, 3개의 회사, 4개의 게임NDC17 게임 디자이너 커리어 포스트모템: 8년, 3개의 회사, 4개의 게임
NDC17 게임 디자이너 커리어 포스트모템: 8년, 3개의 회사, 4개의 게임Imseong Kang
 
8년동안 테라에서 배운 8가지 교훈
8년동안 테라에서 배운 8가지 교훈8년동안 테라에서 배운 8가지 교훈
8년동안 테라에서 배운 8가지 교훈Harns (Nak-Hyoung) Kim
 
김병관 성공캠프 SNS팀 자원봉사 후기
김병관 성공캠프 SNS팀 자원봉사 후기김병관 성공캠프 SNS팀 자원봉사 후기
김병관 성공캠프 SNS팀 자원봉사 후기Harns (Nak-Hyoung) Kim
 
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 ScienceErik Bernhardsson
 
게임회사 취업을 위한 현실적인 전략 3가지
게임회사 취업을 위한 현실적인 전략 3가지게임회사 취업을 위한 현실적인 전략 3가지
게임회사 취업을 위한 현실적인 전략 3가지Harns (Nak-Hyoung) Kim
 
Profiling - 실시간 대화식 프로파일러
Profiling - 실시간 대화식 프로파일러Profiling - 실시간 대화식 프로파일러
Profiling - 실시간 대화식 프로파일러Heungsub Lee
 
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 meetupErik Bernhardsson
 
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012
자동화된 소스 분석, 처리, 검증을 통한 소스의 불필요한 #if - #endif 제거하기 NDC2012Esun Kim
 
영상 데이터의 처리와 정보의 추출
영상 데이터의 처리와 정보의 추출영상 데이터의 처리와 정보의 추출
영상 데이터의 처리와 정보의 추출동윤 이
 
버텍스 셰이더로 하는 머리카락 애니메이션
버텍스 셰이더로 하는 머리카락 애니메이션버텍스 셰이더로 하는 머리카락 애니메이션
버텍스 셰이더로 하는 머리카락 애니메이션동석 김
 

En vedette (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
 
영상 데이터의 처리와 정보의 추출
영상 데이터의 처리와 정보의 추출영상 데이터의 처리와 정보의 추출
영상 데이터의 처리와 정보의 추출
 
버텍스 셰이더로 하는 머리카락 애니메이션
버텍스 셰이더로 하는 머리카락 애니메이션버텍스 셰이더로 하는 머리카락 애니메이션
버텍스 셰이더로 하는 머리카락 애니메이션
 

Similaire à Custom fabric shader for unreal engine 4

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 exampleDave Shafer
 
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
 
Shaders & Standard Shader In Unity
Shaders & Standard Shader In UnityShaders & Standard Shader In Unity
Shaders & Standard Shader In UnityEhsan Ehrari
 
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.Yogesh Pandey
 
Lasers basics mechanism and principles
Lasers basics mechanism and principlesLasers basics mechanism and principles
Lasers basics mechanism and principlesChaitanya Areti
 

Similaire à 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
 

Dernier

What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 

Dernier (20)

What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 

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