|
|
About a year ago I was playing some with an idea for a facets normal
perturbation.
Ref:
https://news.povray.org/povray.pov4.discussion.general/thread/%3C652b157c%40news.povray.org%3E/
As part of that work I mentioned using the population count opcode in
most modern processors as part of a creating a normal-ish /
sloppy-Gaussian distribution of not more than 64 values.
I had the thought at the time, we could probably extend the technique to
random noise generation too.
Release (R16) of yuqk is adding a new inbuilt function called
f_popnrm_rnoise(). Attached is an image of the +-1 noise created (no AA)
and a histogram of the value distribution.
pigment {
function { f_popnrm_rnoise(x,y,z,now,1) }
function_interval
color_map {
[-1.0 rgb 0]
[+1.0 rgb 1]
}
}
The steps of the technique are certainly visible, but for a really fast,
normal-ish, random, noise distribution - I think it will often be useful.
Bill P.
Hmmm, I wonder what happens if I use this directly as an isosurface
function... To a first order, renders a noisy shape constrained by the
container. Relatively quick, but HUGE max gradients need be ignored. :-)
Mind running - what if we stick this noise only inside more usual shape
functions or inbuilt shapes as part of a function. I bet they'd all show
up... Anyhow. More play to be had I guess.
Post a reply to this message
Attachments:
Download 'f_popnrm_rnoise_story.png' (149 KB)
Preview of image 'f_popnrm_rnoise_story.png'
|
|
|
|
On 11/1/24 08:40, William F Pokorny wrote:
> Mind running - what if we stick this noise only inside more usual shape
> functions or inbuilt shapes as part of a function. I bet they'd all show
> up...
Attached an image where I filled text object characters with noise as a
function for an isosurface. Here not that fast because the inside test
for a single text string like "Halloween" is slow.
#declare Fn01 = function {
pattern {
bool_object { // In POV-Ray proper this called 'object'
text { // yuqk has also list_object etc.
ttf "timrom.ttf" "Halloween"
0.15, 0.001
translate <-2.0,0,0>
}
}
}
}
#declare Fn02 = function (x,y,z) {
(Fn01(x*3,y*3,z*3) > 0.0)*f_popnrm_rnoise(x,y,z,now,1)
}
No real shape - just enough +-noise that the isosurface root finder
finds plenty of roots.
Bill P.
Post a reply to this message
Attachments:
Download 'fillewithnoise.png' (78 KB)
Preview of image 'fillewithnoise.png'
|
|
|
|
On 11/1/24 15:11, William F Pokorny wrote:
> No real shape - just enough +-noise that the isosurface root finder
> finds plenty of roots.
Playing now and again with this idea. I wondered how the roots /
surfaces bits from the 'random noise filling' would affect normals and
finish. They still work in a noisy way. Interesting effects in any case.
Just a quilted normal used in the attached images. On my i3 the top
image took about 20 seconds elapsed the bottom roughly 30 with mid to
light AA and simple radiosity.
Bill P.
Post a reply to this message
Attachments:
Download 'filledwithnoise.png' (157 KB)
Preview of image 'filledwithnoise.png'
|
|