POV-Ray : Newsgroups : povray.binaries.images : Wood & Heightfield Server Time
4 Oct 2024 11:20:38 EDT (-0400)
  Wood & Heightfield (Message 1 to 5 of 5)  
From: Thomas Lake
Subject: Wood & Heightfield
Date: 8 Apr 1999 03:14:30
Message: <370C4A62.DE542FBF@home.com>
I remember a couple of people's posts to my images mentioning that a
better way to make a flat wood surface is to use a height_field with
matching wood texture. How exactly do you go about doing this? Would you
place the height_field just above the surface of the wooden object?
Would you use a wood texture created by pov as the bit map for the
height_field?


Post a reply to this message

From: Jan Schäfer
Subject: Re: Wood & Heightfield
Date: 8 Apr 1999 04:56:46
Message: <370C6143.69CBACBE@imise.uni-leipzig.de>
Hello,

Thomas Lake wrote:
> 
> I remember a couple of people's posts to my images mentioning that a
> better way to make a flat wood surface is to use a height_field with
> matching wood texture. How exactly do you go about doing this? Would you
> place the height_field just above the surface of the wooden object?
> Would you use a wood texture created by pov as the bit map for the
> height_field?

A more simple way is to define the parameters in the pigment section also as a
normal. You have to use the same setting as in the pigment statement without the
color_map. For better understanding here is a example:

texture
	{
        pigment
		{
                wood
                turbulence 0.04
                octaves 3
                scale <0.1, 0.1, 0.1>
                color_map 
			{
                        [0.0 color rgb <0.888, 0.6, 0.3>]
                        [0.1 color rgb <0.888, 0.6, 0.3>]
                        [0.1 color rgb <0.888, 0.6, 0.3>]
                        [0.9 color rgb <0.6, 0.4, 0.2>]
                        [0.9 color rgb <0.6, 0.4, 0.2>]
                        [1.0 color rgb <0.6, 0.4, 0.2>]
                        } // End of color_map
		}
	normal
		{
                wood
                turbulence 0.04
                octaves 3
                scale <0.1, 0.1, 0.1>
                }
	}

With this code you produce a wooden texture where the brighter parts of the wood
are lower than the dark ones. Just like an old wooden table in a pub ;-)

I found this tip in the German PovRay Magazine, an internet magazine in German
with a lot of good hints and tutorials. For those who understand German here is
the URL:

http://www.stud.uni-goettingen.de/~jthewes/dpmur.htm



So long,

Jan


Post a reply to this message

From: Ken
Subject: Re: Wood & Heightfield
Date: 8 Apr 1999 05:14:00
Message: <370C6411.F71B8DCF@pacbell.net>
Thomas Lake wrote:
> 
> I remember a couple of people's posts to my images mentioning that a
> better way to make a flat wood surface is to use a height_field with
> matching wood texture. How exactly do you go about doing this? Would you
> place the height_field just above the surface of the wooden object?
> Would you use a wood texture created by pov as the bit map for the
> height_field?

I haven't actually tried it myself but I would thing the proceedure
would be to design a wood pattern that you like. While keeping
all of the settings in the color map(s) for the wood the same change
only the pigment colors to shades of gray. Apply it to a flat object
that fills the screen and render the image. Use this to create a HF
object. Apply the original woo pattern over the HF with attentoin to
alignment and scale so that the patterns in the texture match those
of the texture.

 That is the basic description for the process. I would imagine you
could could use your original colored wood texture in the first stage
and convert it to gray scale in a paint program later. This has the
disadvantage of being unpredictable in how the height will vary but
shold come fairly close. Remember that differnt colors give different
height values. Even if you convert them to grey scale it does not
mean they sill be the correct shades of gray to give the heights you
are looking for.
 I would think that you would want to avoid large changes in color
between the adjacent pattern areas. You are only looking for a small
amount of height change to see a visible diffeene in the grain structure.
I would reccommend something like rgb 15-16 for the smooth areas
between the grain and 16-20 for the grain patterns themselves.
Amount much over this variance will make very noticable differences
in the heights between bordering areas.
  Seriously this approach sounds like overkill to me unless you are
trying to model the end of a snaped off piece of lumber. A simple
bump map in a normal statement would be much easier to control in
my opinion. You could use the same approach to the manufacture of
the image for the bump map but instead of creating a height field
apply it to standard pov generated objects.







-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: GrimDude
Subject: Re: Wood & Heightfield
Date: 8 Apr 1999 05:35:33
Message: <370c6a55.0@news.povray.org>
Thomas Lake wrote in message <370C4A62.DE542FBF@home.com>...
>I remember a couple of people's posts to my images mentioning that a
>better way to make a flat wood surface is to use a height_field with
>matching wood texture. How exactly do you go about doing this? Would you
>place the height_field just above the surface of the wooden object?
>Would you use a wood texture created by pov as the bit map for the
>height_field?
>

Ken is right of course. This is overkill. The effect, however, is more
effective then a simple normal, or bump.

Here is a sample file to create the hf:

----------------

#include "Colors.inc"
#include "Textures.inc"
#include "Woods.inc"

global_settings { hf_gray_16  }

box { <-5,-5,5>,<5,5,5.1> texture { T_Wood21 scale <5,25,5> translate
45*x } }

camera { location <0,0,-3> direction z look_at 0 }
light_source { <0,0,-3> color rgb 1 shadowless }

--------------------------

Put the resulting image in a directory from your Pov library path, and then:

--------------------------

#declare FloorBoard = height_field { tga "Plank21.tga" smooth translate
<-.5,-.5,-.5>
   texture { T_Wood21 scale <5,5,5> translate 45*x } scale <2,.25,50> }

--------------------------

Just an example.

GrimDude
vos### [at] arkansasnet


Post a reply to this message

From: Bob Hughes
Subject: Re: Wood & Heightfield
Date: 8 Apr 1999 14:18:31
Message: <370CE4C5.F51774DD@aol.com>
'orthographic' camera would be wise, prevents distortions caused by the
default 'perspective' camera, when making image_maps with procedural
textures.
I most often use the normal "twin", as Jan suggested. Much quicker and
easier if all you want is a better textured surface than color alone.
The HF method is best, however, if needing true depth to the surface
(albeit, usually planar).


GrimDude wrote:
> 
> Thomas Lake wrote in message <370C4A62.DE542FBF@home.com>...
> >I remember a couple of people's posts to my images mentioning that a
> >better way to make a flat wood surface is to use a height_field with
> >matching wood texture. How exactly do you go about doing this? Would you
> >place the height_field just above the surface of the wooden object?
> >Would you use a wood texture created by pov as the bit map for the
> >height_field?
> >
> 
> Ken is right of course. This is overkill. The effect, however, is more
> effective then a simple normal, or bump.
> 
> Here is a sample file to create the hf:
> 
> ----------------
> 
> #include "Colors.inc"
> #include "Textures.inc"
> #include "Woods.inc"
> 
> global_settings { hf_gray_16  }
> 
> box { <-5,-5,5>,<5,5,5.1> texture { T_Wood21 scale <5,25,5> translate
> 45*x } }
> 
> camera { location <0,0,-3> direction z look_at 0 }
> light_source { <0,0,-3> color rgb 1 shadowless }
> 
> --------------------------
> 
> Put the resulting image in a directory from your Pov library path, and then:
> 
> --------------------------
> 
> #declare FloorBoard = height_field { tga "Plank21.tga" smooth translate
> <-.5,-.5,-.5>
>    texture { T_Wood21 scale <5,5,5> translate 45*x } scale <2,.25,50> }
> 
> --------------------------
> 
> Just an example.
> 
> GrimDude
> vos### [at] arkansasnet

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto:inv### [at] aolcom?Subject=PoV-News


Post a reply to this message

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