POV-Ray : Newsgroups : povray.general : Need a way to make a semi random "landscape". Server Time
27 Apr 2024 19:35:50 EDT (-0400)
  Need a way to make a semi random "landscape". (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Christian Froeschlin
Subject: Re: Need a way to make a semi random "landscape".
Date: 8 Oct 2010 08:31:43
Message: <4caf0f2f$1@news.povray.org>
Chris Cason wrote:

> Yes, that's TB's default for newsgroups. Doesn't seem to make sense to me
> either. I sometimes forget to do a followup to the NG and just hit reply

I've never seen this ... if I reply to a post in the newsgroup it
will post it only to newsgroup. Only problem is I might accidentally
hit Reply All because its the required procedure at work for mail ;)
Currently using TB 2.0.0.24.


Post a reply to this message

From: Cedeaq
Subject: Re: Need a way to make a semi random "landscape".
Date: 10 Oct 2010 00:45:06
Message: <web.4cb144381c813628d23e7b560@news.povray.org>
Patrick Elliott <sel### [at] npgcablecom> wrote:
> I am fining myself in a position where I think I have some code that can
> be used, but I need to "see" it, but the place I plan to use it has
> restrictions, where I can't test it "in world". So, I figured I might be
> able to test it in POVRay, but to see if its working as espected, I need
> to test it against conditions like those its going to be running.
>

Some times ago, I wrote a endless pseudo random landscape scroller.
The code is this:

-------------------------------------------------------
global_settings {
   adc_bailout 0.00392157
   assumed_gamma 1.5
   noise_generator 2
}

background { rgb -.2}


/* sky_sphere {
   pigment {
      image_map {
         png
         "/bsys/Textures/Cosmos/Stars_Alphamap.png"
         map_type 0
      }
   }
}

*/
fog {
   fog_type 2
   distance 1.618
    rgb <0.66, 0.66, 0.66>
   fog_offset 0
   fog_alt 0.4
   up <0, 1, 0>
}

union {
   #declare Value=0.13;

   #declare fn_pattern=
     function {
       pattern { dents turbulence 0.9 scale 0.15
       translate y*5*clock
   }
   }

   height_field {
    function 800, 800 { fn_pattern(x, y, 0)*Value + 0.5 }
   }


   pigment {
      uv_mapping
      cells
      turbulence <1, 1, 1>
      omega 1
      lambda 6

      color_map {
         [ 0 color rgb <0.68627, 0.52157, 0.32157>   ]
         [ 0.95 color rgb <0.21176, 0.23922, 0.26275>   ]
         [ 0.98 color rgb <0.81569, 0.69412, 0.45098>   ]
         [ 1 color rgb <0.952941, 0.964706, 0.964706>   ]
      }
      matrix < 5, 0, 0,
               -1, 1, 0,
               0, 0, 1,
               0, 0, 0 >
   }

   normal {
      uv_mapping
      cells
      5
      turbulence <1, 1, 1>
      omega 1
      lambda 6
      matrix < 5, 0, 0,
               -1, 1, 0,
               0, 0, 1,
               0, 0, 0 >
      accuracy 0.01
   }
   scale <8, 6, 6>
   rotate <0, 0, 0>
   translate <-4, -2.9, -3>
}

light_source {
   <4, 5, -5>, rgb <0.9, 0.9, 0.9>
}

light_source {
   <-4, 5, -5>, rgb <0.3, 0.3, 0.3>
   shadowless
   media_interaction off
   media_attenuation off
}

camera {
   perspective
   location <0, 0.52, -3>
   sky <0, 1, 0>
   direction <0, 0, 1>
   right <1.6, 0, 0>
   up <0, 1, 0>
   look_at <0, 0.7, 50>
   angle 56
}
-----------------------------------------------------

It based on a heightfield with a "Dents"-pattern as a
function to the heightfield. IMO a very easy way, to
generate pseudo random landscapes.

Hope it helps.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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