|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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...
> 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.
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... :)
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.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Apparent circular pattern of scratches
Date: 24 Jan 2019 03:00:59
Message: <5c4970bb@news.povray.org>
|
|
|
| |
| |
|
|
Replace the normal {} as given, by this (download the bump_map):
normal {
bump_map {png "Scratches.png" gamma 1}
rotate 90*x
scale 10
bump_size 1
}
Going into the right direction but it is more difficult than I initially
realised.
--
Thomas
Post a reply to this message
Attachments:
Download 'scratches.png' (345 KB)
Preview of image 'scratches.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|