|
|
In one of the recent threads, Sam mentioned the facets pattern and how
it replaces normals rather than perturbs them in one of its two modes.
It got me thinking how we might get facets like patterns without the
need for picking different facet modes depending on the shape's form and
surface orientation(s).
Attached is an attempt which is perhaps not bad?
It is currently set up by creating regions of constant values a little
like cells or solid crackle, but at the moment based upon povr's
f_hash() and a number of other newer inbuilt functions though which of
those latter might make it into any final code is still somewhat
undetermined.
After the value regions are set up, the 'accuracy' feature of the
normal{} block for normal perturbations based upon scalar value patterns
is used, but with mostly larger than typical settings due the dimensions
of the value regions. Basically, the pattern works by taking samples
from different value regions around the base the raw normal vector on
the surface(*).
(*) The samples would usually come from a scalar value field and not
discrete values.
Yes, this test code is still normal perturbation and not normal
replacement, but I think the direction shows promise(a). Image attached
with a constant, f_hash value regions set up - only changing the
accuracy settings.
(a) - Thinking the end result will probably be both a scalar value
pattern and a normal{} block modification method. Maybe calling it
facets2 or something?
- I've still not played much with the existing facets pattern...
- The larger the accuracy setting the smoother the result, which I
confess, I don't really understand at the moment. But, there is stuff I
think not completely right in the way sampling gets done today - and
there is that magic stuff sitting there in the code too. I need to dig
into it someday.
Bill P.
Aside: Yep, it might be just using crackle as the value pattern works
too and twiddling with accuracy works too - I've not tried it. I'm
trying for something less expensive the crackle(z), but who knows where
it would all come out cost wise.
(z) - The existing normal{} facets pattern itself uses the crackle
pattern internally.
Post a reply to this message
Attachments:
Download 'facetplay.jpg' (558 KB)
Preview of image 'facetplay.jpg'
|
|