POV-Ray : Newsgroups : povray.general : Suggestions: patterns, warps, modifiers Server Time
2 Nov 2024 03:14:11 EDT (-0400)
  Suggestions: patterns, warps, modifiers (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Peter Popov
Subject: Suggestions: patterns, warps, modifiers
Date: 2 Jun 1999 18:25:13
Message: <3758a0cb.14568214@news.povray.org>
Greetings to all.

With all the ongoing talk on requested new features in POV 3.5 , I
thought I could share my ideas, too. I am starting a new thread as
this is OT from the "POV 3.5 Ideas" thread started May 27 by Chris
Huff.

The first request I have is for a new pattern types. It should work in
a way similar to crackle, but the user should be able to explicitly
position the centers of attraction. These points must lie within the
unit cube and this 3D pattern will be tiled in 3D to fill up the whole
space. For example, if you specify these points:

<0,0,0>, <0.5,0.5,0.5>

you should get a pattern similar to a body-centered cubic crystal
lattice (like that of Fe, iron). These:

<0,0,0>, <0.5,0.5,0>, <0.5,0,0.5>, <0,0.5,0.5>

should give a face-centered cubic lattice.

If you take a look at my Biofractal picture I posted a couple of weeks
ago, you will see a rather weird application of the crackle pattern.
There's media inside the julia fractal with a crackle density, the
color map of which has a very slim opaque band from 0 to 0.05 and the
rest is clear. You can clearly notice the crackle pattern "lattice".
It can sometimes be useful to have this done in a non-random,
user-specified way, for example in modeling crystalline structures.

This pattern should have a 2D version, too. It should consist of
"prisms" that extend parallel to one of the coordinate axes, say z,
just like wood, marble, image_map are actually 2D patterns extended
along the z axis.

I suggest the names lattice3 and lattice2 respectively. I can also
suggest syntax, but I want to see if this idea will get anywhere at
all.

The next request I have is for a new warp type - the "twist" or
"twirl" or "whirlpool" warp. Basically, it will create a local
whirlpool effect on a pattern. The center of the whirlpool should be
specified by the user, as well as an optional repeat vector and
turbulence, as in the black_hole warp. Next the vector normal to the
plane of "whirling" should be specified. The maximum angle of
displacement (when distance to the whirlpool center approaches zero)
should be specified, too. The radius of influence, identical to that
of the black_hole warp, should be specified, as well as the strength
falloff function. A pseudo-code formula is provided below:

distance = vlen (currentPoint-whirlCenter);
if (  distance <= whirlRadius )
  realPatternValue =  getPatternValue ( vaxisrotate (currentPoint -
  whirlCenter, whirlNormalVector, whirlMaxAngle * falloffFunction (
  distance ) ) + whirlCenter );

If this is unclear (it is messy for sure), please feel free to ask me.

The last (for now) request I have is for a new pattern modifier. It
should specify the falloff function of any property that falls off
with distance. This light intensity throughout the cross-section of a
spotlight or cylindrical light, black_hole strength falloff, light
falloff, light attenuation by distance or media and fog, rainbow
falloff angle, and any others that I can't think of from the top of my
head.

Any continuous function should be a valid falloff function. In halos
we had linear, cubic and poly, but sin, cos, exp, log,  pow and others
should be allowed, too. Some functions may require additional
modifiers, such as log base or sine frequency multiplier and phase.

Any number of falloff function modifiers could be used, the final
result being the product of the individual results of all of them.

I think there are many possible uses for this modifier. For example, a
radial pattern with a twist warp and falloff functions sin and linear
will result in something looking like a Mayan sun. Or, if two point
light sources use sine functions for their distance falloff, we can
observe an interference pattern on a screen. The artistic applications
of this may exceed the scientific and/or photorealistic ones, but art
is a major application of POV (as well as having fun :) )

As usual, any suggestions, comments, criticism etc. are welcome.

Best regards to all.

Peter Popov
ICQ: 15002700


Post a reply to this message

From: Margus Ramst
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 2 Jun 1999 20:36:52
Message: <3755c014.0@news.povray.org>
These seem like relatively simple and potentially useful features. One thing
about the twirl warp, tho. You seem to imagine the effect as a cylindrical
one, i.e. it extends infinitely in the direction perpendicular to the "twirl
plane". This might have unwanted effects, like the warp appearing on the
other side of the object.
My head isn't working in 3D right now; couldn't this warp be spherical, like
the black hole, with the twirl applied from all directions towards the
center?
Ouch, I hurt my brain trying to imagine that...

Margus


Post a reply to this message

From: Chris Huff
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 2 Jun 1999 21:35:55
Message: <3755CEB2.F9FD7FA4@compuserve.com>
>I suggest the names lattice3 and lattice2 respectively. I can also
suggest syntax, but I want to see if this idea will get anywhere at
all.<
Why not crystalline and prismatic?

All of these are good ideas, and I hope someone will put them into a
patch to be included in POV 3.6 or 4.0 or whatever. (If it is too late
for 3.5. I have heard very little information on the progress of that
version. Any hints?)


Post a reply to this message

From: Peter Popov
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 3 Jun 1999 01:14:04
Message: <3755fdc2.38371480@news.povray.org>
On Thu, 3 Jun 1999 02:34:30 +0300, "Margus Ramst" <mar### [at] peakeduee>
wrote:

>These seem like relatively simple and potentially useful features. One thing
>about the twirl warp, tho. You seem to imagine the effect as a cylindrical
>one, i.e. it extends infinitely in the direction perpendicular to the "twirl
>plane". This might have unwanted effects, like the warp appearing on the
>other side of the object.

You are right. 

How about... if all falloff functions can have an optional axis
specified? The values will then fall off in one direction, i.e. the
equipotential surfaces will be planes as opposed to spheres. All we
need is take a projection of the vector from the center of the
"whatever we are modifying the falloff of" to the point in question
and project it onto the axis (do a dot product with the normalised
axis vector)? 

>My head isn't working in 3D right now; couldn't this warp be spherical, like
>the black hole, with the twirl applied from all directions towards the
>center?

Maybe. If the plane of twirling is the plane through the center of the
twirl and perpendicular to the plane defined by the current camera ray
and twirl center.

>Ouch, I hurt my brain trying to imagine that...

I suppose it won't work in 3D as expected. I'll think some and if I
Can come up with anyting I'll render it into a df3

>Margus


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Ron Parker
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 3 Jun 1999 10:27:09
Message: <375682ad.0@news.povray.org>
On Wed, 02 Jun 1999 21:23:38 GMT, Peter Popov wrote:
>The next request I have is for a new warp type - the "twist" or
>"twirl" or "whirlpool" warp. Basically, it will create a local
>whirlpool effect on a pattern.

Oddly enough, the 3.0 source had some of the support code for a 
so-called "spiral" warp, but it was never implemented.  The code 
was removed in 3.1.

All of these ideas, with the possible exception of the falloff
stuff, are very easy to implement.  The crystalline lattice 
could be implemented as yet another patch to the crackle 
pattern - I would say a syntax something like 

crackle {
  centers {2, <0,0,0>, <.5,.5,.5>}
}

but with a better keyword than "centers", of course.  I had thought 
at one time of making crackle 2d as well, but with the planar warp in 
the new superpatch such a thing is redundant.


Post a reply to this message

From: Gilles Tran
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 3 Jun 1999 12:56:35
Message: <3756A647.9A0DC55B@inapg.inra.fr>
Note that the isosurface function can be used to create pigment patterns
too. This is a very promising and interesting possibility that few people
seem to have investigated so far (I didn't either). New built-in pattern
types like those already in the superpatch would be nice of course.

Gilles

Ron Parker wrote:

> Oddly enough, the 3.0 source had some of the support code for a
> so-called "spiral" warp, but it was never implemented.  The code
> was removed in 3.1.
>
> All of these ideas, with the possible exception of the falloff
> stuff, are very easy to implement.  The crystalline lattice
> could be implemented as yet another patch to the crackle
> pattern - I would say a syntax something like
>
> crackle {
>   centers {2, <0,0,0>, <.5,.5,.5>}
> }
>
> but with a better keyword than "centers", of course.  I had thought
> at one time of making crackle 2d as well, but with the planar warp in
> the new superpatch such a thing is redundant.


Post a reply to this message

From: Margus Ramst
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 4 Jun 1999 17:12:46
Message: <3758414e@netplex.aussie.org>
Peter Popov wrote in message <3755fdc2.38371480@news.povray.org>...
>
>You are right.
>
>How about... if all falloff functions can have an optional axis
>specified? The values will then fall off in one direction, i.e. the
>equipotential surfaces will be planes as opposed to spheres. All we
>need is take a projection of the vector from the center of the
>"whatever we are modifying the falloff of" to the point in question
>and project it onto the axis (do a dot product with the normalised
>axis vector)?
>

Thet might do the trick on more-or-less planar surfaces. But when the
surface has steep curvature, I imagine you would see a strange pattern since
the amount of twirl is different at different heights. Hmm... The spiral
would start curving back towards the original position as the twirl falls
off... I think.

>
>Maybe. If the plane of twirling is the plane through the center of the
>twirl and perpendicular to the plane defined by the current camera ray
>and twirl center.
>

Reread the sentence and say it isn't confusing :) I believe I'm rephrasing
what you said, but here's how I imagine it. The twirl plane would be defined
by 3 points: camera location, warp center and current intersection point.
Twirl axis - the normal vector of this plane.
The question is, how would this behave in an animation?


Margus


Post a reply to this message

From: Peter Popov
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 4 Jun 1999 23:59:41
Message: <375a9e93.26520084@news.povray.org>
On Sat, 5 Jun 1999 00:09:52 +0300, "Margus Ramst" <mar### [at] peakeduee>
wrote:

<snip>

>Thet might do the trick on more-or-less planar surfaces. But when the
>surface has steep curvature, I imagine you would see a strange pattern since
>the amount of twirl is different at different heights. Hmm... The spiral
>would start curving back towards the original position as the twirl falls
>off... I think.

OK, I will try to cook up an example using the GIMP to animate a twirl
effect and I'll make a .df3 out of it. We'll see what happens. I'd
attack the POV code since this patch doesn't seem that hard, but the
semester just ended and exams are on their way now, so...

>>Maybe. If the plane of twirling is the plane through the center of the
>>twirl and perpendicular to the plane defined by the current camera ray
>>and twirl center.
>>
>
>Reread the sentence and say it isn't confusing :) I believe I'm rephrasing
>what you said, but here's how I imagine it. The twirl plane would be defined
>by 3 points: camera location, warp center and current intersection point.
>Twirl axis - the normal vector of this plane.

No, the _plane_ of twirling is perpendicular to this 3-points-defined
plane, not the _normal vector_ of the twirl.

>The question is, how would this behave in an animation?

Dunno. It will mostly trry to face the camera, methinks. Will look a
little as if the image has been post-processed.

>Margus



Peter Popov
ICQ: 15002700


Post a reply to this message

From: Peter Popov
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 5 Jun 1999 00:09:53
Message: <375ba175.27258185@news.povray.org>
On 3 Jun 1999 09:27:09 -0500, par### [at] fwicom (Ron Parker) wrote:

>Oddly enough, the 3.0 source had some of the support code for a 
>so-called "spiral" warp, but it was never implemented.  The code 
>was removed in 3.1.

Nooo... don't tell me they gave it up! :(

>All of these ideas, with the possible exception of the falloff
>stuff, are very easy to implement.

The falloff stuff requires too much fiddling, you are right. Mainly
the parser part, I think. I have to look at the code once again.

>The crystalline lattice 
>could be implemented as yet another patch to the crackle 
>pattern - I would say a syntax something like 
>
>crackle {
>  centers {2, <0,0,0>, <.5,.5,.5>}
>}

Well, I think it should have a new syntax as it will have several
parameters that don't fit into crackle at all. I'll post a sample
syntax later today.

>but with a better keyword than "centers", of course.  I had thought 
>at one time of making crackle 2d as well, but with the planar warp in 
>the new superpatch such a thing is redundant.  

Cracke2d would be much faster than planar warped crackle 3d , don't
you think?


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Margus Ramst
Subject: Re: Suggestions: patterns, warps, modifiers
Date: 5 Jun 1999 13:37:39
Message: <37596063@netplex.aussie.org>
Peter Popov wrote in message <375a9e93.26520084@news.povray.org>...
>
>No, the _plane_ of twirling is perpendicular to this 3-points-defined
>plane, not the _normal vector_ of the twirl.
>


But there can be an infinite number of such planes. You mean the one facing
the camera?
OK, but this would still look weird if the surface is at a shallow angle
towards the camera, i.e. the axis of rotation is near-parallel to the
surface. Since the warp would actually still be cylindrical, this would
result in a blocky gradient displacement of colur, not a "whirlpool"
pattern.
I believe a user-defined axis of twirl would be the best way to go; I can
think of no efficient way of taking into account surface topography when
applying a basically 2D pattern to a 3D surface.

Margus


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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