170 likes | 290 Vues
This paper by S. J. Kim introduces a novel method for developing efficient, naturalistic textures using the Pixel Stream Editing Language (PSE). It emphasizes the use of simple algorithms to create convincing detail in textures while allowing for independence between shape and texture. Through interactive editing and the application of noise functions, solid materials are simulated alongside various surface appearances like marble, fire, water, clouds, and bubbles. This approach significantly optimizes texture mapping by enabling dynamic adjustments to textures based on shape modifications.
E N D
An Image Synthesizer GMR Lab 2003. 11. 11 S. J. Kim
Introduction • A motive • Out of some experiments into developing efficient naturalistic looking textures. A Pixel Stream Editing Language (PSE) • Use PSE • Some rather convincing naturalistic detail with surprisingly simple • Efficient algorithms.
A Pixel Stream Editing Language • A Pixel Stream Editor (PSE) • Simply a filter Input image Output image Convert At every pixel • Supported all of the familiar programming constructs • All operators will work on scalars or vectors
Interactive design cycle • Edit PSE program • Run it on a low resolution image • View the results on a color monitor
Space Functions and Solid Texture • The domain is entirety of (x, y, z) space : “space function” • Any space function Solid material • Solid Texture – the object out of the material (“ sculpted”) • This approach has several advantages over texture mapping: • Shape and texture become independent. The texture does not need to be “fit” onto the surface. If we change the shape or carve a piece out of it, the appearance of the solid material will accurately change. • As with all procedural textures, the database is extremely small.
Noise ( ) • A scalar valued function (takes a three dimensional vector) • Properties: • Statistical invariance under rotation • A narrow bandpass limit in frequency • Statistical invariance under translation • A good texture modeling primitive –> create surfaces (with desired stochastic characteristics at different visual scales)
Integer lattice • Consider the set of all points in space whose x, y, and z coordinates are all integer valued • If [x, y, z] is on the integer lattice, we define Noise([x, y, z]) = d[x, y, z].
By evaluating Noise() at visible surface points of simulated objects – create a simple “random” surface texture color = white * Noise(point) To map different ranges of values into different colors color = Colorful( Noise(k *point))
Dnoise( ) • The vector valued differential of the Noise() signal • Defined by the instantaneous rate of change of Noise() along the x, y, and z directions, respectively A simple way of specifying normal perturbation normal += Dnoise(point)
By using functions of Noise() to control the amount of Dnoise() perturbation -> simulate various types of surface Use these in turn to design other types of surface
f = 1 while f < pixel_freq nomal += Dnoise(f * point) f *= 2
Marble – An Example of a Solid Texture • Use Noise() to create function turbulence() • Use turbulence() to simulate the appearance of marble function boring_marble(point) x = point[1] return marble_color(sin(x)) function marble(point) x = point[1] + turbulence(point) return marble_color(sin(x))
Fire • Using turbulence( ) • Ex) a solar corona • norm() scalar length of a vector • direction() the (unit length) direction of a vector • frame global time variable • Modeled as a smooth flow smooth_corona(point-center) function smooth_corona(v) radius = norm(v) return color_of_emission(radius) function corona(v) radius = norm(v) dr = turbulence(v) return color_of_corona(radius + dr) Function moving_corona(v) radius = norm(v) dr = turbulence(v – frame * direction(v)) return color_of_corona(radius + dr)
Water • Create the appearance of waves on a surface • Linear wave front • Deficiency – a self-replicating pattern • Use spherical wave fronts eminating from point source centers normal += wave(point-center) function wave(v) return direction(v) * cycloid(norm(v)) function makewaces(n) for i in [1 .. n] center[i] = direction(Dnoise(i*[100 0 0])) return center if begin_frame center = makewaves(20) for c in center normal += wave(point – c)
Assign a random frequency f to each center -> the last of the procedure then becomes: normal += wave((point - c) * f) / f function moving_wave(v, Dphase) return direction(v) * cycloid(norm(v) – frmae * Dphase)
Other Examples – Clouds and Bubbles • Using the PSE • Clouds • Created by composing a color spline function with turbulence() • The reflection and refraction from the bubble • Using simple vector valued functions to modify an incoming direction vector • The appearance of variable bubble thickness • Simulated by multiplying turbulence() Color *= 1 + sin([rfreq gfreq bfreq] * turbulence(point))