Bill LiceaKane Texture Images Procedural Textures Simple halfspace
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 1 January 21, 2008
Texture Images 2 January 21, 2008
Texture Images 3 January 21, 2008
Simple half-space 4 January 21, 2008
Half-spaces Joseph Albers, Circle 1933 Structural Constellation, Transformation of a Scheme No. 12, 1950 Poèast kvadratu, 1970 5 January 21, 2008
Half-space – background y P d = +1 x + 0 y 6 January 21, 2008 x
Half-space – background y P d = -1 x + 0 y 7 January 21, 2008 x
Half-space – background y P d = -1 x + 0 y + 3 8 January 21, 2008 x
Half-space – background y P d = +1 x + 0 y - 3 9 January 21, 2008 x
Half-space – background y d = +0 x + 1 y - 1 P x 10 January 21, 2008
Half-space – background y P d = +. 707 x +. 707 y x 11 January 21, 2008
Half-space – background y P d = +. 707 x +. 707 y – 1. 0 x 12 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( vec 3( A, B, C ) ) is 1. 0. const vec 4 HS = vec 4( A, B, C, D ); d = dot( HS, vec 4( P. xyz, 1. 0 ) ); 13 January 21, 2008
Half-space – intersecting a sphere 14 January 21, 2008
Half-space shader - globals 15 January 21, 2008
Half-space shader – functions and main 16 January 21, 2008
Half-space shader - shade. Surface 17 January 21, 2008
Half-space shader - light. Surface 18 January 21, 2008
Derivatives 19 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. – d. Fdx( P ); – d. Fdy( P ); – fwidth( P ); float inorout = smoothstep( -f, +f, d ); 20 January 21, 2008
step versus smoothstep 21 January 21, 2008
Half-space – with derivative, smoothstep 22 January 21, 2008
Combining half-spaces 23 January 21, 2008
Star George Lucas, Star Wars: Episode V - The Empire Strikes Back, 1980 John Lasseter, Luxo Jr, 1986 24 January 21, 2008
Toyball shader - battleplan 25 January 21, 2008
Royball shader - globals 26 January 21, 2008
Toyball shader – functions and main 27 January 21, 2008
Toyball shader – shade. Surface… 28 January 21, 2008
Toyball shader – …shade. Surface 29 January 21, 2008
Toyball shader - light. Surface 30 January 21, 2008
Procedural Motion Blur 31 January 21, 2008
Rotating half-spaces – x-axis y x 32 January 21, 2008
Rotating half-spaces – z-axis y x 33 January 21, 2008
Rotating half-spaces – vector calculus Observation: // Both are normalized form const vec 4 HS = vec 4( A, B, C, D ); const vec 4 Rot. Axis = vec 3 ( X, Y, Z ); blur = 1. 0 – abs( dot( HS. xyz, Rot. Axis 34 January 21, 2008 ) );
Baking Procedural Textures 35 January 21, 2008
Baking Procedural Textures 36 January 21, 2008
Textures Images 37 January 21, 2008
- Slides: 37