POV-Ray : Newsgroups : povray.binaries.images : Crackle again : Crackle again Server Time
19 Apr 2024 23:28:22 EDT (-0400)
  Crackle again  
From: Bill Pragnell
Date: 23 Nov 2022 07:40:00
Message: <web.637e143ebe1b321fb96893c06f35e431@news.povray.org>
Hi everyone

I was reading through the recent thread on the crackle pattern, and I too was
unaware of the 'solid' modifier. And I too have often craved a 'custom'
crackle-like effect that could permit cell color to be controlled by a function
or pigment.

After some thought, I basically came to the same conclusions as Bald Eagle -
i.e. that it can't be done with user-defined functions, because the position
information is lost in the closest-distance calculation.

However, I think I've found another way. It's not particularly elegant, and it
only works in 2D, but it parses relatively leniently and renders fast. The idea
is to make a set of object pigment functions, one per cell, tracing against
cones to produce non-overlapping meshes. The object pigments can be given an
interior value based on their seed point position, zero outside, and then
combined using max() into one big function that can then itself go into a
pigment.

The attached example uses 250 seed points in a 20x20 square, the cells colored
using a wood pattern. It should be straightforward to layer the simple distance
function version of the same point array to provide mortar (although I haven't
tried this yet).

Bill


Post a reply to this message


Attachments:
Download 'cracklebobs.png' (66 KB)

Preview of image 'cracklebobs.png'
cracklebobs.png


 

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