POV-Ray : Newsgroups : povray.newusers : desert sand : Re: desert sand Server Time
30 Jul 2024 04:24:27 EDT (-0400)
  Re: desert sand  
From: Mike Williams
Date: 20 Oct 2004 09:03:03
Message: <vpP4lGA3vedBFwR0@econym.demon.co.uk>
Wasn't it Alain who wrote:
>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.
>>
>>#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

If you got floating grains then you must have used 
        y+Some_Function(x,y,z)
instead of 
        y+Some_Function(x,0,z)

You should notice that in this bit:
>>    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
the y coefficients are all zero. This removes all possibility of the
grains being undercut or floating.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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