PROCEDURAL TEXTURES
-
-
SOLID TEXTURES
--
[Peachey'85], [Perlin'85], [Perlin'89]
--
Some visual objects have no obvious surfaces!!
--
We cannot scan 3-D textures in!
--
These are difficult to generate in general.
--
Even if we could, it is expensive to store them.
--
Achievable effects:
marble, hair, fur, fire, glass, fluid flow, erosion, etc.
-
-
HOW TO CREATE WOOD
--
Create a 1-Dim texture
GLfloat tex[s] = { 1.0, 1.0, 0.0, 0.0, 0.0, 0.0};
|
---|
--
Create a 2-Dim texture
Tex(s,t) = tex( \sqrt{s^2 + t^2});
|
---|
--
Create a 3-Dim texture
-
-
We can generate a 2-dimensional texture map
from TEX(s,t,r), to be used in OpenGL functions.
--
We should allow ourselves some arbitrary
transformation of the (s,t,r) parameters.
-
-
MORE REALISM:
Tex(s,t) = tex(
\sqrt{s^2 + t^2} +
d_1 \sin (c_1 \arctan(s/t)) +
d_2 \sin (c_2 \arctan(s/t)) )
|
---|
where c_1 << c_2, and d_i are small.
TEX(s,t,r) = Tex(s + e_1 \sin(f_1 r),
t + e_2 \sin( f_2 r + g) )
|
---|
where e_i, f_i are small, and g arbitrary.
-
-
SOLID NOISE
--
DESIRED PROPERTIES of NOISE(s,t,r)
- Statistical invariance under rigid transformation
(-- so appearance is invariant under motions)
- Narrow bandpass limit
(-- so we can sample the noise function
without alias effects)
-
-
TURBULENCE
--
This is the basis for many other effects
--
E.g., we can add noise to TEX(s,t,r).
--
An implementation of Perlin's turbulence
--
The implementation computes, for a position p in Euclidean space
(of any dimension):
turbulence(p) = \sum_{i=0}^k
| noise(2^i. p) / 2^i |.
|
---|
--
Note: the term noise(2p)/2
is varying twice as fast as noise(p)
but has half the amplitude. This is typical
of fractal-like objects.
-
-