POV-Ray : Newsgroups : povray.binaries.images : worley noise (not POV-Ray) : Re: worley noise (not POV-Ray) Server Time
1 Apr 2025 16:38:07 EDT (-0400)
  Re: worley noise (not POV-Ray)  
From: ingo
Date: 24 Mar 2025 12:05:00
Message: <web.67e182a083b3e9b417bac71e8ffb8ce3@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "ingo" <nomail@nomail> wrote:
> > A plane cut ...
>
> to reveal new rabbit holes.. :-)

My main problem (rabbit hole) was to come up with a Hash macro. But this morning
I thought, POV-Ray has deterministic noise. Use that.

- Shoot ray at point.
- floorInt floorInt ... for as many dimensions you neeed (POV: 3) and get to the
cell corners.
- Get noise values at corners an use them to come up with a feature point in
that cell. (this I do now by hashing the coordinates of the point and a seed)
- Do it for all the neighbour cells.
- for reuse, stick cell id and feature point in a small Least Recently Used
(LRU) Cache. One only needs to cache ~ 10 points to be near the optimum
speed/memory. That (rabbit hole) will be quite a thing to code with lots of
array's doubly linked lists etc. and might not be faster that recalculation.
- from there on you can do the usual sorted / minimum distance thing for Worley
noise.

ingo


Post a reply to this message

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