Download presentation
Presentation is loading. Please wait.
Published byCornelius Bostock Modified over 9 years ago
1
1 January 21, 2008 Bill Licea-Kane Texture Images Procedural Textures – Simple half-space – Derivatives – Combining half-spaces (Toy Ball) – Procedural motion blur (Advanced Toy Ball) – Baking procedural textures Texture Images
2
2 January 21, 2008 Texture Images
3
3 January 21, 2008 Texture Images
4
4 January 21, 2008 Simple half-space
5
5 January 21, 2008 Half-spaces Joseph Albers, Circle 1933 Structural Constellation, Transformation of a Scheme No.12, 1950 Poèast kvadratu, 1970
6
6 January 21, 2008 Half-space – background x y P d = +1x + 0y
7
7 January 21, 2008 Half-space – background x y P d = -1x + 0y
8
8 January 21, 2008 Half-space – background x y P d = -1x + 0y + 3
9
9 January 21, 2008 Half-space – background x y P d = +1x + 0y - 3
10
10 January 21, 2008 Half-space – background x y P d = +0x + 1y - 1
11
11 January 21, 2008 Half-space – background x y P d = +.707x +.707y
12
12 January 21, 2008 Half-space – background x y P d = +.707x +.707y –1.0
13
13 January 21, 2008 Half-space – vector calculus Generalizing: d = Ax + By + Cz + D // when d is > 0.0, P is IN // Note – it’s useful to have this in // a normalized form, where // length( vec3( A,B,C ) ) is 1.0. const vec4 HS = vec4( A,B,C,D ); d = dot( HS, vec4( P.xyz, 1.0 ) );
14
14 January 21, 2008 Half-space – intersecting a sphere
15
15 January 21, 2008 Half-space shader - globals
16
16 January 21, 2008 Half-space shader – functions and main
17
17 January 21, 2008 Half-space shader - shadeSurface
18
18 January 21, 2008 Half-space shader - lightSurface
19
19 January 21, 2008 Derivatives
20
20 January 21, 2008 Derivatives – why? float inorout = step( 0.0, d ); Just like texture images, we need to estimate the footprint of the pixel. We can do this with derivatives and smoothstep. – dFdx( P ); – dFdy( P ); – fwidth( P ); float inorout = smoothstep( -f, +f, d );
21
21 January 21, 2008 step versus smoothstep
22
22 January 21, 2008 Half-space – with derivative, smoothstep
23
23 January 21, 2008 Combining half-spaces
24
24 January 21, 2008 Star George Lucas, Star Wars: Episode V - The Empire Strikes Back, 1980 John Lasseter, Luxo Jr, 1986
25
25 January 21, 2008 Toyball shader - battleplan
26
26 January 21, 2008 Royball shader - globals
27
27 January 21, 2008 Toyball shader – functions and main
28
28 January 21, 2008 Toyball shader – shadeSurface…
29
29 January 21, 2008 Toyball shader – …shadeSurface
30
30 January 21, 2008 Toyball shader - lightSurface
31
31 January 21, 2008 Procedural Motion Blur
32
32 January 21, 2008 Rotating half-spaces – x-axis x y
33
33 January 21, 2008 Rotating half-spaces – z-axis x y
34
34 January 21, 2008 Rotating half-spaces – vector calculus Observation: // Both are normalized form const vec4 HS = vec4( A,B,C,D ); const vec4 RotAxis = vec3 ( X,Y,Z ); blur = 1.0 – abs( dot( HS.xyz, RotAxis ) );
35
35 January 21, 2008 Baking Procedural Textures
36
36 January 21, 2008 Baking Procedural Textures
37
37 January 21, 2008 Textures Images
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.