POV-Ray : Newsgroups : povray.advanced-users : Apparent circular pattern of scratches Server Time
2 Dec 2024 19:13:08 EST (-0500)
  Apparent circular pattern of scratches (Message 11 to 17 of 17)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: Apparent circular pattern of scratches
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

From: Thomas de Groot
Subject: Re: Apparent circular pattern of scratches
Date: 25 Jan 2019 03:51:38
Message: <5c4ace1a$1@news.povray.org>
This scene comes close to the initial examples given. I still have 
trouble to get the reflection of the light to be broader to right and left.

//start code
#version 3.8;

global_settings {
   assumed_gamma 1.0
}

camera {
   location  <0, 100, -100>
   look_at   <0, 0, 100>
   direction z
   right     x*image_width/image_height
   angle     54
}

light_source {
   <0,0,0>
   color rgb <1, 1, 1>*1
   translate <0, 50, 100>*100
}

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

#local N_scratch =
normal {
   bump_map {png "scratches.png" gamma 1}
   rotate 90*x
}

plane {
   y, 0
   pigment {rgb 0.3}
   normal {
     average
     normal_map {
       [1.0 N_scratch scale 50 bump_size -1]
       [1.0 N_scratch scale 40 bump_size -0.8]
       [1.0 N_scratch scale 30 bump_size -0.6]
       [1.0 N_scratch scale 20 bump_size -0.4]
       [1.0 N_scratch scale 10 bump_size -0.2]
     }
   }
   finish {
     specular albedo 0.1
     diffuse albedo 0.9
     roughness 0.001
     metallic
     reflection {0.5, 1.0 metallic}
     conserve_energy
   }
}
//end code

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Apparent circular pattern of scratches
Date: 25 Jan 2019 07:12:38
Message: <5c4afd36$1@news.povray.org>
On 25-1-2019 9:51, Thomas de Groot wrote:
> This scene comes close to the initial examples given. I still have 
> trouble to get the reflection of the light to be broader to right and left.
> 

Well, that last one is simple: change the finish roughness to a higher 
value, e.g. 0.005 .

Also, build a pseudo orthographic scene:

camera {
   location  <0, 100, 0>
   look_at   <0, 0, 0>
   direction z
   right     x*image_width/image_height
   angle     54
}

light_source {
   <0,0,0>
   color rgb <1, 1, 1>*1
   translate <0, 500, 0>
}

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Apparent circular pattern of scratches
Date: 26 Jan 2019 07:19:33
Message: <5c4c5055$1@news.povray.org>
The latest variant, as shown in p.b.i, using the same scratch image_map, 
results from the following code:

//start code
#version 3.8;

global_settings {
   assumed_gamma 1.0
   radiosity {
     pretrace_start 0.08
     pretrace_end   0.004
     count 50, 1000
     nearest_count 10, 5
     error_bound 1
     recursion_limit 1
     low_error_factor .3
     gray_threshold 0.0
     minimum_reuse 0.015
     maximum_reuse 0.1
     brightness 1

     adc_bailout 0.01/2
     normal on
     media off
     always_sample off
     //max_sample 1.0
   }
}

camera {
   location  <0, 100, 0>
   look_at   <0, 0, 0>
   direction z
   right     x*image_width/image_height
   angle     54
}

light_source {
   <0,0,0>
   color rgb <1, 1, 1>*1
   translate <0, 10e6, 0>
}

sky_sphere {
   pigment {
     gradient y
     color_map {
       [0.0 rgb <0.6,0.7,1.0>*0.7]
       [0.7 rgb <0.0,0.1,0.8>*0.7]
     }
   }
}

#local N_scratch =
normal {
   bump_map {png "scratches.png" gamma 1}
   rotate 90*x
}

#local Strength = -1;

plane {
   y, 0
   material {
     texture {
       pigment {srgb <1.00, 0.62, 0.28>}
       finish {
         diffuse albedo 0.01
         brilliance 1
         specular albedo 0.7
         roughness 0.00001
         metallic on
         fresnel on
         reflection {0.0, 0.9 metallic on fresnel on}
         conserve_energy
       }
     }
     interior {
       ior 1.5
     }
   }
   material {
     texture {
       pigment {srgbt <1.00, 0.62, 0.28, 1>}
       normal {
         average
         normal_map {
           [1.0 N_scratch scale 50 rotate  30*y bump_size 1.0*Strength]
           [0.5 N_scratch scale 40 rotate  60*y bump_size 0.8*Strength]
           [0.4 N_scratch scale 30 rotate  90*y bump_size 0.6*Strength]
           [0.3 N_scratch scale 20 rotate -90*y bump_size 0.4*Strength]
           [0.2 N_scratch scale 10 rotate -60*y bump_size 0.2*Strength]
           [0.1 N_scratch scale 1  rotate -30*y bump_size 0.1*Strength]
         }
       }
       finish {
         diffuse albedo 0.01
         brilliance 1
         specular albedo 0.1
         roughness 0.001
         metallic on
         fresnel off
         reflection {0.0, 0.9 metallic on fresnel on}
         conserve_energy
       }
     }
     interior {
       ior 1.5
     }
   }
}
//end code

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Apparent circular pattern of scratches
Date: 26 Jan 2019 07:32:31
Message: <5c4c535f$1@news.povray.org>
Note: To be entirely orthodox, the specular and reflection values should 
be identical. So, in the lower of the layered materials given above set 
them to e.g. 0.5, and in the upper material to e.g. 0.7

-- 
Thomas


Post a reply to this message

From: IGM
Subject: Re: Apparent circular pattern of scratches
Date: 16 May 2019 03:20:02
Message: <web.5cdd0eeb5e3f4450776fc67d0@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".
>
> I was wondering if anyone has ever attempted to replicate this effect, and
> perhaps has an optical explanation for why the scratches appear in a circular
> pattern.


This effect is the base for "scratch holograms"!! Have a look at
http://amasci.com/amateur/holohint.html

igmar


Post a reply to this message

From: Thomas de Groot
Subject: Re: Apparent circular pattern of scratches
Date: 17 May 2019 02:42:39
Message: <5cde57df$1@news.povray.org>
On 16-5-2019 9:19, IGM wrote:
> "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".
>>
>> I was wondering if anyone has ever attempted to replicate this effect, and
>> perhaps has an optical explanation for why the scratches appear in a circular
>> pattern.
> 
> 
> This effect is the base for "scratch holograms"!! Have a look at
> http://amasci.com/amateur/holohint.html
> 
> igmar
> 
> 
> 

LOL This is brilliant!

-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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