590 likes | 722 Views
Come and hear Beyond the Soft Train by Geoff’s younger and better looking brother, Brian. Can I watch the America’s Cup instead?. Overview. Introduction to Implicit Surfaces Blending, Warping, CSG Some Problems The BlobTree Blending Using fields Glowing Objects and Lightning
E N D
Come and hear Beyond the Soft Train by Geoff’s younger and better looking brother, Brian Can I watch the America’s Cup instead?
Overview • Introduction to Implicit Surfaces • Blending, Warping, CSG • Some Problems • The BlobTree • Blending • Using fields • Glowing Objects and Lightning • Textures • Soft Shadows • Python Interface, live demos
Introduction to Implicit Surfaces Implicit Definition f(x,y) = x2+ y2- r2= 0 e.g. r = 1 f(0,0) = 0 + 0 - 1 < 0 inside f(0,0) = 1 + 1 - 1 > 0 outside implies search space to find x,y to satisfy: f(x,y) = 0 iso-surface: f(x,y) - c = 0 • Parametric Definition • x = r sin(a) • y = r cos(a) • 0 c a c 2p
The Geoff Function Blend Proximity Blending: Add contributions from generating skeletal elements in the neighbourhood Field Function
Blending and The Soft Train Polygonizer Info. Warp Info.
+ + - Constructive Solid Geometry (CSG) Primitives are combined using boolean set operations: Union, Intersection, Difference. Each primitive represents a half space, ie the set of points defining the half space E.g. - - - + - Sphere Cylinder Plane Boolean expression (u= union, d= difference, i= intersection) d( sphere, cylinder) u( sphere, i( i( cylinder, plane1), plane2) ) The cylinder is infinite in extent it is first intersected with two half space planes.
CSG Tree CSG Implementation Boolean Expressions are usually represented as a binary tree.
CSG Intersection Value • Boolean Operations • Union and intersection of primitives, A and B may be • respectively defined as a composition of the field • values, FA , FB • FA FB = max(FA, FB) • FA FB = min(FA, FB) • Difference use -min (FA, FB) • (- in this case inverts inside and outside )
Polygonization Problems X is the true intersection point for C1 and C2 Segment P1 P2 is far from x. Estimate for x s. t. f1 (x) = f2 (x) = 0 We can apply a first order Taylor expansion to the difference : n12 = x - P12 0 = f1(x) = f1 (P12 + n12) = f1(P12) + (n12 , tf1( P12 )) 0 = f2(x) = f2 (P12 + n12) = f2(P12) + (n12, tf2( P12 ))
Iterating to the Surface l1 = so n1 = and similarly n2 = - f1 ( tf1, tf1) - f1tf1 ( tf1, tf1) - f2tf2 ( tf2, tf2)
CSoftG Wheels Csoft Wheel before and after removal of artifacts
Ray Traced Canmore Coffee Grinder by Kees van Overveld and Brian Wyvill
Building the Piano Parametric Bounding Curve Cylinders intersected with bounding plane and parametric curve
Model of 9ft. Steinway Concert Grand Plant by Dr. Prusinkiwicz
Blending to Intersection Planes With this scheme a gang cannot be blended here Solution Blend becomes a node in the CSG tree known as the BlobTree
Traversing The BlobTree • N - indicates a node in the BlobTree • L (N ) - left child R (N ) - right child • function F returns the field value for the node N at the point M • function F(N, M) • 1. Primitive: F( M) • 2. Warp: F( L (N ) , w( M)) (warp is a unary operator) • 3. Blend: F( L (N ) , M)+ F( R (N ) , M)) • 4. Union: max( F( L (N ) , M), F( R (N ) , M)) • 5. Intersection: min( F( L (N ) , M), F( R (N ) , M)) • 6. Difference: min( F( L (N ) , M), -F( R (N ) , M)) • end
BlobTree Examples Candle Stick Model by Eric Galin Stamingo by Andy Guy
Unwanted Blending Problem Global Blending Controlled Blending
A B C D E Controlled Blending Blending Group f(P)=max(f(A)+f(B), f(B)+f(C), f(C)+f(D), f(E)+f(F))
Problems with Controlled Blending 1. The Blend Graph (part of the BlobTree) 2. Critical Points (e.g. saddle points Zero Gradient) Union blend blend A B C
Fields for Graphics • Using Fields for • Glowing Objects and Lightning • Texture Mapping • Soft Shadows
Glowing Objects To make surfaceglow between: {P : F(P)=0.5} and {P : F(P)=0.0} Find Pi along path of ray nearest to each primitive. For each Pi find the implicit value: Vi = Fi(Pi) Vmax is used in the lighting calculation.
2D Texture Mapping Applying and controlling texture on surfaces is widely used for visual impact. Texturing Parametric Patches map image using (s,t) parameters for patch. Parametric mappings from F(P)=0 are not obvious.
Particle Mapping Find intersection of particle with some texture space. Trajectory is a function of the gradient:ÑF(x,y,z)
Particle Texturing (Zonenschein et al) Trajectory is :ÑF(x,y,z) d2x/dt2 + gdx/dt + ÑF = 0 g is viscosity constant problems : user specifies parametric surface trajectory is arbitrary gradient field cannot be discontinuous in direction
Trajectory Calculation Linear combination of attraction vector A and repulsion vector B.
Texturing the BlobTree Blending Warping
Blending Texture Colours Compute separate texture space coordinates for each child node and blend associated colours.
Blending Texture Spaces Blend the child texture spaces and compute a single texture coordinate.
Warping Warped space warps the gradient, trajectories follow the warped space.
CSG Discontinuity in the gradient at CSG junctions. Causes vastly different texture space coordinates for similar object space coordinates.
CSG Solution: separate gradient and R (repulsion vector).
CSG New:
Ray Traced Shadows Ray Traced Images Sphere with hard shadow point sampling source Sphere with soft shadow sampling wide light source