POV-Ray : Newsgroups : povray.binaries.images : Wanted: Clouds : Re: Wanted: Clouds Server Time
7 Aug 2024 05:18:55 EDT (-0400)
  Re: Wanted: Clouds  
From: Ben Chambers
Date: 22 May 2006 22:49:37
Message: <4472783F.3000904@pacificwebguy.com>
Sven Littkowski wrote:
> "Ben Chambers" <ben### [at] pacificwebguycom> schrieb im Newsbeitrag 
>>Anyway, I'd suggest adding some noise to a sphere function and using an 
>>isosurface for the planet itself, and encase it in a media object for the 
>>atmosphere.
> 
> 
> Yes, maybe. I just lack any experience with iso surfaces and media 
> objects...

Here's a start.

The function:
#declare fn_planet = function {
	sqrt( pow(x, 2) + pow(y, 2) + pow(z, 2) )
	+ f_snoise3d(x/64, y/64, z/64)*4
	+ f_snoise3d(x/32, y/32, z/32)*2
	+ f_snoise3d(x/16, y/16, z/16)
	+ f_snoise3d(x/8,  y/8,  z/8)/2
	+ f_snoise3d(x/4,  y/4,  z/4)/4
	+ f_snoise3d(x/2,  y/2,  z/2)/8
	+ f_snoise3d(x,    y,    z)/16
	- 100
}

Note: for effect I increased the bump sizes.  For a realistic range of 
heights, IIRC the largest should be *0.4 (not *4), and the scales would 
decrease from there.

And the object itself:
isosurface {
	function { fn_planet(x,y,z) }
	threshold 0
	evaluate 1, 1.2, 0.8
	
	contained_by {sphere {0, 110} }
	
	pigment {color rgb <0.8,.75,.6>}
}

If you want oceans, then this is a crude beginning:
sphere {
	0, 99.75
	pigment {color rgb z}
}

Vary the radius of the sphere to raise or lower the oceans (do it in 
very small increments, though).

I'm still trying out some different media settings...

...Chambers


Post a reply to this message

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