|
|
On 6/8/24 15:12, William F Pokorny wrote:
> I've been playing with 'facets' and 'crackle' of late. I've turned up a
> bug (or two) (*).
>
> Documenting now - partly so I can think through what I'm seeing as I write.
>
> The crackle pattern and facets perturbation maintain thread local
> storage so information can be cached in a thread safe way.
>
> The issue, I think, is that that storage is set up to work with one
> crackle and/or facets use per thread and no more.
>
> Once we run >1 of either in the same thread they share the thread local
> storage. This >1 usage per thread happens, for example, when we layer
> textures both based upon crackle
An update for those who might follow at some later time...
I think I've finished the re-write of the crackle pattern with a simpler
fixed size, per thread cache (for other than ip_solid on) which tracks
the pattern along with the center cube location. To be released in
yuqk(R16).
In testing the new code I discovered the 'repeat' feature of v3.8 beta 2
has a self cache collision issue at the origin in addition to the cache
collision issues of multiple crackle patterns within a thread.
For the attached images the scene set up is a large disc with a hole.
Within the hold there is a second smaller disc which doesn't quite fill
the hole. The rose color is the background seen through a gap. The outer
disc crackle pattern is scaled very small, but is otherwise the default
crackle.
The repeat, self, cache collision bug of v3.8 beta 2 is shown in the
upper left. I didn't chase a fix.
The image in the upper right is the version of yuqk I released in July
(R15) where, by hack, I disabled the crackle caching. The crackle
implementation is still what is in V3.8 beta 2. The repeat works as I
thin clipka intended!
In the lower left showing my development yuqk re-write, crackle repeat
feature result. Yes, its different than v3.8. I didn't like the
complexity and cost of the v3.8 implementation and went with something
simpler (I avoided the self cache repeat bug by chance...). With yuqk
(R16) the pattern flipping would be done with warp { repeat }(s).
The lower right is there just to fill out the 4x4! It shows the use of
a, new to yuqk, crackle ip_seed feature to change the inner disc's
ip_solid result. I added ip_seed to make it easier to get different
crackle looks on different shapes otherwise using the same crackle
pattern specification.
Bill P.
Aside 1: What is the repeated pattern on the outer disc seen in the v3.8
top row? It's a side effect of the more limited accuracy of the hashing
mechanism used to create the per cube point offsets in the v3.8 code. I
believe I changed things so this type of artifact is much less likely
with yuqk.
Aside 2 (*): Why is yuqk's lower left image a little brighter than
v3.8s? One of the aspects of the traditional POV-Ray crackle cube point
offsets is that they work from a starting corner. This produces a result
which, to my eye, creates too many pinched regions in the pattern's
result. With the yuqk re-write the offsets are done from the cube center
in a +-(0.0 to 0.49) way. Less pinching, more white area, brighter image...
(*) - This yuqk change unexpectedly created a sampling issue where, when
scaling the crackle pattern very small, the crackle's inner cube nature
becomes more quickly apparent when anti-aliasing is off. It's a kind of
harmonic of rays with the underlying, less pinched crackle pattern. It's
not an issue when AA is used.
Post a reply to this message
Attachments:
Download 'v38b2_repeat_at_origin_bug.pov.txt' (1 KB)
Download 'v38_repeat_at_origin_bug.png' (358 KB)
Preview of image 'v38_repeat_at_origin_bug.png'
|
|