POV-Ray : Newsgroups : povray.binaries.images : Wood grain : Wood grain Server Time
25 Apr 2024 03:24:46 EDT (-0400)
  Wood grain  
From: Chris R
Date: 28 Apr 2023 13:50:00
Message: <web.644c0643f7029a0993c0941a5cc1b6e@news.povray.org>
Maybe this is an obvious trick to some of the veterans here, but I thought it
was an interesting way to get good color maps for wood, so here it goes.

I was working on some wood flooring for a scene and found a site called
wood-database.com that has images and information on lots of different types of
wood, including images of lumber made from the types of wood.

I downloaded an image of the wood I wanted to replicate in my scene, (the lower
left inset in the image below), and imported it into GIMP.  In the Colors/Info
menu there is a "Smooth Palette" option that creates a palette of the colors in
the image, (seen to the right of the inset).  I exported that as a JPEG and then
used some macros I created to pull out the POV-ray colors from the image.  I
have used both interpolation and non-interpolation for different effects.  I
then use those colors, in the order given, to create the color map for the wood
texture.

Coming up with the wood pigment and warps is still mostly trial and error, but
the sample is actually pretty close.

The three boards are rendered using variations on the color map.  The center one
is non-translated and unaltered.  The right has been lightened, and the grain
was selected randomly from a normal-sized pine tree.  The left was grayed by
aging, and also randomly selected.

In this particular example, I only sampled the colors from a single ring of the
wood pattern.  For others, the colors vary across rings, so it works better to
use all of the colors in the color map, but scale the pigment so the ring sizes
stay the same.

Anyway, I'm finding this is a lot easier than my usual hit or miss method of
creating a wood colormap, and allows for greater variation in the colors, which
enhances realism.


-- Chris R.


Post a reply to this message


Attachments:
Download 'woodgrains.jpg' (357 KB)

Preview of image 'woodgrains.jpg'
woodgrains.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.