POV-Ray : Newsgroups : povray.advanced-users : Apparent circular pattern of scratches : Re: Apparent circular pattern of scratches Server Time
29 Apr 2024 13:46:58 EDT (-0400)
  Re: Apparent circular pattern of scratches  
From: Kenneth
Date: 24 Jan 2019 06:55:01
Message: <web.5c49a6995e3f4450cd98345b0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I'm sure everyone has seen this at some point:
>
> When you look at a light source's reflection on a smooth piece of glass
> or metal or plastic, the scratches all tend to appear as a series of
> arcs and lines roughly in a circular pattern centered around the "hotspot".
>

Sometimes, spider webs look like that too. Which gave me the idea to do someting
similar to the twigs code already posted. Mine conists of just a bunch of
cylinders randomly arranged, with a 'moon' reflected in them. But the cylinders
aren't round, they're more like a flat oval shape-- to present more of a surface
for the moon to reflect off of. (I'm using reflection rather than phong or
specular.) It's not very good, but works. The reflections are VERY 'thin' and
noisy, due to the extreme angle of incidence with the moon.

Here, the light source itself doesn't really produce the 'tunnel' effect, it's
mostly the moon reflection. I also used max_trace_level of only 2, to try and
keep secondary reflections to a minimum.
-----

global_settings {assumed_gamma 1.0 max_trace_level 2}

camera {
  perspective
  location  <1.5, 1.5, -4>
  look_at   <1.5, 1.5, 0>
  right     x*image_width/image_height
  angle 67
}

light_source {
  0*x
  color rgb 20
  looks_like{sphere{0,7 pigment{rgb 1} finish{ambient 10
         emission 0 diffuse 0}}}
  translate <15, 20, 100>
}

background{rgb 0}

#declare S = seed(13);

#declare STRAND =
cylinder{-10*x,10*x, 0.008 scale <1,1,15>
texture{
  pigment{rgb 0.03}
  finish{ambient 0.09 diffuse 0.05 reflection {0.0,0.6}}
  /*
  normal{
     gradient x // try z too
     scale .001
     sine_wave
     bump_size .5
     }
     */
     }
}

union{
#for(i,1,150)
object{STRAND
 rotate 720*rand(S)*z
 translate <-4 + 8*rand(S), -3 + 6*rand(S), 1 + 2*rand(S)>
 }
 #end
 }


Post a reply to this message

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