POV-Ray : Newsgroups : povray.newusers : Noobie Question Re: Drawing a river : Re: Noobie Question Re: Drawing a river Server Time
30 Jul 2024 02:16:16 EDT (-0400)
  Re: Noobie Question Re: Drawing a river  
From: Stefan Viljoen
Date: 28 Oct 2004 15:44:29
Message: <41814c1b@news.povray.org>
cobrav10 wrote:

> Hi all,
> 
> Am very new to Povray and am trying to draw a scene of a river flowing
> through a desert.  I have looked at the tutoials and am up on the sand and
> water texture stuff, but am unsure how to draw the river and ground
> surfaces.  My thoughts are;
> 
> draw 2 planes, 1 for the river and 1 for the ground.
> Apply isosurfaces of the texture to them and try to have the ground (bumpy
> so bits are higher than the water.
> Where the water plane intersects the ground (apply I think the intersect
> command) so only the water intersected by the ground (that region) is
> displayed.
> 
> Am I on the right track??
> 
> Thanks for any help.

Whoops, sorry. Here is the heigtfield source file and some relevant code.

camera {
   //*PMName scenecam
   perspective
   location <-4.67182, 2.77695, -9.20606>
   sky <0, 1, 0>
   direction <0, 0, 1>
   right <1.3333, 0, 0>
   up <0, 1, 0>
   look_at <-2.82934, 1.07086, -0.537524>
   angle 45
}

global_settings {
   adc_bailout 0.05
   max_trace_level 5
   max_intersections 1024
}
//*PMRawBegin
//Standard Includes
#include "stdinc.inc"
#include "kolors/kolors.inc"
#include "textures.inc"
#include "stones.inc"
#include "metals.inc"

union {
   //*PMName heightfields
   
   height_field {
      //*PMName GroundField
      png "/home/rylan/povray-3.6/scenes/botanica_hf.png"
      smooth
      
      material {
         texture {
            pigment {
               agate
               agate_turb 0.5
               turbulence <0, 0, 0>
               scale 0.1
               
               color_map {
                  [ 0 color rgb <0.407843, 0.345098, 0.121569>
                  ]
                  [ 0.25 color rgb <0.596078, 0.513725, 0.207843>
                  ]
                  [ 0.5 color rgb <0.458824, 0.392157, 0.156863>
                  ]
               }
            }
         }
      }
      
      finish {
         diffuse 0.65
         crand 0.175
      }
      scale <20.062, 1.131, 15.919>
      rotate <0, 0, 0>
      translate <-9.46667, 0, -6.8>
      hollow false
   }
   
   height_field {
      //*PMName WaterField
      png "/home/rylan/povray-3.6/scenes/botanica_hf.png"
      smooth
      
      material {
         texture {
            pigment {
               agate
               agate_turb 0.5
               turbulence <0, 0, 0>
               scale 0.1
               
               color_map {
                  [ 0 color rgbft <0.054902, 0.90196, 0.81569, 0.2, 0.45>
                  ]
                  [ 0.25 color rgbft <0.054902, 0.6902, 0.90196, 0.2, 0.35>
                  ]
                  [ 0.5 color rgbft <0.10196, 0.49804, 0.63137, 0.2, 0.25>
                  ]
               }
            }
         }
         
         interior {
            ior 1.45
            caustics 0.1
         }
      }
      
      normal {
         ripples
         0.15
         turbulence <0.1, 0.1, 0.1>
         bump_size 0.15
      }
      
      finish {
         ambient rgbt <0.45, 0.45, 0.45, 0.25>
         diffuse 0.45
         brilliance 0.25
         roughness 0.2
         reflection rgb <0.3, 0.3, 0.3>
         crand 0.175
      }
      scale <20.062, 0.157, 14.78>
      rotate <0, 0, 0>
      translate <-9.4667, 0.2, -6.1874>
      hollow false
   }
}

-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message


Attachments:
Download 'botanica_hf.png' (33 KB)

Preview of image 'botanica_hf.png'
botanica_hf.png


 

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