|
|
On 9/13/20 6:36 PM, Uncle Josh wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
>>
>> I've likewise tried many times in the past to 'reverse' or 'un-do' turbulence
>> (in various ways), but it never worked. If it's even possible, a workable scheme
>> would be quite useful.
>
> The pigment_pattern works, at least, because it isn't applying a texture within
> a texture. The pigment_pattern creates a grayscale pattern (it will convert
> normally colored patterns to grays) that the texture map. It's not trying to
> undo turbulence, the turbulence isn't applied to the underlying pattern to begin
> with.
>
> Uncle Josh
>
An alternative method to move the turbulence into its own evaluation
space would be something like:
#declare Fn = function { pattern { gradient x turbulence 0.2 } }
#declare Burning_Texture =
texture {
function { Fn(x,y,z) } // Defining function above.
// It would be convenient if we could code:
//function { pattern { gradient x warp { turbulence 0.2 } } }
// but it's not supported. Perfectly OK inline is:
//function { 1.0 } // or any in-vm coding. Useful for map debug
Kenneth, On the reverse or undo turbulence. Isolating the turbulence
(possibly other warp types too) or planning for native/partly unwound
versions initially, I expect usually better - even if we could work out
a generic unwind of some sort.
Related: I've been playing around with modifying the behavior of
turbulence in povr and so created the following test case. You can,
effectively,later undo(update) traditional turbulence(1), but not warp{
turbulence }(2).
#declare P00 = pigment { checker scale 1/6}
#declare P00t = pigment { P00 turbulence <.2,0,.2> }
#declare P01t = pigment { P00t turbulence <0,0,0> }
#declare P10t = pigment { P00 warp { turbulence <.2,0,.2> } }
#declare P11t = pigment { P10t warp { turbulence <0,0,0> } }
#declare P20t = pigment { P00t warp { turbulence <.2,0,0.2> } }
#declare P21t = pigment { P20t warp { turbulence <.2,0,0.2> } }
#declare P30t = pigment { checker
warp { turbulence <.2,0,.2> } scale 1/6 }
#declare P31t = pigment { checker
scale 1/6 warp { turbulence <.2,0,.2> } }
#declare P40t = pigment { checker turbulence <.2,0,.2> scale 1/6 }
#declare P41t = pigment { checker scale 1/6 turbulence <.2,0,.2> }
#declare P50t = pigment { P40t turbulence <0,0,0> }
#declare P51t = pigment { P41t turbulence <0,0,0> }
plane { +y, 0 pigment { P11t } }
// P00 - checker pattern scaled.
//
// P00t - apply turbulence using P00 as base.
//
// P01t - Reset old style turbulence by setting the turbulence vector
// to 0.
//
// P10t - Similar to P00t, but turbulence applied after scale due warp{}
//
// P11t - You cannot null warp {turbulence}. The warp list gets copied
// as can be seen by rendering P20t, P21t.
//
// P20t - The warp list gets copied to new 'patterns' and extended here
//
// P21t - Copy warp list and extend again.
//
// P30t/P31t - Checking that warp{} order relative to scale matters.
//
// P40t/P41t - Checking that traditional warp order relative to scale
// irrelevant.
//
// P50t/P51t - Checking that traditional warps can be zeroed / updated
// no matter the original specification order.
//
Bill P.
(1) - Turbulence vector, octaves, omega and lambda.
(2) - Might a method to clear a pigment/texture/material's warp list be
useful?
Post a reply to this message
|
|