POV-Ray : Newsgroups : povray.advanced-users : Apparent circular pattern of scratches : Re: Apparent circular pattern of scratches Server Time
24 Feb 2024 23:21:27 EST (-0500)
  Re: Apparent circular pattern of scratches  
From: Thomas de Groot
Date: 24 Jan 2019 02:36:07
Message: <5c496ae7$1@news.povray.org>
On 24-1-2019 2:00, Bald Eagle wrote:
> "omniverse" <omn### [at] charternet> wrote:
> 
>> I like that crackle pattern idea, I was able to get the effect easily that way
>> going with your SDL.
>> Just probably needs a randomization of the averaged normal parameters.
> 
> I would have never thought that using crackle would give rise to this effect.
> I was experimenting with wood and ripples...
> 

I guess that every surface perturbation would do the trick, except that 
the more random the scratch patter the better the effect will look. Also 
with straight, fairly long, scratches the effect will be stronger.

I was in a hurry when I posted my sdl and the render engine was busy 
with a scene, but I wanted to use a scratch bump_map. I'll experiment today.

>> Lighting/specular highlighting changes it drastically too.
> 
> Yes, likely so.
> 
> 
> This is getting close - something finer, less grainy, and with that "all other
> scratches are invisible except the very few that reflect light" would be the
> goal.   I'll hopefullly get a chance to try it out on something in a scene and
> see how it works.

Try a bump_map.

> 
> Also - pretty good for a plane --- now how do we achieve this on the surface of
> a a 3D primitive?  Does the crackle / granite already take care of that?
> 
> We need a Scratched Sphere on a Checkered Plane scene... :)

Now that you mention it, we have something like this by Przemek Loesch: 
brushed_metal, from 2004, in p.b.s-f. Here it is:

//start code
camera {
   location <0,100,-1000>
   look_at <0,100,0>
   right     x*image_width/image_height
   angle 60
}

light_source { <500,1000,-1000> rgb 1}

#declare fin = finish {reflection 0.1 specular 0.5 metallic}
#declare col = color rgb 1;

#declare t0 = texture {
   pigment {col}
   finish {fin}
}
#declare t1 = texture {
   pigment {bozo scale 50 rotate y*0 color_map {[0 col] [1 rgbt <1,1,1,1>]}}
   normal { pigment_pattern {waves warp {repeat x*100} color_map {[0, 
rgb 0][1, rgb 1]} translate 0 scale 3} 10}
   finish {fin}
}
#declare t2 = texture {
   pigment {bozo scale 50 rotate y*30 color_map {[0 col] [.8 rgbt 
<1,1,1,1>]}}
   normal { pigment_pattern {waves warp {repeat y*100} color_map {[0, 
rgb 0][1, rgb 1]} translate 30 scale 3} 10}
   finish {fin}
}
#declare t3 = texture {
   pigment {bozo scale 50 rotate y*70 color_map {[0 col] [.7 rgbt 
<1,1,1,1>]}}
   normal { pigment_pattern {waves warp {repeat z*100} color_map {[0, 
rgb 0][1, rgb 1]} translate -30 scale 3} 10}
   finish {fin}
}

#declare metal =
texture {t0}
texture {t1}
texture {t2}
texture {t3}

sphere {<300,200,0>, 200 texture {metal}}
cylinder {<-400,200,0>,<0,200,600>, 200 texture {metal}}
plane {y,0 texture {metal}}
cone {<0,0,-100>, 150, <0,350,-100>, 0 texture {metal}}

sky_sphere {
   pigment {
     gradient y
     color_map {[0 rgb 1] [.5 rgb <0,0.3,1>]}
   }
}
//end code

This might be a good start to investigate the matter at hand.

> 
> 
> 
> Too many things to do lately, but this gave me the nudge to dig through the
> source and look at how the crackle pattern is actually implemented, and I found
> these comment gems that ought to make their way into the docs:
> 
> *   Large scale, without turbulence, makes a pretty good stone wall.
> *   Small scale, without turbulence, makes a pretty good crackle ceramic glaze.
> *   Highly turbulent (with moderate displacement) makes a good marble, solving
> *   the problem of apparent parallel layers in Perlin's method.
> *   2 octaves of full-displacement turbulence make a great "drizzled paint"
> *   pattern, like a 1950's counter top.
> *   Rule of thumb:  put a single colour transition near 0 in your colour map.
> 
> 
> Very nice - I'm hoping this effect will get further honed into an include /
> macro with a few options, so we can have a new easy-to-use tool for making more
> realistic looking hard surfaces.
> 

Yes, I remember those. Worth investigating further too.

-- 
Thomas


Post a reply to this message

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