POV-Ray : Newsgroups : povray.newusers : desert sand : Re: desert sand Server Time
30 Jul 2024 04:25:16 EDT (-0400)
  Re: desert sand  
From: Alain
Date: 19 Oct 2004 23:20:26
Message: <4175d97a$1@news.povray.org>
Mike Williams nous apporta ses lumieres ainsi en ce 2004-10-19 03:15... :

>Wasn't it Rob Brown-Bayliss who wrote:
>  
>
>>Hi all, I am trying to create a desert plain, and have been experimenting
>>with isosurface. I have this:
>>
>> isosurface {
>>   function { y+f_noise3d(x,0, z)*0.25 }
>>   threshold 1
>>   contained_by { box { -20, 20 } }
>>   
>>   pigment { Wheat }
>>   normal { bumps 0.3 scale 0.1 }
>> }
>>
>>but it appears to be out of focus up close to the camera...  Any other
>>ideas on how to achieve a desert plain.
>>
>>By plain I dont mean a totaly flat plain, but with gentle dunes etc...
>>    
>>
>
>You may find that it looks a little better if you don't mix real
>isosurface bumpiness with fake normal bumps. Since bumps and f_noise3d
>use the same noise engine, you can convert your normal into part of the
>isosurface, like this.
>
>  isosurface {
>    function { y
>     +f_noise3d(x,0, z)*0.25 
>     +f_noise3d(x*10,0,z*10)*0.03
>    }
>    threshold 1
>    contained_by { box { -20, 20 } }
>    pigment { Wheat }
>  }
>
>Or, for a little more sharpness, try this:
>
>  isosurface {
>    function { y
>     +f_noise3d(x,0, z)*0.25 
>     +pow(f_noise3d(x*10,y*10,z*10),2)*0.02
>    }
>    threshold 1
>    contained_by { box { -20, 20 } }
>    pigment { Wheat }
>  }
>
>Or, for a lot more sharpness, and you don't mind it running a bit
>slower, add some fine structure like this. (If you change the settings
>of the P function you may well need to adjust the max_gradient).
>
>#declare P=function{
> pigment{
>  bozo
>  colour_map{[0.0  rgb 0.0]
>             [0.3  rgb 0.0]
>             [1.0  rgb 1.0]}
>  scale 0.1
>  turbulence 0.5
> }
>}
>
>  isosurface {
>    function { y
>     +f_noise3d(x,0, z)*0.25
>     +f_noise3d(x*10,0,z*10)*0.03 
>     -P(x,0,z).red*0.015
>    }
>    threshold 1
>    contained_by { box { -20, 20 } }
>    pigment { Wheat }
>  }
>
>  
>
I did that recently using a granite pattern. I had to scale it's 
amplitude very small, *0.001, to get a good loking result, at *0.01 I 
still had floating grains. The original used a granite normal. The end 
result realy look like sand, more than the normal.

Alain


Post a reply to this message

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