POV-Ray : Newsgroups : povray.binaries.images : concentric blobs clouds : Re: concentric blobs clouds Server Time
20 May 2024 09:32:10 EDT (-0400)
  Re: concentric blobs clouds  
From: Mike Horvath
Date: 22 Feb 2018 15:56:25
Message: <5a8f2e79@news.povray.org>
On 4/28/2016 10:52 AM, Simon J. Cambridge wrote:
> Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

>>> I ended up using a single containing object (box or plane) and then filling it
>>> with a skewed y-gradient density to get a flat bottom and then adding a mixture
>>> of wrinkles, bozo and crackle (form<1, 0, 0>) to try to approximate fluffy tops.
>>> Some of my images over at www.landofthefirst.com were created using this. I am
>>> still not 100% happy with them.
>>
>>     The ones at Othil Homtoh look very nice...
>>
>> --
>> jaime
> 
> Here is the code:
> 
>      #macro SkyShell(minAlt, maxAlt, Int)
>          difference
>          {
>              sphere {<0, 0, 0> 1000000+maxAlt}
>              sphere {<0, 0, 0> 1000000+minAlt}
>              hollow
>              texture {pigment {color rgbf 1}}
>              interior {Int}
>              translate <0, -1000000, 0>
>          }
>      #end
> 
>      SkyShell(4000, 5000,
>          interior {
>              media {
>                  method 3
>                  samples 20
>                  scattering {2, color rgb 0.0075 extinction 1}
>                  density
>                  {
>                      wrinkles
>                      scale <4000, 1000, 4000>
>                      warp { turbulence 2 }
>                      lambda 4
>                      color_map
>                      {
>                          [0.00 color rgb 1.0]
>                          [0.50 color rgb 0.8]
>                          [0.55 color rgb 0.0]
>                          [1.00 color rgb 0.0]
>                      }
>                      translate <-4000, 0, -1000>
>                  }
>                  density
>                  {
>                      gradient y
>                      scale 1000
>                      color_map
>                      {
>                          [0.0  color rgb 0.00]
>                          [0.4  color rgb 1.00]
>                          [0.9  color rgb 1.00]
>                          [1.0  color rgb 0.00]
>                      }
>                  }
>              }
>          }
>      )
> 
> I lied. It was concentric spheres!
> 
> And nice solution for the artifacts! One to remember.
> 
> 
> 
> 


I am having trouble adapting this code. Here's what I have:



#declare lego_units = 20;	// LDU per foot
#declare earth_radius	= 20900000 * lego_units;
#declare earth_circum	= floor(2 * pi * earth_radius / 640) * 640;
#declare earth_radius	= earth_circum/2/pi;
#declare cloud_min_radius	= 6000 * lego_units;
#declare cloud_max_radius	= 9000 * lego_units;

	#local inner_radius = earth_radius + cloud_min_radius;
	#local outer_radius = earth_radius + cloud_max_radius;
	#local bound_radius = sin(acos(earth_radius/outer_radius)) * outer_radius;
	#local cloud_scale = 1;
	#local cloud_media = media
	{
         method 3
         samples 20
         scattering {2, color rgb 0.0075 extinction 1}
         density
         {
             wrinkles
             scale outer_radius * 300 * <1,1/4,1>
             warp { turbulence 2 }
             lambda 4
             color_map
             {
                 [0.00 color rgb 1.0]
                 [0.50 color rgb 0.8]
                 [0.55 color rgb 0.0]
                 [1.00 color rgb 0.0]
             }
         }

         density
         {
             gradient y
             scale (cloud_max_radius - cloud_min_radius)
             color_map
             {
                 [0.0  color rgb 0.00]
                 [0.4  color rgb 1.00]
                 [0.9  color rgb 1.00]
                 [1.0  color rgb 0.00]
             }
         }

		scale 1
     }
	#local cloud_sphere = difference
	{
		sphere {0, outer_radius}
		sphere {0, inner_radius}
//		bounded_by {cylinder {<0,-earth_radius,0,>, <0,-outer_radius,0,>, 
bound_radius}}
		hollow
		material
		{
			texture {pigment {color srgbft <1,1,1,0,1>}}
			interior
			{
				media {cloud_media}
			}
			scale cloud_scale
		}
		translate +y * earth_radius
	}
	object {cloud_sphere}


However, the effect is very grainy and dark. If I continue to scale it 
upward, it turns nearly black. If I scale it downward, I can't see the 
clouds any more. Does anyone know what I am doing wrong? Thanks.


Mike


Post a reply to this message


Attachments:
Download 'wrapper_townview_normal.png' (1118 KB)

Preview of image 'wrapper_townview_normal.png'
wrapper_townview_normal.png


 

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