POV-Ray : Newsgroups : povray.general : Flux pattern? : Flux pattern? Server Time
29 Jul 2024 12:22:20 EDT (-0400)
  Flux pattern?  
From: Daniele Varrazzo
Date: 8 Apr 1999 14:20:47
Message: <370ce56f.0@news.povray.org>
Hi.
What about a flux pattern?

The sintax would be

flux
source <3D Vector>
[bidirectional]
[perturb { Normal_Item }]

...something like...

object {
   ThatOby
   pigment {
      flux
      source <3, 1, 4>
      perturb {
         waves 0.5
         scale 10 frequency 20
      }
   }
}

How does it works? For each point where to get the pattern value, you must
calculate the dot product between the surface normal and the point-source
direction, like you were calculating the light amount in that point.
Negative values cropped to 0, like shadows (or inverted if the optional
"bidirectional" keyword is added, something like a "no_shadow")
You could simulate many phisical phenomena, such as dust accumulating on
horizontal surfaces, paint scrapped off from the metal wings of a plane by
the wind... It could also fake the directional tranparency of tissue (if you
put the source in the camera location and make higher flux value partially
filtering... of course a mirror would show the trick).
A long time ago (stare at the sky...) i wrote a fractal landscape generator
where i used to choose the kind of groud by looking at the height and the
slope of each triangle. With texture patterns you could make something
analogous (you can get a glimpse of the result watching the logo of my
homepage at http://members.xoom.com/dvarrazzo/ ).

A texture like this couldn't be used for atmosphere, of course. I think also
normal turbulence wouldn't work well (what does "normal of a surface in a
point that's not on the surface" mean?). But you could add a normal
structure tho the flux syntax (perturb): the normal of the surface won't be
calculated with the object normal but with the pigment one (that can, of
course, be an average of the object's one together with something different)

Internally, each istance of this texture should have a pointer to the object
where it's linked, and that's the hard point (is it really so hard?). Then
the pigment evaluation would call the normal method of the parent object.

I just think it can be useful. Could this be made without rewriting POV from
scratch?
Bye!
:Daniele


Post a reply to this message

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