POV-Ray : Newsgroups : povray.newusers : desert sand Server Time
4 Nov 2024 21:24:21 EST (-0500)
  desert sand (Message 1 to 4 of 4)  
From: Rob Brown-Bayliss
Subject: desert sand
Date: 19 Oct 2004 01:19:10
Message: <pan.2004.10.19.05.19.06.431620@localhost.localdomain>
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...

  Cheers


Post a reply to this message

From: Mike Williams
Subject: Re: desert sand
Date: 19 Oct 2004 03:15:33
Message: <C9icxKAD8LdBFwk8@econym.demon.co.uk>
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 }
  }

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Alain
Subject: Re: desert sand
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

From: Mike Williams
Subject: Re: desert sand
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.