POV-Ray : Newsgroups : povray.general : Wave Forms and Normal/Pigment Patterns ? Server Time
5 Nov 2024 13:25:28 EST (-0500)
  Wave Forms and Normal/Pigment Patterns ? (Message 1 to 10 of 10)  
From: Ken
Subject: Wave Forms and Normal/Pigment Patterns ?
Date: 10 Sep 1998 09:40:33
Message: <35F7C841.988E0488@pacbell.net>
Howdy all !

    I have a question about the wave and ripple patterns that
are used in POV-Ray. It is evident that both use a concentric
method of implementation. That is to say they form like drop
rings in a pond.

    This is great for modeling fish ponds and swimming
pools but really makes it difficult to accurately model straight
line waves as would be produced by a boat or the typical
wave/swell pattern in the ocean. Certainly you can argue that
the ocean has a multitude of cross patterns and I won't argue
with you. But there have been days when I was out fishing
on the ocean and the swells were very smooth and seemingly
very straight.

    Is there a wave form now available in Pov that I have missed
that will allow a straight sine wave type pattern ?
    I checked the docs and if it's in there I somehow missed it.

If it's not now available should it be added ?

Would it be difficult to implement a normal pattern like this ?

See below for a list of supported pattern types I compiled from
the docs.

Seeking your answers, impressions, and opinions on this topic.

This list contains what I believe are all 25 wave forms and
normal/pigment patterns available in POV-Ray.

Have I missed any ?

Patterns List:
Agate     Checker   Hexagon   Quilted   Spiral2
Average  Crackle   Leopard   Radial    Spotted
Bozo      Dents     Mandel    Ripples   Waves
Brick     Gradient  Marble    Scalloped Wood
Bumps     Granite   Onion     Spiral1   Wrinkles

Thanks

Ken


Post a reply to this message

From: Peter Popov
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 10 Sep 1998 09:59:55
Message: <35f7cd4b.0@news.povray.org>
Ken,

try the marble patter with sine_wave.

Peter


Post a reply to this message

From: Stephen Lavedas
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 10 Sep 1998 12:29:22
Message: <35F7F0A0.D98DDD20@Ragingbull.com>
How about using a gradient... like this

#declare Waves = 
   texture 
   {   
      pigment
      {
         gradient z
         color_map
         {
            [ 0.0     rgbft <0.254902, 0.243137, 0.784314, 0.0, 0.0> ]
            [ 0.5     rgbft <0.588235, 0.607843, 0.847059, 0.0, 0.0> ]
            [ 1.0     rgbft <0.254902, 0.243137, 0.784314, 0.0, 0.0> ]
         }
      }   
      normal
      {
         gradient <1.0, 0.0, 1.0> , 0.5
         slope_map
         {
            [ 0.0  <0.0 , 0.0> ]
            [ 0.5  <1.0 , 0.0> ]
            [ 1.0  <0.0 , 0.0> ]
         }
      }   
      scale  <0.5, 1.0, 1.0>
   }

Steve

Ken wrote:
> 
> Howdy all !
> 
>     I have a question about the wave and ripple patterns that
> are used in POV-Ray. It is evident that both use a concentric
> method of implementation. That is to say they form like drop
> rings in a pond.
> 
>     This is great for modeling fish ponds and swimming
> pools but really makes it difficult to accurately model straight
> line waves as would be produced by a boat or the typical
> wave/swell pattern in the ocean. Certainly you can argue that
> the ocean has a multitude of cross patterns and I won't argue
> with you. But there have been days when I was out fishing
> on the ocean and the swells were very smooth and seemingly
> very straight.
> 
>     Is there a wave form now available in Pov that I have missed
> that will allow a straight sine wave type pattern ?
>     I checked the docs and if it's in there I somehow missed it.
> 
> If it's not now available should it be added ?
> 
> Would it be difficult to implement a normal pattern like this ?
> 
> See below for a list of supported pattern types I compiled from
> the docs.
> 
> Seeking your answers, impressions, and opinions on this topic.
> 
> This list contains what I believe are all 25 wave forms and
> normal/pigment patterns available in POV-Ray.
> 
> Have I missed any ?
> 
> Patterns List:
> Agate     Checker   Hexagon   Quilted   Spiral2
> Average  Crackle   Leopard   Radial    Spotted
> Bozo      Dents     Mandel    Ripples   Waves
> Brick     Gradient  Marble    Scalloped Wood
> Bumps     Granite   Onion     Spiral1   Wrinkles
> 
> Thanks
> 
> Ken


Post a reply to this message

From: Nieminen Mika
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 10 Sep 1998 13:07:57
Message: <35f7f95d.0@news.povray.org>
Or you can just make something like this:

normal { waves 1 translate x*10000 }

  I use this every time I want straight waves.

-- 
                                                           - Warp. -


Post a reply to this message

From: Ken
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 10 Sep 1998 15:07:55
Message: <35F814F7.F36772CD@pacbell.net>
Nieminen Mika wrote:

>   Or you can just make something like this:
>
> normal { waves 1 translate x*10000 }
>
>   I use this every time I want straight waves.
>
> --
>                                                            - Warp. -

  I've used that method though I will admit I never
tried 10000*x before. It does help flatten out the
curves since they are only view able in a certain
area of the scene.

It was the whole section in the docs that I missed
describing the use of wave types. My brain leaked
or something.

    Anyway I have come to the conclusion that
surface normals are a poor replacement for a
physical object that has the right shape.
    I've decided that rather than trying to imitate
water and wavy surfaces, with planes and surface
normals, I'm going to be a rebel and figure out a
procedural, modeled, methodology for creating
these surfaces that elude me.

Thanks for the tips people.

Ken


Post a reply to this message

From: Hans-Detlev Fink
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 11 Sep 1998 08:10:28
Message: <35F904CC.D8C@pecos.n.o-s.p.a.m.de>
Ken wrote:
> 
> Nieminen Mika wrote:
> 
> >   Or you can just make something like this:
> >
> > normal { waves 1 translate x*10000 }
> >
> >   I use this every time I want straight waves.
> >
> > --
> >                                                            - Warp. -
>

[ . . . ] 

>     Anyway I have come to the conclusion that
> surface normals are a poor replacement for a
> physical object that has the right shape.
>     I've decided that rather than trying to imitate
> water and wavy surfaces, with planes and surface
> normals, I'm going to be a rebel and figure out a
> procedural, modeled, methodology for creating
> these surfaces that elude me.
> 
> Thanks for the tips people.
> 
> Ken


Ok, then I'd start with the iso-patch. Should be
easy to create e.g. a box with one sinusoidally 
rippled side. Unfortunately it is only available 
for POV 3.02.

-Hans- 


-----
Remove n.o-s.p.a.m. to obtain my real address.
-----

================================
In seeking the unattainable,
simplicity only gets in the way.
-- ACM SIGPLAN Sept. 1982
================================


Post a reply to this message

From: Nieminen Mika
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 11 Sep 1998 09:11:11
Message: <35f9135f.0@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
:     Anyway I have come to the conclusion that
: surface normals are a poor replacement for a
: physical object that has the right shape.
:     I've decided that rather than trying to imitate
: water and wavy surfaces, with planes and surface
: normals, I'm going to be a rebel and figure out a
: procedural, modeled, methodology for creating
: these surfaces that elude me.

  I think is very easyly done with bezier patches (if you know how they work).

-- 
                                                           - Warp. -


Post a reply to this message

From: Dan Connelly
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 11 Sep 1998 22:50:43
Message: <35F9D357.94054055@flash.net>
Ken wrote:
>     Anyway I have come to the conclusion that
> surface normals are a poor replacement for a
> physical object that has the right shape.

Normals are good for fine details, but not a replacement
for macroscopic shape.

It is pointless to reproduce pixel-level features with
shape modeling.... so the normals are still needed.

But for water and many other quasi-planar structures,
height fields are the method of choice.  They can
easily be created within POV.  A sample is appended
for what was an attempt by me to create a cobblestone
path.... note it is to be rendered at a 1:3 aspect ratio
(for example, +W200 +H600).  Note I use a bit of
a color map to flatten out the stones.

BTW I ended up going to a more standard tiled brick
GIF field..... the result (rendered in Vue d'Esprit 2)
is at  :

http://www.flash.net/~djconnel/Vue/Vue2_004.jpg


=======================

#version 3.1

////////////////////////////////////////////////////////
// Render settings and cameras

global_settings {
   hf_gray_16
   ambient_light 1
}


// define the camera
camera {
  orthographic
  location <0, 0, -5>
  right  <50,0,0>
  up     <0,150,0>
}


///////////////////////////////////////////////////
// pattern


 plane {
  <0, 0, -1>     // surface normal
  0             // distance from origin
  texture {
    pigment {
      crackle
      turbulence 0.1 
      color_map {
        #local dX = 0.05;
        #local  X = 0
        #while (X < 1 + dX/2)
          [X rgb sin(pi * pow(X,0.5) / 2)]
          #declare X = X + dX;
        #end
      }
    }
    finish {
      ambient 1
      diffuse 0
    }
  }
}

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

From: Dan Connelly
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 11 Sep 1998 23:01:25
Message: <35F9D5D9.44179989@flash.net>
Ken wrote:

>     This is great for modeling fish ponds and swimming
> pools but really makes it difficult to accurately model straight
> line waves as would be produced by a boat or the typical
> wave/swell pattern in the ocean.

Wrinkles are popular.

But there is nothing wrong with wave and ripple patterns.
The key is to superpose them.  My effort at POV water
used only ripple patterns and averages in a height field:

http://www.flash.net/~djconnel/POV/tn_moon2_jpg.jpg

Dan

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

From: ReVerSi
Subject: Re: Wave Forms and Normal/Pigment Patterns ?
Date: 12 Sep 1998 03:52:47
Message: <35FA19FA.7C94@t-online.de>
Ken wrote:
> ..............
>     Anyway I have come to the conclusion that
> surface normals are a poor replacement for a
> physical object that has the right shape.
>     I've decided that rather than trying to imitate
> water and wavy surfaces, with planes and surface
> normals, I'm going to be a rebel and figure out a
> procedural, modeled, methodology for creating
> these surfaces that elude me.
> 
> Thanks for the tips people.
> 
> Ken

Hello,

just another way to do that, is taking heightfields: I've set up for
this purpose an arrangement for creating any .tga files in PoV-Ray,
which in turn I can import into leveller, where I can combine and modify
them, just as I like it (average, sum, difference, partial smoothing,
random noise and and and...) Nearly everything is possible by doing so.

I've generated a primarily still water surface with exactly two centres
of interfering waves by this way. It looks fine. (Image available on
request.)

The setup of the initially used PoV code is something like follows (for
to be used without any additional light source):

//Pov code

camera
{orthographic 
  location  <0.0, 1.0, 0> 
  direction -y           
  up        z                
  right     x            
  look_at   <0.0, 0.0,  0.0> 
}


plane {y, 0 texture{onion texture_map{     //for wave damping [optional]
       [0 pigment {onion color_map{[0, Black]  //for straight waves take
                                   [1, White]} //gradient pattern
                              frequency 18     //play around with this 
                              sine_wave}       //values
                              finish {ambient 1}]
       [1 pigment {Black}
          finish {ambient 1}]      }
              frequency 0.75 sine_wave phase 0.9}
               translate <-0.1, 0, 0.065>
                    }

//End of PoV code


Hope this helps

ReVerSi


Post a reply to this message

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