|
|
I decided to try applying my smooth CSG maths to the crackle pattern. It's not
perfect (since I can only include influences from the closest 3 points) but it's
pretty good for small amounts of smoothing.
The source (you'll need smooth_csg.inc from p.b.s-f):
#include "smooth_csg.inc"
#local f_crackle0 = function { pattern { crackle form <1/4,0,0> } }
#local f_crackle1 = function { pattern { crackle form <0,1/4,0> } }
#local f_crackle2 = function { pattern { crackle form <0,0,1/4> } }
#local Smoothing = .005;
#local f_max10 = mf_Intersection2( f_crackle1, f_crackle0, Smoothing )
#local f_min10 = mf_Merge2( f_crackle1, f_crackle0, Smoothing )
#local f_crackle10 = function { f_max10(x,y,z) - f_min10(x,y,z) }
#local f_max20 = mf_Intersection2( f_crackle2, f_crackle0, Smoothing )
#local f_min20 = mf_Merge2( f_crackle2, f_crackle0, Smoothing )
#local f_crackle20 = function { f_max20(x,y,z) - f_min20(x,y,z) }
#local f_smoothCrackle = mf_Merge2( f_crackle10, f_crackle20, Smoothing )
#declare smoothCrackle =
pigment {
function {
min(1,max(0,4*f_smoothCrackle(x,y,z)))
}
}
--
Tek
http://evilsuperbrain.com
Post a reply to this message
Attachments:
Download 'smooth_crackle.jpg' (170 KB)
Preview of image 'smooth_crackle.jpg'
|
|
|
|
On 3/8/2012 16:22, Tek wrote:
> I decided to try applying my smooth CSG maths to the crackle pattern.
That yields an interesting effect.
--
Darren New, San Diego CA, USA (PST)
People tell me I am the counter-example.
Post a reply to this message
|
|