POV-Ray : Newsgroups : povray.binaries.images : glossy metallic reflection Server Time
6 Aug 2024 21:39:29 EDT (-0400)
  glossy metallic reflection (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: jute
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 03:30:00
Message: <web.455043f9b8175aeef43b014e0@news.povray.org>
"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

From: nemesis
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 05:05:00
Message: <web.455059e0b8175aeef2ff13290@news.povray.org>
"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

From: Thomas de Groot
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 07:46:54
Message: <4550803e$1@news.povray.org>
Nice work, nemesis! Very useful.

Thomas


Post a reply to this message

From: nemesis
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 08:55:01
Message: <web.45508fa3b8175aeef2ff13290@news.povray.org>
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'
glossy_warp_better.jpg


 

From: Roman Reiner
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 09:40:00
Message: <web.45509993b8175aee696633280@news.povray.org>
"Smws" <smw### [at] poboxcom> wrote:
> 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.

Making two copies of your object one with the blurred reflection texture and
additional no_reflection attribute and the other with a less complicated
version of the texture (e.g. just plain reflective or at least less
samples) with no_image and no_shadow usually solves that problem without a
big loss in picture quality (if any).

Hope that helps!
Regards Roman


Post a reply to this message

From: nemesis
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 09:45:00
Message: <web.45509bafb8175aee3976a8750@news.povray.org>
"Roman Reiner" <lim### [at] gmxde> wrote:
> "Smws" <smw### [at] poboxcom> wrote:
> > 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.
>
> Making two copies of your object one with the blurred reflection texture and
> additional no_reflection attribute and the other with a less complicated
> version of the texture (e.g. just plain reflective or at least less
> samples) with no_image and no_shadow usually solves that problem without a
> big loss in picture quality (if any).
>
> Hope that helps!
> Regards Roman

wow!  Now THAT is a nice tip! :)


Post a reply to this message

From: Roman Reiner
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 12:05:01
Message: <web.4550bc99b8175aee696633280@news.povray.org>
"nemesis" <nam### [at] gmailcom> wrote:
> wow!  Now THAT is a nice tip! :)

Cheers! :)


Post a reply to this message

From: Tek
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 12:34:40
Message: <4550c3b0@news.povray.org>
Very impressive results, your method really looks realistic. I'm gonna have 
to have a play with that myself!

Your random rotation might give an even better result if you use rotate 
<pow(rand(S),2)*90,rand(S)*360,0> to more evenly spread the randomly rotated 
wood patterns, though this is purely academic since I can't see any flaws in 
your pattern!

But I have one important question: *why* does the wood pattern look good?

-- 
Tek
http://evilsuperbrain.com

"nemesis" <nam### [at] gmailcom> wrote in message 
news:web.454f674dce679533976a8750@news.povray.org...
> 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

From: nemesis
Subject: Re: glossy metallic reflection
Date: 7 Nov 2006 13:50:00
Message: <web.4550d451b8175aeef2ff13290@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote:
> Your random rotation might give an even better result if you use rotate
> <pow(rand(S),2)*90,rand(S)*360,0> to more evenly spread the randomly rotated
> wood patterns,

yeah, i just added some random thoughtless rotation, didn't even play with
it.  I'll try that some time from now.

> But I have one important question: *why* does the wood pattern look good?

beats me!  As i said, i just wanted to create lines in the surface,
emulating scratches from brushed metal.  That's all.  I first tried
gradient, but as a normal, gradient sucks.  Then i hit wood and it looked
good. :)

In the meantime, here's a clearer version, by using +A0.0 and
m_metal_glossy( .04, 1*3 )


Post a reply to this message


Attachments:
Download 'glossy_mine_polished.jpg' (37 KB)

Preview of image 'glossy_mine_polished.jpg'
glossy_mine_polished.jpg


 

From: Smws
Subject: Re: glossy metallic reflection
Date: 8 Nov 2006 11:15:01
Message: <web.45520200b8175aeeda53d9e40@news.povray.org>
"Roman Reiner" <lim### [at] gmxde> wrote:
> "Smws" <smw### [at] poboxcom> wrote:
> > 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.
>
> Making two copies of your object one with the blurred reflection texture and
> additional no_reflection attribute and the other with a less complicated
> version of the texture (e.g. just plain reflective or at least less
> samples) with no_image and no_shadow usually solves that problem without a
> big loss in picture quality (if any).
>
> Hope that helps!
> Regards Roman

Yes! Helps very much, I will be trying this. You can see the image in
question on p.b.i now, thanks for giving me this idea. Of course it seems
obvious once you point it out...

-Stefan


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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