POV-Ray : Newsgroups : povray.newusers : Noobie Question Re: Drawing a river Server Time
1 Nov 2024 23:16:13 EDT (-0400)
  Noobie Question Re: Drawing a river (Message 1 to 8 of 8)  
From: cobrav10
Subject: Noobie Question Re: Drawing a river
Date: 28 Oct 2004 00:20:01
Message: <web.418072e4f84505497f92ae050@news.povray.org>
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.


Post a reply to this message

From: Mark Ulrich
Subject: Re: Noobie Question Re: Drawing a river
Date: 28 Oct 2004 02:40:00
Message: <web.418093c675c5273822326fc10@news.povray.org>
> Am I on the right track??
>
> Thanks for any help.

Hi,

this often is realized with heightfield.

This is a Picture you "paint" with Gimp or Windows-Paint.

Povray the calculates the height depending on the Color-value of a pixel.

I just finished a first version of a tool, that simplifies this a bit.

Screenshot:
http://bilder24.parsimony.net/forum54930/wxbasic/_povfront02/worldgenerator.jpg

Download:
http://povfront.sourceforge.net

It uses macros from another Project (terraform), what is good to learn from
by reading the povray-includefiles.

Greets, Mark


Post a reply to this message

From: Stefan Viljoen
Subject: Re: Noobie Question Re: Drawing a river
Date: 28 Oct 2004 15:40:57
Message: <41814b46@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??

See the attached picture for my river implementation. I simply used a
hightfield. Also find attached the source file for the heightfield. In  a
sense, your idea with the planes will work fine - my "water surface" is
merely the same heightfield displaced a bit upward and moved so a different
part of it is visible. And textured differently, of course!



-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message


Attachments:
Download 'botanica.jpg' (40 KB)

Preview of image 'botanica.jpg'
botanica.jpg


 

From: Stefan Viljoen
Subject: Re: Noobie Question Re: Drawing a river
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


 

From: Stephen McAvoy
Subject: Re: Noobie Question Re: Drawing a river
Date: 28 Oct 2004 15:46:35
Message: <k4j2o09qu00621hvc0rcc2tibp19ua874c@4ax.com>
On Thu, 28 Oct 2004 21:44:31 +0200, Stefan Viljoen
<ryl### [at] intekomcoza> wrote:

>See the attached picture

Stefan, before anyone else says anything binaries (that is images
etc.) should be posted in povray.binaries.images If you cancel this
post then re post it everyone will be happy.
BTW nice stream


Regards
        Stephen


Post a reply to this message

From: cobrav10
Subject: Re: Noobie Question Re: Drawing a river
Date: 28 Oct 2004 22:15:00
Message: <web.4181a72675c527387f92ae050@news.povray.org>
Thanks everyone for your help, am now playing with heightfields to draw my
image, will post whne finished for some feedback (This will  be my first
PovRay pic)

Thanks


Post a reply to this message

From: Stefan Viljoen
Subject: Re: Noobie Question Re: Drawing a river
Date: 29 Oct 2004 01:58:14
Message: <4181dbf5@news.povray.org>
Stephen McAvoy wrote:

> On Thu, 28 Oct 2004 21:44:31 +0200, Stefan Viljoen
> <ryl### [at] intekomcoza> wrote:
> 
>>See the attached picture
> 
> Stefan, before anyone else says anything binaries (that is images
> etc.) should be posted in povray.binaries.images If you cancel this
> post then re post it everyone will be happy.
> BTW nice stream

Whoops. 

Faux pas. I'm still relatively new.

Apologies to anyone that took offence.

Thanks Stephen!
-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message

From: Jeff
Subject: Re: Noobie Question Re: Drawing a river
Date: 3 Nov 2004 05:45:00
Message: <web.4188b58675c52738aab3f0cb0@news.povray.org>
Cobrav10 : Yes you are on the right track. I've done this before - also
something similar, a volcano with animated lava flowing down the sides. (I
have this... "thing"... for volcanos and tornados. I grew up in tornado
country, used to chase the darned things).

IF all of the land is higher then the water, then no problem, the water can
just be a plane. HOWEVER if there are "low spots" on the land (nearby
depressions) that are NOT supposed to have water, then you need to clip the
water (or use difference{}, maybe with a big box instead of a plane for the
water). Clip / or make a difference{} between the water (smaller oblong
box) and a replica of a piece of the land (etc).

To animate it, you probably want to use "phase" applied to waves / ripples;
or translate the normals (+texture?) from some point by little steps to
some point until your last point is equivalent to your first. (sorry if
that doesn't make complete sense, I'm tired, past my bedtime).


Post a reply to this message

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