|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi, guys. I hope to contribute a bit more to the discussion of getting good
glossy reflective metal textures in povray.
I've made several tests, starting from a basic shiny metal texture and also
using Warp's FAQ method and Jaime Vives Piqueres' micronormals and finally
a little discovery i made by simply changing the used normal pattern: wood
rather than the usual bumps, crackle, facets or granite one would usually
think about. This came from the observation that "brushed" metal bears
several scratches throughout its surface. I tried to emulate that with a
My solution is slightly faster than Jaime's because of less normal_map
entries, i guess.
Here are the textures, from fastest to slowest to render:
#declare f_reflective_metal = finish {
ambient .2 diffuse .2
specular 1.5 roughness .02 brilliance 2
reflection { .6 metallic 1 } metallic
}
#declare f_metal_shiny = f_reflective_metal
// basic shiny metal
#declare t_shiny_metal =
texture {
pigment { rgb .8 }
finish { f_metal_shiny }
}
/* straight from warp's method from the povray FAQ */
#local BlurAmount = .2; // Amount of blurring
#local BlurSamples = 10*4; // How many rays to shoot
#declare t_metal_glossy_warp =
texture
{ average texture_map
{ #local Ind = 0;
#local S = seed(0);
#while(Ind < BlurSamples)
[1 // The pigment of the object:
pigment { rgb .7 }
// The surface finish:
finish { f_metal_shiny }
// This is the actual trick:
normal
{ bumps BlurAmount
translate <rand(S),rand(S),rand(S)>*10 //200
scale 1000
}
]
#declare Ind = Ind+1;
#end
}
}
#declare t_metal_glossy_warp_lesser =
texture
{ average texture_map
{ #local Ind = 0;
#local S = seed(0);
#while(Ind < BlurSamples)
[1 // The pigment of the object:
pigment { rgb .7 }
// The surface finish:
finish { f_metal_shiny }
// This is the actual trick:
normal
{ bumps BlurAmount
translate <rand(S),rand(S),rand(S)>*10/200
scale 1000
}
]
#declare Ind = Ind+1;
#end
}
}
// *************************
// *** Jaime Vives Piqueres' micronormals ***
// *************************
// + microsurface normal
#local p_jvp_micro2=
pigment{
crackle turbulence 1
color_map{
[0.00 rgb .7]
[0.01 rgb .7]
[0.02 rgb 1]
[1.00 rgb 1]
}
scale 5
}
#local p_jvp_micro1=
pigment{
cells
turbulence .5
color_map{
[0.0 rgb .9]
[1.0 rgb 1]
}
scale .01
}
// + average all the normals
#local p_jvp_brushed_new=
pigment{
average turbulence 0
pigment_map{
[0.0 p_jvp_micro1]
[0.1 p_jvp_micro1 rotate 45*x]
[0.2 p_jvp_micro1 rotate -45*x]
[0.3 p_jvp_micro2]
[0.4 p_jvp_micro1 rotate 45*y]
[0.5 p_jvp_micro1 rotate -45*y]
[0.6 p_jvp_micro1 rotate 90*z]
[0.7 p_jvp_micro2 rotate 45]
[0.8 p_jvp_micro1 rotate 45*z]
[0.9 p_jvp_micro1 rotate 90*y]
[1.0 p_jvp_micro1 rotate -45*z]
}
scale .1
}
#declare n_jvp_micronormals = normal { pigment_pattern{p_jvp_brushed_new} .4
}
#declare t_jvp_micronormal_glossy_metal = texture {
pigment { rgb .7 }
normal { n_jvp_micronormals scale .5 }
finish { f_reflective_metal }
}
#declare t_metal_glossy_jvp = t_jvp_micronormal_glossy_metal
/**
* a mix of warp's method and Jaime Vives Piqueres micronormals.
* But with a completely unrelated and surprising pattern...
**/
#macro m_metal_glossy( BlurAmount, BlurSamples )
texture { average
texture_map {
#local Ind = 0;
#local S = seed(0);
#while(Ind < BlurSamples)
[1 // The pigment of the object:
pigment { rgb .78 }
// The surface finish:
finish { f_reflective_metal }
// This is the actual trick:
normal { wood ramp_wave
rotate rand(S)*30 turbulence .6
bump_size -BlurAmount
translate <rand(S),rand(S),rand(S)>*.02
scale .002
//scale 1000
}
]
#declare Ind = Ind+1;
#end
}
}
#end
#declare t_glossy_brushed_metal = m_metal_glossy( .2, 1*4 )
#declare t_metal_brushed_glossy = t_glossy_brushed_metal
#declare t_metal_glossy = t_glossy_brushed_metal
#declare t_metal_glossy_weak = m_metal_glossy( .1, 1*4 )
// test scene
camera { location -5*z look_at y+2*x rotate <20,0,0> angle 40 }
light_source { 4-8*z 1.3 }
light_source { 4-6*x 1.3 }
plane { y, 0 pigment { checker rgb 1 rgb 0 } finish { ambient .3 diffuse .4
} }
sphere { y-7*z, 1 rotate -y*40
pigment { rgb y }
finish { ambient 0 diffuse .6 phong .7 brilliance .5 }
}
#local n0 = normal { facets coords .04 bump_size .9 turbulence .0 scale
9*(z+x) scale .04 }
box { -.5,.5 rotate y*20 translate .5*y+1.3*x scale 2 rotate -y*20
//texture { t_shiny_metal }
//texture { t_metal_glossy_warp }
//texture { t_metal_glossy_warp_lesser }
//texture { t_metal_glossy }
texture { t_metal_glossy_weak }
//texture { t_metal_glossy_jvp scale .04 }
}
Shown are the test scenes renders. Getting as reference the basic shiny
metal with no distortions, it can be seen that Warp's method (using huge
normals) distorts too much the reflected environment. I made a few changes
to values in order to prevent too much of it. OTOH, Warp's method is the
fastest and the only one that looks ok without antialiasing. Jaime's in
particular, seem to need quite a lot. I suggest +AM2 +A0.08 +J1.0 on the
command-line. Mine and Jaime's get this.
Jaime's seem to need yet more AA or a smaller scale, i don't know... his
reference picture looks a lot better:
http://www.ignorancia.org/uploads/experiments/micronormals/micro.jpg
Although not seen here, spherical surfaces get somewhat weird at the
equatorial area near the borders of the shape with Warp's or Jaime's, but
do just fine with the wood pattern.
Post a reply to this message
Attachments:
Download 'basic_shiny.jpg' (60 KB)
Preview of image 'basic_shiny.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
well, what a shame. the web interface to the news just let attach one image
at a time. oh well...
Post a reply to this message
Attachments:
Download 'glossy_metal_warp.jpg' (48 KB)
Preview of image 'glossy_metal_warp.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
this is warp's slightly modified:
Post a reply to this message
Attachments:
Download 'glossy_metal_warp_changed.jpg' (47 KB)
Preview of image 'glossy_metal_warp_changed.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
this is Jaime's rendered at the same supersampling antialias setting and
resolution as later images. It certainly feels the need of a stronger
setting...
Post a reply to this message
Attachments:
Download 'glossy_jaime.jpg' (52 KB)
Preview of image 'glossy_jaime.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
this is mine, the weaker version:
Post a reply to this message
Attachments:
Download 'glossy_wood_weak.jpg' (41 KB)
Preview of image 'glossy_wood_weak.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"nemesis" <nam### [at] gmailcom> wrote:
> this is mine, the weaker version:
Aha! Really nice, and just in time for me, I was wrestling with this very
problem. I have the most trouble when the blurred surface is concave (as
on my spoon) and it reflects itself... or I think that's slowing it down.
I will be trying these for sure.
-Stefan
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"nemesis" <nam### [at] gmailcom> wrote:
> hi, guys. I hope to contribute a bit more to the discussion of getting good
> glossy reflective metal textures in povray.
>
Marvellous work! Thank you very much for sharing.
--
jute
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jute" <nomail@nomail> wrote:
> Marvellous work! Thank you very much for sharing.
thanks! It was just a quick hack around Warp and Jaime methods. Using the
wood pattern surprised me so much that i had to share... probably, patterns
like marble or gradient and a bit of turbulence may produce similar
results...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nice work, nemesis! Very useful.
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I think previously i did not do Warp's method justice: it does produce nice
blurred reflections without the graininess that accompanies micronormals.
So here's a better render of it with the given supersampling setting and
doubling BlurSamples and lowering BlurAmount to .04
in the end, i guess it depends on the type of reflective metal you're trying
to achieve...
Post a reply to this message
Attachments:
Download 'glossy_warp_better.jpg' (37 KB)
Preview of image 'glossy_warp_better.jpg'
|
|
| |
| |
|
|
|
|
| |