POV-Ray : Newsgroups : povray.binaries.images : Pending Storm : Re: Pending Storm Server Time
24 Apr 2024 11:10:54 EDT (-0400)
  Re: Pending Storm  
From: Thomas de Groot
Date: 29 Sep 2020 03:03:19
Message: <5f72dc37@news.povray.org>
Op 28/09/2020 om 23:52 schreef Bill Pragnell:
> This is a nice image. Your buildings are excellent as always, but I'm most
> intrigued by the landscape. The patchwork of fields is very convincing - you
> allude to a previous challenge scene, but I'm sure I've never seen this effect
> before. How was it done?
> 
> I've experimented briefly with British-style irregular drystone-walled fields
> before, and it's no trivial problem! As with many experiments, it dissolved into
> an abstract geometric modelling saga woefully unsuited to SDL, but I hope to
> return to it someday...
> 
> Also excellent clouds!
> 
> Bill
> 
> 

Thanks Bill, much appreciated indeed.

I tried to find the old TC-RTC site again but - even with the Wayback 
Machine - was unable to open it. :-/

Basically, the checkered fields are superimposed as a slope texture, 
taking into account a b&w diamond pattern image_map. In the original, 
the pattern was straight but I thought it would be more convincing if 
that were changed to a more wavy pattern.

The code for the landscape is as follows (you can extrapolate for your 
own needs):
//start code--------------------------------
#declare ImagePat = pigment {image_map {png 
"DiamondPattern_05b_inverse.png" gamma srgb interpolate 2 transmit all 
0.0 } rotate 90*x rotate 45*y scale 0.1}
//Map is necessary to place bushes and trees on the field edges:
#declare Map = pigment {ImagePat transform {HF_trans}}
#declare N_pat = normal {bump_map {png "DiamondPattern_05b_inverse.png" 
gamma 1.0 interpolate 2} rotate 90*x rotate 45*y scale 0.1}

#declare P_field1 =
pigment {
   agate
   pigment_map {
     [0.3 srgb <0.4, 0.5, 0.0>]
     [0.7 srgb <0.3, 0.4, 0.0>]
   }
   scale 0.01
}

#declare P_field2 =
pigment {
   bozo
   pigment_map {
     [0.45 srgb <0.7, 0.6, 0.0>]
     [0.55 srgb <0.9, 0.5, 0.0>]
   }
   scale 0.01
}

#declare Pattern =
texture {
   pigment {
     average
     pigment_map {
       [1.5 P_field1]
       [0.2 ImagePat]
       [1.0 P_field2]//srgb <0.5, 0.8, 0.2>*0.4]
     }
   }
   normal {N_pat bump_size 6}
}

#declare Patterned =
texture {
   slope {<0, -1, 0> 0, 0.5
     altitude <0, 0.0, 0>
   }
   texture_map {
     [0.10 Pattern]
     [0.15 Me_Rocks]
   }
}

#declare F_HF_01 =
function {
   pigment {
     image_map {
       tga "GC_Apophysis_06_hf.tga" gamma 1.0
       map_type 0
       interpolate 2
     }
     warp {repeat x}
     warp {repeat y}
     scale 50
     warp {
       turbulence 0.2
       octaves 1 //[6]
       lambda 1  //[2]
       omega 0.2 //[0.5]
     }
     scale 1/50
   }
}

#declare Fieldscape =
intersection {
   height_field {
     function HF_res, HF_res {F_HF_01(x,y,z).hf}
     smooth
     translate <-0.5, 0, -0.5>
     texture {Patterned}
     transform {HF_trans}
   }
   box {
     <-0.5, -0.5, -0.5>, <0.5, 0.5, 0.5>
     scale HF_scale * <0.99, 10, 0.99>
   }
   //rotate 90*y
}

Fieldscape
//end code--------------------------------

I suppose there are other ways to reach this, in particular by including 
the diamond pattern as a function into the height_field. It is something 
which I have not explored (yet) and I foresee a couple of difficulties 
with that approach. In the present scene I just wanted a ready-made 
landscape so that I could concentrate on the castle.

The pattern (Map) is also used to place the trees on the landscape by 
means of the eval_pigment() code.


Hazelgrove, who also posted it here, I don't remember when exactly).

-- 
Thomas


Post a reply to this message


Attachments:
Download 'diamondpattern_05b_inverse.png' (369 KB)

Preview of image 'diamondpattern_05b_inverse.png'
diamondpattern_05b_inverse.png


 

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