## [Algorithms] TeamCRS - Procedural Noise

 [Algorithms] TeamCRS - Procedural Noise From: Don Gunter - 2007-03-02 19:15:22 Attachments: Message as HTML ```HI, Does anybody have any references on procedural noise/textures generation? Specifically, something that looks similar to wood grain? I tried using a 3D texture and giving the "board" an member ID indicating "slice" as the Z but it uses way to much memory for my taste. I really don't know what I'm looking for, but could really use a pointer. I remember an article in one of the GPU gems using a method of guided deterministic generation of ground clutter and am hoping there is something similar for wood and stone "grain"? Regards, Don Gunter ```

 [Algorithms] TeamCRS - Procedural Noise From: Don Gunter - 2007-03-02 19:15:22 Attachments: Message as HTML ```HI, Does anybody have any references on procedural noise/textures generation? Specifically, something that looks similar to wood grain? I tried using a 3D texture and giving the "board" an member ID indicating "slice" as the Z but it uses way to much memory for my taste. I really don't know what I'm looking for, but could really use a pointer. I remember an article in one of the GPU gems using a method of guided deterministic generation of ground clutter and am hoping there is something similar for wood and stone "grain"? Regards, Don Gunter ```
 Re: [Algorithms] TeamCRS - Procedural Noise From: Jon Watte - 2007-03-03 01:19:24 ```First, look up Ken Perlin's original papers on procedural texturing. Second, try some of the material libraries for the POV-Ray ray tracer, or for Renderman -- they can be converted to shaders. Third, here's one simple way to do it: 1) Decide on a major direction for grain (a vector). Make this vector longer for a tighter grain. 2) Dot product the 3D position of the shaded fragment with the vector, and take the fraction. 3) Map this fraction to a color between faded yellow and brown; either using lerp, or (prettier) using a texture look-up. This gives you the basic ring structure. 4) Now, take your 3D position, and feed it into your favorite 3D noise function (Perlin or something else). 5) Map the noise function to a ramp between transparent, and a grayish brown. Overlayed on the ring structure, this gives you the grain. Easy Improvements: - Make the position passet into the dot product be affected by a turbulence function, for non-uniform grain - Make the grain function be distance from a ray, instead of dot product, for circular rings - Stretch the grain noise about 3x in a direction that is perpendicular to the dot vector (or the direction of the ray, for circular rings) Cheers, / h+ Don Gunter wrote: > > HI, > > Does anybody have any references on procedural noise/textures > generation? Specifically, something that looks similar to wood grain? > > I tried using a 3D texture and giving the “board” an member ID > indicating “slice” as the Z but it uses way to much memory for my > taste. I really don’t know what I’m looking for, but could really use > a pointer. > > I remember an article in one of the GPU gems using a method of guided > deterministic generation of ground clutter and am hoping there is > something similar for wood and stone “grain”? > ```