Upload
carrotcg
View
508
Download
2
Embed Size (px)
DESCRIPTION
Citation preview
Texturering & Modelinga Procedual Approach
김정근
Chapter 2
Building Procedural Textures
3
Agenda
PROCEDURAL PATTERN GENERATION
– Example: Brick Texture
– Example: Bump Mapped Brick
– Example: Procedural Star Texture
– Spectral Synthesis
– What Now?
Building Procedural Textures
5
Example: Brick Texture
6
Example: Brick Texture
Brick Shader Concept
7
Example: Brick Texture
w t
8
Example: Brick Texture
ss
9
Example: Brick Texture
w t
10
Example: Brick Texture
w t
11
Example: Brick Texture
a = w * h
Input.Pos.x * 2
Input.Pos.y * 4
12
Example: Brick Texture
13
Example: Bump-Mapped Brick
범프맵핑은 표면이 bumps or indentation 을 가지고 모양을 주는 surface normal vector 을 수정하는 것과 관련
Blinn(1978) 범프맵핑을 소개할 때 Normal Vector N 이 시뮬레이션 하는 것을 따라 Bump 의 height F( u, v) 를 어떻게 처리하는지를 설명
Normal Vector 를 섭동 ( 攝動 , perturbation) 시켜 픽셀마다 조명계산을 하게 해서 기복이 있는 것처럼 보이게 한다 .– Perturbation Vector D– N′= N + D
Perturbation Vector D 는 Surface 의 Tangent Plane 에 놓여져 있으며 N 의 수직이다 .
14
Example: Bump-Mapped Brick
D 는 분리된 perturbation vectors U 와 V 가 합쳐진 것을 기반으로 함
P 의 편도함수에 수직이며 V 와 관련된 Surface Position
편도함수∂ F/∂u 는 U 디렉션의 Bump 함수의 경사를 준다
탄젠트 평면에 놓여진 Surface 매개 변수 V 와 같은 P 의 변화가 증가되는 방향을 나타냄
15
Example: Bump-Mapped Brick
Bump / displacement mapping
16
Example: Bump-Mapped Brick
stbump
17
Example: Bump-Mapped Brick
18
Example: Bump-Mapped Brick
19
Example: Procedural Star Texture
Star Shader Concept
20
Example: Procedural Star Texture
21
Example: Procedural Star Texture
22
Example: Procedural Star Texture
23
Spectral Synthesis
Gardner (1984, 1985) 는 절차적 방법은 단순히 서로 다른 주파수 amplitudes 및 단계의 sinu-
soidal 구성 요소 기능의 조합을 사용하여 매우 복잡하고 자연스러운 질감을 생성할 수 있는 것을 보여줌
Fourier transform– Amplitude 과 Sinusoidal waves 의 일련의 단계로 대표되는 주파수
– 음성 등의 파형을 기본 주파수 ( 기본음 ) 와 그 정배수의 각 주파수 ( 각 배음 ) 로 분해하는 것 . 간단하게 말하면 어떤 파 ( 波 )
중에서 어느 주파수 성분이 얼마만큼 포함되어 있는지를 계산하는 방법
Inverse Fourier transform– 환 주파수 영역의 함수를 시간 영역의 함수로 변환하는 것
Fast Fourier transform
– 삼각함수의 기본성질을 조합하여 효율적으로 푸리에 변환을 하는 것
24
Example: Procedural Cloud Texture
25
Example: Procedural Cloud Texture
각각 다른 frequency, amplitude, phase 를 가진 코사인 함수
Gadner 의 기법 : X 단계는 앞의 Y 구성 요소의 가치에 따라 달라진다– Texture 에 regular patterns 을 피하기 위해서
Natural textures 는 정확하게 반복하는 periodic patterns 을 가지지 않는다
Spectral synthesis 는 잠재적인 규칙 (underlying regularity) 및 주기성(periodicity) 을 숨기기 위해 복잡성 (complexity) 에 의존한다
정기적인 패턴을 방지하기 위한 매직넘버 가 있다
Fourier spectral synthesis 은 언제나 주기적으로 함수를 생성 그러나 기간의 주기성은 눈에 띄지 않게 아주 길게 만들 수 있다 .
26
Example: Procedural Cloud Texture
Q & A
감사합니다