POV-Ray : Newsgroups : povray.general : Wave Forms and Normal/Pigment Patterns ? : Re: Wave Forms and Normal/Pigment Patterns ? Server Time
13 Aug 2024 11:15:02 EDT (-0400)
  Re: Wave Forms and Normal/Pigment Patterns ?  
From: Dan Connelly
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

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