POV-Ray : Newsgroups : povray.newusers : simulating cracks in surface using normals : Re: simulating cracks in surface using normals Server Time
29 Jul 2024 04:32:43 EDT (-0400)
  Re: simulating cracks in surface using normals  
From: Trevor G Quayle
Date: 26 Oct 2006 14:25:00
Message: <web.4540fd0e84a00c02c150d4c10@news.povray.org>
"Toon" <nomail@nomail> wrote:
> > try crackle with a user defined slope_map, you may also need to play with
> > the form values though the default should be adequate.  See the docs for
> > more help on the crackle pattern and slope_map.
> >
> > -tgq
>
> Thanks for all the tips, after playing around with crackle and slope_maps, I
> can get someting that looks a little like what I want, but not entirely. I
> can't seem to get any really deep cracks. Maybe someone can tell me what I
> am doing wrong? I'd like to create a scaleable Cracks normal with
> AmountOfCracks, CracksDepth and CracksLength settings. Anybody any idea?
> (Any other ideas to get the clay more realistic are also welcome!)The code
> for some claylike spheres that illustrate the problem is the following:
>
> camera {look_at <0.0,0,0>
>         location <-5 , 0.0 , -50>
>        }
>
> global_settings {radiosity {}}
>
> #include "colors.inc"
>
> light_source{<1000,1000,-1000>  color rgb 0.5}
>
> sky_sphere {pigment{color rgb 2}}
>
> plane { y, -6 texture {pigment {color rgb <1,1,1>} finish {ambient 0.1
> diffuse 0.2}}}
>
> plane {z, 1000 pigment {color rgb 0.5}}
>
> #declare MouldedLook=normal{bozo -8 scale 3 }
> #declare Cracks=normal{crackle
>                        scale 10
>                        turbulence <0.7,0.5,0>
>                        slope_map {[0, <-1,0>]
>                                   [0.01 <-1,0>]
>                                   [0.01 <0,0>]
>                                   [1 <0,0>]
>                                  }
>                       }
> #declare NoNormal=normal{bumps 0.00001}
> #declare MouldedCracks=normal{average
> normal_map{[1,MouldedLook][1,Cracks][-1,NoNormal]}}
>
> sphere { <0,0,0>,6 texture{pigment{color Orange} normal{Cracks} finish
> {ambient 0 diffuse 0.6}} translate <-10,0,0> }
> sphere { <0,0,0>, 6 texture{pigment{color Orange} normal{MouldedLook}}
> finish {ambient 0 diffuse 0.6}translate <0,0,0> }
> sphere { <0,0,0>,6 texture{pigment{color Orange} normal{MouldedCracks}}
> finish {ambient 0 diffuse 0.6} translate <10,0,0> }

You can try adding a float value behind crackle ("crackle c"), you can use
this to scale the apparent depth

However, the normals are just surface normal and faked, so there will be
some limitation on how deep they can actually appear, especially with
radiosity on.  Looks like you have the general idea now though, keep at it.

-tgq


Post a reply to this message

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