|
|
On 5/21/20 8:32 AM, William F Pokorny wrote:
> On 5/21/20 2:28 AM, Thomas de Groot wrote:
...
>
> I think the right thing to do is to center the distribution by default.
> Provide a new turbplus turbulence which lets folks control more aspects
> of turbulence (scale,direction,...) and a distribution offset.
>
> I'm too lazy to do this with the old default turbulence too, so in povr,
> turbulence and the octaves, omega, lamda backdoor methods to 'create'
> turbulence will become parse errors. The warp {turbulence ...} method
> will become the only supported way for users to create a turbulence
> warp/item.
>
...
An update as much to help me be sure I have things straight in my head
as to document.
First, we are not as bad off as I first guessed. All of the vector
related turbulence uses DTurbulence which uses DNoise() and these
already do return a 0.0 centered in a -1 to +1 range. See the attached
image.
This vector behavior is what we want I think. However, it doesn't match
our documentation which says the values are in a 0-1 range for
turbulence. As far as I know there is no user direct access to
non-vector turbulence(1) so even if that were the aim of today's code in
turbulence that's never been what is happening best I can see (some pre
v30 thing maybe?).
(1) - f_vturb() in povr will be this.
I was - more - confused when I posted the initial image. I'd forgotten
that I'd changed my usual axises from +-1 to +-2 - AND scaled the
returned values from Turbulence() by 0.5 trying to see all the
distribution centers. So, the typical distributions from Turbulence
today are all the way out at +4.0 not +2.0 as I said...
---
In a survey of affected code:
The patterns agate, marble, spiral1, spiral2 where turbulence is used
will be getting violent shifts both on use of turbulence where not a
default and on omega changes. Aside: wood uses turbulence too by in x
and y so DTurbulence() and is OK. The plan is to do nothing with the
affected patterns post Turbulence() change unless something pops.
The finish irid feature assumes a 0-1 distribution and does some math to
get a zero centered, -1 to 1 one for further calculation. It hard codes
the turbulence parameters and has omega at 0.5. This feature has some
other issues like lack of ability to scale relative to the incoming
coordinates which will make it tricky to get something which always
works with respect to scene dimensions. The documentation also mentions
irid_amount and I don't see it anywhere in the calculations... I think
given numerical accuracy there should be some >=0 clamping to not
sometimes get negative thicknesses... Anyway work to do here.
Not tested to confirm, but the fog features using turbulence I suspect
are in bad shape. There is a min(1.0,Turbulence(..)... bit used a ouple
places which I believe will make it very hard to get much turbulence
given the distribution center is way the heck out at 4.0 with defaults!
Up front plan is to make no code changes here. I think the Turbulence()
fix will make fog turbulence better.
Bill P.
Post a reply to this message
Attachments:
Download 'storyvectorturbulence.png' (306 KB)
Preview of image 'storyvectorturbulence.png'
|
|