|
 |
Sven Littkowski <I### [at] SvenLittkowski name> wrote:
> Hi experienced POV-Ray users,
>
> my steamboat is made of lumber. I wonder, what surface finishes you
> would usually use for wooden planks. Those are deck planks, but also the
> planks on the sides of the superstructures on the decks. Online I saw
> some really nice examples, some even going as far as using
> specular_maps, I was reading in the photo description.
>
> Based on your own experiences, what finishes or even normals, would you use?
Hi Sven,
When it's coming to outdoor wood, I use this sources most -
Tim McMurdo Capstan fnished...I promise
http://news.povray.org/povray.binaries.images/thread/%3Cweb.42efc7029ecf5192acb32c570%40news.povray.org%3E/
David El Tom Veneer pattern
http://news.povray.org/povray.binaries.images/attachment/%3C469c80fd%40news.povray.org%3E/us-ascii
Another great wood texture is based on the isowood code of Christoph Hormann
(http://www.imagico.de/iso_wood_en.php), where I use the isosurface function for
the normal definition.
Here is an example -
#macro IW_Warp_02 (Seed, xSize, ySize, zSize)
#local SZ = (xSize+ySize)*0.5*0.1;
#local Density = 0.1;
warp {
black_hole <xSize*0.5,0,0>, SZ
falloff 2.5
strength 2
repeat <min (xSize, SZ/Density),min (ySize, SZ/Density),SZ/Density>
turbulence <0.02,0.75,0.75>
inverse
}
#local SZ = (xSize+ySize)*0.5*0.15;
#local Density = 0.1;
warp {
black_hole <xSize*0.5,0,0>, SZ
falloff 2.1
strength 3.7
repeat <min (xSize, SZ/Density),min (ySize,
0.7*SZ/Density),0.8*SZ/Density>
turbulence <0,0.4,0.4>
inverse
}
#end
#macro IW_Select_Warp (WarpNbr, Seed, xSize, ySize, zSize)
IW_Warp_02 (Seed, xSize, ySize, zSize)
#end
#macro IW_Plank_Round_CutN (Seed, xSize, ySize, zSize, Rotate, Translate, Round,
Strength, Strength2, Pigm, Fin, C_Map, WarpNbr, fn_Max_Val)
#local rd = seed (Seed);
#local fn_Max = fn_Max_Val+<0,0,0>;
#local Trsx = (rand (rd)-0.5)*Translate*xSize;
#local Trsy = (rand (rd)-0.5)*Translate*ySize;
#local Trsz = (rand (rd)-0.5)*Translate*zSize;
#local Rotx = (rand (rd)-0.5)*Rotate;
#local Roty = (rand (rd)-0.5)*Rotate;
#local fn_Wood =
function {
pigment {
Pigm
color_map {
[0 srgb 0]
[1 srgb 1]
}
translate <Trsx,Trsy,Trsz>
rotate Rotx*x
rotate Roty*y
IW_Select_Warp (WarpNbr, Seed, xSize, ySize, zSize)
}
}
#local fn_Disp =
function {
pigment {
average
pigment_map {
[1 function {f_noise3d (0,0,z*1.6)*0.3}
color_map {
[0 srgb 0]
[1 srgb x]
}
]
[1 function {f_noise3d (0,0,-z*1.6)*0.3}
color_map {
[0 srgb 0]
[1 srgb y]
}
]
}
}
}
#local fnShape = function {f_rounded_box (x,y,z, Round, xSize*0.5, ySize*0.5,
zSize*0.5+Round)}
#local fnShape2 = function {(abs (z)-zSize*0.5)}
#local fnShapeT = function {fnShape (x+fn_Disp (x,y,z).x, y+fn_Disp
(x,y,z).y,z+fn_Disp (x,y,z).z)}
#local fnShape2T = function {fnShape2(x+fn_Disp (x,y,z).x, y+fn_Disp
(x,y,z).y,z+fn_Disp (x,y,z).z)}
#declare fnBumpsT = function {fn_Wood (x+fn_Disp (x,y,z).x, y+fn_Disp
(x,y,z).y,z+fn_Disp (x,y,z).z).grey}
#end
#declare P_IW_10 =
pigment {
wood
octaves 6
lambda 2.5
turbulence <0.06,0.06,0.75>
scale <0.02,0.02,0.3>
}
#declare Fin_W_02 =
finish {
ambient 0
diffuse 0.95*0.6
brilliance 1.4
specular 0.4
roughness 0.02
}
#declare GammaFact = 2.2;
#declare ColorDiff = <0,0,0>;
#macro ColorCorrect (Color, Gamma, ColDiff)
rgb <pow (Color.red+ColDiff.red,Gamma),pow (Color.green+ColDiff.green,Gamma),pow
(Color.blue+ColDiff.blue,Gamma)>
#end
#declare CM_IW_02 =
color_map {
[0 ColorCorrect (<0.949,0.792,0.514>, GammaFact, ColorDiff)]
[0.3 ColorCorrect (<0.855,0.651,0.376>, GammaFact, ColorDiff)]
[0.6 ColorCorrect (<0.831,0.596,0.275>, GammaFact, ColorDiff)]
[0.9 ColorCorrect (<0.620,0.447,0.204>, GammaFact, ColorDiff)]
}
IW_Plank_Round_CutN (17, 0.3, 1.6, 8, 2, 0, 0.018, 0.0035, 0.005, pigment
{P_IW_10 scale 1.6}, Fin_W_02, CM_IW_02, 2, 0.3)
#local T_WoodA =
texture {
pigment {
function {fnBumpsT (x,y,z)}
color_map {CM_IW_02}
}
normal {function {fnBumpsT (x,y,z)}, -0.1 accuracy 0.004}
finish {Fin_W_02}
}
Other wood definitions are mostly useful for inhouse applications like flooring
or furniture with more smooth surfaces and coatings. Here specularmaps can be
useful. Outdoor it seems overkill, but you have to take care of the waterline...
Norbert
Post a reply to this message
|
 |
|
 |
Le 18-04-12 à 01:43, Sven Littkowski a écrit :
> Interesting. I never worked with these features (ior, fresnel, fresnel
> reflection, micronormal perturbation) and am eager to try them out.
>
> At the current level, the painted lumber still shows a bit of the grain,
> the deck even more, but I want to add now these new features that you
> mention to that.
>
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
>
A micronormal is nothing more than some normal scaled very small. It's
used exactly the same way as you would use regular normals. To look
correct, it demand anti-aliasing. Without, it looks very grainy. Coupled
with reflection, it's used to get blurred reflection.
It IOR is the index of refraction. Everything non-metallic have one,
even if it's opaque. When light encounter a surface, it's the difference
of the outside and inside IORs and the angle of incidence that dictate
how much reflection there will be. The specular or phong highlights are
really nothing more than the reflection of light source.
The ior is set in the interior block. Here are examples for water and
generic glass :
//pure water at 20°C
interior{ior 1.33}
//generic glass
interior{ior 1.5}
Most waxes have an IOR that is slightly lower than that of water (1.2 to
1.3). Glasses can have IORs ranging from about 1.4 all the way up to 1.8
or slightly more. Gems can range from 1.45 to 2.45 (diamond).
To enable fresnel in the reflection, you simply add fresnel into the
reflection block. You also need to set an ior !=1, or there will be no
reflection. Rays that are perpendicular to the surface will have very
little reflection and rays just grazing the surface will get fully, or
almost fully, reflected.
finish{reflection{1 fresnel} conserve_energy }
conserve_energy is used to adjust the transmitted ray relative to the
reflection when the reflection is not constant. Don't affect things for
opaque surfaces.
Using fresnel reflection is essential if you want to have some realistic
water, glass or gems.
With version 3.8, you can also have a finish level fresnel:
finish{diffuse 0.7 ambient 0.1 specular 0.5 roughness 0.001 fresnel}
Where the fresnel will affect both diffuse and specular, or phong. Here
also, you need to have an interior block to set the material's IOR.
With versions 3.7 or less, it won't work, but probably don't cause an
error, just have no effect.
Post a reply to this message
|
 |