POV-Ray : Newsgroups : povray.general : Problems with media density : Problems with media density Server Time
30 Jul 2024 02:27:32 EDT (-0400)
  Problems with media density  
From: David Given
Date: 15 Jan 2010 14:33:45
Message: <4b50c319$1@news.povray.org>
I'm trying to use a media to produce volumetric clouds. However, I'm
getting really strange results. If you look at the following image:

http://twitpic.com/y7642

...you can see odd longitudinal stripes in the clouds. Something appears
to be dividing the clouds up into slices. However, animation shows that
moving the camera causes the slices to flicker and pulse irregularly:

http://www.youtube.com/watch?v=mdSYui1-vAo
(actually a different scene, but showing the same problem.)

The clouds are represented by a hollow sphere some 1747 units in radius
(1 unit == 1 km in my model). The lower edge of the clouds are 5 km from
the camera, which means that the smallest detail visible in the clouds
are unlikely to be bigger than 10m, which is 0.010 units; therefore I
don't think I'm hitting any numerical limit issues.

Can anyone shed any light on this? Right now I'm completely stumped.

Code snippet follows:



#declare Nominal_Terrain_Radius = 1737.400;
#declare Sea_Level              = -1;
#declare Cloud_Base             = 5;
#declare Cloud_Height           = 10;

#local Bottom_Of_Atmosphere = Nominal_Terrain_Radius + Sea_Level;

#local Cloud_Bottom = Cloud_Base + Bottom_Of_Atmosphere;
#local Cloud_Top = Cloud_Bottom + Cloud_Height;
#local Clouds_Media =
	media
	{
		method 3 // adaptive
		intervals 3
		samples 3
		scattering
		{
			1 1
		}
		
	    density
	    {
	        bumps
	
	        scale Cloud_Height/2
	        density_map
	        {
	            [0 rgb 0]
	            [0.6 rgb 0]
	            [1 rgb .5]
	        }
	    }
	}

#local Clouds_Object =
	difference
	{
		sphere
		{
			<0, 0, 0>, Cloud_Top
		}

		sphere
		{
			<0, 0, 0>, Cloud_Bottom
		}

		pigment
		{
			rgbt 1
		}

		hollow

		interior
		{
			media
			{
				Clouds_Media
			}
		}
	}		

-- 
┌─── dg@cowlark.com ─────
http://www.cowlark.com ─────
│ "There does not now, nor will there ever, exist a programming
│ language in which it is the least bit hard to write bad programs." ---
│ Flon's Axiom


Post a reply to this message

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